Tools__Diff3CodeView2.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 16 Mar 2012 17:08:17 +0000
branchjv
changeset 12179 47f98e7d6de1
child 12190 2a77dea2eceb
permissions -rw-r--r--
Improvments towards merge tool

"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libtool' }"

"{ NameSpace: Tools }"

DiffCodeView2 subclass:#Diff3CodeView2
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-CodeView'
!

Object subclass:#Diff3Data
	instanceVariableNames:'text1 text2 text3 inserted deleted changed'
	classVariableNames:''
	poolDictionaries:''
	privateIn:Diff3CodeView2
!

!Diff3CodeView2 class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!Diff3CodeView2 class methodsFor:'defaults'!

numberOfViews
    "return the number of the synced subViews.
     Usually redefined in subclasses"

    ^ 3

    "Created: / 16-03-2012 / 12:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!Diff3CodeView2 methodsFor:'accessing'!

text1:t1 text2:t2 text3: t3
    |data|

    textViews first  contents: t1.
    textViews second contents: t2.
    textViews third  contents: t3.

    "Should be (once implemented)"    
"/    data := self computeDiffDataForText1:t1 text2:t2 text3: t3.
"/
"/    (textViews at:1) 
"/        contents:(data text1);
"/        deletedLines:(data deleted);
"/        changedLines:(data changed);
"/        insertedLines:#();    
"/        originDiffText:t1;
"/        emptyLines:(data inserted).
"/
"/    (textViews at:2) 
"/        contents:(data text2);
"/        deletedLines:#();
"/        changedLines:(data changed);
"/        insertedLines:(data inserted);
"/        originDiffText:t2;
"/        emptyLines:(data deleted).
"/
"/    (textViews at:3) 
"/        contents:(data text3);
"/        deletedLines:#();
"/        changedLines:(data changed);
"/        insertedLines:(data inserted);
"/        originDiffText:t3;
"/        emptyLines:(data deleted).

    "Modified: / 22-06-2010 / 21:36:35 / Jakub <zelenja7@fel.cvut.cz>"
    "Created: / 16-03-2012 / 12:58:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!Diff3CodeView2::Diff3Data methodsFor:'accessing'!

changed

    ^changed copy

    "Modified: / 02-05-2010 / 19:31:18 / Jakub <zelenja7@fel.cvut.cz>"
    "Modified: / 16-07-2010 / 09:35:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

changed:something
    changed := something.
!

deleted
    ^ deleted
!

deleted:something
    deleted := something.
!

inserted
    ^ inserted
!

inserted:something
    inserted := something.
!

text1
    ^ text1
!

text1:something
    text1 := something.
!

text2
    ^ text2
!

text2:something
    text2 := something.
!

text3
    ^ text3
!

text3:something
    text3 := something.
! !

!Diff3CodeView2 class methodsFor:'documentation'!

version_SVN
    ^ '$Id: Tools__Diff3CodeView2.st 7925 2012-03-16 17:08:17Z vranyj1 $'
! !