Tools__Diff3CodeView2.st
branchjv
changeset 12179 47f98e7d6de1
child 12190 2a77dea2eceb
equal deleted inserted replaced
12178:185adeb21886 12179:47f98e7d6de1
       
     1 "
       
     2  COPYRIGHT (c) 2006 by eXept Software AG
       
     3               All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
       
    12 "{ Package: 'stx:libtool' }"
       
    13 
       
    14 "{ NameSpace: Tools }"
       
    15 
       
    16 DiffCodeView2 subclass:#Diff3CodeView2
       
    17 	instanceVariableNames:''
       
    18 	classVariableNames:''
       
    19 	poolDictionaries:''
       
    20 	category:'Interface-CodeView'
       
    21 !
       
    22 
       
    23 Object subclass:#Diff3Data
       
    24 	instanceVariableNames:'text1 text2 text3 inserted deleted changed'
       
    25 	classVariableNames:''
       
    26 	poolDictionaries:''
       
    27 	privateIn:Diff3CodeView2
       
    28 !
       
    29 
       
    30 !Diff3CodeView2 class methodsFor:'documentation'!
       
    31 
       
    32 copyright
       
    33 "
       
    34  COPYRIGHT (c) 2006 by eXept Software AG
       
    35               All Rights Reserved
       
    36 
       
    37  This software is furnished under a license and may be used
       
    38  only in accordance with the terms of that license and with the
       
    39  inclusion of the above copyright notice.   This software may not
       
    40  be provided or otherwise made available to, or used by, any
       
    41  other person.  No title to or ownership of the software is
       
    42  hereby transferred.
       
    43 "
       
    44 ! !
       
    45 
       
    46 !Diff3CodeView2 class methodsFor:'defaults'!
       
    47 
       
    48 numberOfViews
       
    49     "return the number of the synced subViews.
       
    50      Usually redefined in subclasses"
       
    51 
       
    52     ^ 3
       
    53 
       
    54     "Created: / 16-03-2012 / 12:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    55 ! !
       
    56 
       
    57 !Diff3CodeView2 methodsFor:'accessing'!
       
    58 
       
    59 text1:t1 text2:t2 text3: t3
       
    60     |data|
       
    61 
       
    62     textViews first  contents: t1.
       
    63     textViews second contents: t2.
       
    64     textViews third  contents: t3.
       
    65 
       
    66     "Should be (once implemented)"    
       
    67 "/    data := self computeDiffDataForText1:t1 text2:t2 text3: t3.
       
    68 "/
       
    69 "/    (textViews at:1) 
       
    70 "/        contents:(data text1);
       
    71 "/        deletedLines:(data deleted);
       
    72 "/        changedLines:(data changed);
       
    73 "/        insertedLines:#();    
       
    74 "/        originDiffText:t1;
       
    75 "/        emptyLines:(data inserted).
       
    76 "/
       
    77 "/    (textViews at:2) 
       
    78 "/        contents:(data text2);
       
    79 "/        deletedLines:#();
       
    80 "/        changedLines:(data changed);
       
    81 "/        insertedLines:(data inserted);
       
    82 "/        originDiffText:t2;
       
    83 "/        emptyLines:(data deleted).
       
    84 "/
       
    85 "/    (textViews at:3) 
       
    86 "/        contents:(data text3);
       
    87 "/        deletedLines:#();
       
    88 "/        changedLines:(data changed);
       
    89 "/        insertedLines:(data inserted);
       
    90 "/        originDiffText:t3;
       
    91 "/        emptyLines:(data deleted).
       
    92 
       
    93     "Modified: / 22-06-2010 / 21:36:35 / Jakub <zelenja7@fel.cvut.cz>"
       
    94     "Created: / 16-03-2012 / 12:58:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    95 ! !
       
    96 
       
    97 !Diff3CodeView2::Diff3Data methodsFor:'accessing'!
       
    98 
       
    99 changed
       
   100 
       
   101     ^changed copy
       
   102 
       
   103     "Modified: / 02-05-2010 / 19:31:18 / Jakub <zelenja7@fel.cvut.cz>"
       
   104     "Modified: / 16-07-2010 / 09:35:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   105 !
       
   106 
       
   107 changed:something
       
   108     changed := something.
       
   109 !
       
   110 
       
   111 deleted
       
   112     ^ deleted
       
   113 !
       
   114 
       
   115 deleted:something
       
   116     deleted := something.
       
   117 !
       
   118 
       
   119 inserted
       
   120     ^ inserted
       
   121 !
       
   122 
       
   123 inserted:something
       
   124     inserted := something.
       
   125 !
       
   126 
       
   127 text1
       
   128     ^ text1
       
   129 !
       
   130 
       
   131 text1:something
       
   132     text1 := something.
       
   133 !
       
   134 
       
   135 text2
       
   136     ^ text2
       
   137 !
       
   138 
       
   139 text2:something
       
   140     text2 := something.
       
   141 !
       
   142 
       
   143 text3
       
   144     ^ text3
       
   145 !
       
   146 
       
   147 text3:something
       
   148     text3 := something.
       
   149 ! !
       
   150 
       
   151 !Diff3CodeView2 class methodsFor:'documentation'!
       
   152 
       
   153 version_SVN
       
   154     ^ '$Id: Tools__Diff3CodeView2.st 7925 2012-03-16 17:08:17Z vranyj1 $'
       
   155 ! !