author | Claus Gittinger <cg@exept.de> |
Tue, 21 Apr 2020 13:54:09 +0200 | |
changeset 19580 | ce40b5d1e941 |
parent 16742 | 76fbc27f111a |
child 16748 | 62486fba2d74 |
permissions | -rw-r--r-- |
16742 | 1 |
"{ Encoding: utf8 }" |
2 |
||
271 | 3 |
" |
277 | 4 |
COPYRIGHT (c) 1995 by Claus Gittinger |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
5 |
All Rights Reserved |
271 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
14 |
"{ Package: 'stx:libtool' }" |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
15 |
|
16247 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
271 | 18 |
ThreeColumnTextView subclass:#Diff3TextView |
19 |
instanceVariableNames:'useColors showSeparators addedColor addedBgColor removedColor |
|
20 |
removedBgColor changedColor changedBgColor' |
|
21 |
classVariableNames:'' |
|
22 |
poolDictionaries:'' |
|
23 |
category:'Views-Text' |
|
24 |
! |
|
25 |
||
2245 | 26 |
!Diff3TextView class methodsFor:'documentation'! |
271 | 27 |
|
28 |
copyright |
|
29 |
" |
|
277 | 30 |
COPYRIGHT (c) 1995 by Claus Gittinger |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
31 |
All Rights Reserved |
271 | 32 |
|
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
! |
|
41 |
||
42 |
documentation |
|
43 |
" |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
44 |
a view showing merged diff3 (see rcsmerge / merge unix manual pages) output in a |
271 | 45 |
user-friendly form. |
46 |
The view is created and opened with: |
|
47 |
||
277 | 48 |
d := Diff3TextView openOn:text label:l1 label:l2 label:l3. |
271 | 49 |
|
277 | 50 |
and it will show the 3 versions side-by-side |
51 |
Its main use is for the SourceCodeManager, to show merged sources after |
|
52 |
a failed checkin. |
|
2245 | 53 |
|
54 |
Notice: |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
55 |
This has diff3 output (or cvs diff output) hardwired into it. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
56 |
Needs to be adapted, if that format ever changes. |
2245 | 57 |
|
58 |
[see also:] |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
59 |
TextView EditTextView DiffTextView |
2245 | 60 |
|
61 |
[author:] |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
62 |
Claus Gittinger |
271 | 63 |
" |
64 |
! ! |
|
65 |
||
2245 | 66 |
!Diff3TextView class methodsFor:'instance creation'! |
271 | 67 |
|
68 |
openOnMergedText:text label:firstLabel label:secondLabel label:thirdLabel |
|
69 |
"open up a view showing firstText, secondText and thirdText side-by-side, |
|
70 |
and labels for all views." |
|
71 |
||
72 |
|top v l1 l2 l3| |
|
73 |
||
74 |
top := StandardSystemView label:'three texts'. |
|
75 |
||
76 |
l1 := Label label:firstLabel in:top. |
|
77 |
l1 origin:0.0@0.0 corner:0.33@(l1 height). |
|
78 |
l2 := Label label:secondLabel in:top. |
|
79 |
l2 origin:0.33@0.0 corner:0.67@(l1 height). |
|
80 |
l3 := Label label:thirdLabel in:top. |
|
81 |
l3 origin:0.67@0.0 corner:1.0@(l1 height). |
|
82 |
||
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
83 |
v := HVScrollableView |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
84 |
for:self |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
85 |
miniScrollerH:true miniScrollerV:false |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
86 |
in:top. |
271 | 87 |
v origin:0.0 @ (l1 height + ViewSpacing) corner:1.0 @ 1.0. |
88 |
v scrolledView updateListsFromMergedText:text. |
|
2245 | 89 |
|
90 |
"/ self addNextPreviousButtons. |
|
271 | 91 |
^ top open |
92 |
||
93 |
" |
|
94 |
ThreeColumnTextView |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
95 |
openOn:('smalltalk.rc' asFilename contentsOfEntireFile) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
96 |
label:'smalltalk.rc' |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
97 |
and:('display.rc' asFilename contentsOfEntireFile) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
98 |
label:'display.rc' |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
99 |
and:('private.rc' asFilename contentsOfEntireFile) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
100 |
label:'private.rc' |
271 | 101 |
" |
102 |
||
103 |
"Modified: 12.12.1995 / 13:09:13 / cg" |
|
104 |
! ! |
|
105 |
||
2245 | 106 |
!Diff3TextView class methodsFor:'public helpers'! |
713 | 107 |
|
108 |
emphasizeMergedDiff3Text:mergedText emphasize1:e1 emphasize2:e2 emphasizeSep:e3 |
|
109 |
"given the merge()/rcsmerge() merged output (as created by 'cvs update'), |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
110 |
create & return a text object which contains the conflicts |
713 | 111 |
highlighted. |
112 |
CAVEAT: this is a highly specialized method - probably not the right place |
|
113 |
for it here ..." |
|
114 |
||
3703
97c92239e22f
Use Text instead of ColoredListEntry
Stefan Vogel <sv@exept.de>
parents:
2852
diff
changeset
|
115 |
|dIdx dEnd state entry list skip l1 l2 buffer |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
116 |
sameAtStart sameAtEnd sepYourVersion sepOtherVersion sepLine| |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
117 |
|
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
118 |
sepYourVersion := '----- your version -----'. |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
119 |
sepOtherVersion := '----- other version ----'. |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
120 |
sepLine := '------------------------'. |
713 | 121 |
|
122 |
list := OrderedCollection new. |
|
123 |
||
124 |
dIdx := 1. |
|
125 |
dEnd := mergedText size + 1. |
|
126 |
state := #initial. |
|
127 |
[dIdx < dEnd] whileTrue:[ |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
128 |
dIdx == dEnd ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
129 |
"dummy cleanup entry" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
130 |
entry := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
131 |
state := #initial. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
132 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
133 |
entry := mergedText at:dIdx. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
134 |
dIdx := dIdx + 1. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
135 |
]. |
713 | 136 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
137 |
skip := false. |
713 | 138 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
139 |
entry notNil ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
140 |
(entry startsWith:'<<<<<<<') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
141 |
state := 1. skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
142 |
l1 := OrderedCollection new. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
143 |
buffer := l1. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
144 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
145 |
(entry startsWith:'|||||||') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
146 |
state := 2. skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
147 |
buffer := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
148 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
149 |
(entry startsWith:'=======') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
150 |
state == 2 ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
151 |
state := 23 "/ on both 2 and 3 |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
152 |
] ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
153 |
state := 3 "/ only in 3 |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
154 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
155 |
skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
156 |
l2 := OrderedCollection new. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
157 |
buffer := l2. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
158 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
159 |
(entry startsWith:'>>>>>>>') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
160 |
state := #initial. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
161 |
skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
162 |
buffer := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
163 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
164 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
165 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
166 |
]. |
713 | 167 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
168 |
state == #initial ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
169 |
l1 notNil ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
170 |
"/ diff3-output is sometimes stupid; fix some here |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
171 |
sameAtStart := OrderedCollection new. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
172 |
[l1 notEmpty and:[l2 notEmpty and:[l1 first = l2 first or:[l1 first withTabsExpanded = l2 first withTabsExpanded]]]] whileTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
173 |
sameAtStart addLast:l1 removeFirst. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
174 |
l2 removeFirst |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
175 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
176 |
sameAtEnd := OrderedCollection new. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
177 |
[l1 notEmpty and:[l2 notEmpty and:[l1 last = l2 last or:[l1 last withTabsExpanded = l2 last withTabsExpanded]]]] whileTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
178 |
sameAtEnd addFirst:l1 removeLast. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
179 |
l2 removeLast |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
180 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
181 |
sameAtStart do:[:eachEntry | list add:eachEntry]. |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
182 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
183 |
(l1 notEmpty or:[l2 notEmpty]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
184 |
list add:(e3 isNil ifTrue:[sepYourVersion] ifFalse:[Text string:sepYourVersion emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
185 |
l1 do:[:eachEntry | list add:(e1 isNil ifTrue:[eachEntry] ifFalse:[Text string:eachEntry emphasis:e1])]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
186 |
list add:(e3 isNil ifTrue:[sepOtherVersion] ifFalse:[Text string:sepOtherVersion emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
187 |
l2 do:[:eachEntry | list add:(e2 isNil ifTrue:[eachEntry] ifFalse:[Text string:eachEntry emphasis:e2])]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
188 |
list add:(e3 isNil ifTrue:[sepLine] ifFalse:[Text string:sepLine emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
189 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
190 |
sameAtEnd do:[:eachEntry | list add:eachEntry]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
191 |
l1 := l2 := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
192 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
193 |
]. |
713 | 194 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
195 |
skip ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
196 |
state == #initial ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
197 |
list add:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
198 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
199 |
state == 1 ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
200 |
l1 add:entry. |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
201 |
"/ e1 notNil ifTrue:[ |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
202 |
"/ list add:(Text string:entry emphasis:e1) |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
203 |
"/ ] ifFalse:[ |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
204 |
"/ list add:entry |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
205 |
"/ ] |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
206 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
207 |
(state == 3 or:[state == 23]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
208 |
l2 add:entry |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
209 |
"/ e2 notNil ifTrue:[ |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
210 |
"/ list add:(Text string:entry emphasis:e2) |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
211 |
"/ ] ifFalse:[ |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
212 |
"/ list add:entry |
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
213 |
"/ ] |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
214 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
215 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
216 |
]. |
713 | 217 |
]. |
218 |
||
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
219 |
l1 notNil ifTrue:[ |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
220 |
state ~~ #initial ifTrue:[self error:'oops - bad state should not happen ...']. |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
221 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
222 |
"/ diff3-output is sometimes stupid; fix some here |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
223 |
[l1 notEmpty and:[l2 notEmpty and:[l1 first = l2 first or:[l1 first withTabsExpanded = l2 first withTabsExpanded]]]] whileTrue:[l1 removeFirst. l2 removeFirst]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
224 |
[l1 notEmpty and:[l2 notEmpty and:[l1 last = l2 last or:[l1 last withTabsExpanded = l2 last withTabsExpanded]]]] whileTrue:[l1 removeLast. l2 removeLast]. |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
225 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
226 |
(l1 notEmpty or:[l2 notEmpty]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
227 |
list add:(e3 isNil ifTrue:[sepYourVersion] ifFalse:[Text string:sepYourVersion emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
228 |
l1 do:[:eachEntry | list add:(e1 isNil ifTrue:[eachEntry] ifFalse:[Text string:eachEntry emphasis:e1])]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
229 |
list add:(e3 isNil ifTrue:[sepOtherVersion] ifFalse:[Text string:sepOtherVersion emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
230 |
l2 do:[:eachEntry | list add:(e2 isNil ifTrue:[eachEntry] ifFalse:[Text string:eachEntry emphasis:e2])]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
231 |
list add:(e3 isNil ifTrue:[sepLine] ifFalse:[Text string:sepLine emphasis:e3]). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
232 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
233 |
l1 := l2 := nil. |
2851
1d2fabb348d2
better diff3-output processing
Claus Gittinger <cg@exept.de>
parents:
2245
diff
changeset
|
234 |
]. |
713 | 235 |
^ list |
236 |
||
237 |
"Created: 9.9.1996 / 19:54:00 / cg" |
|
238 |
"Modified: 9.9.1996 / 20:41:40 / cg" |
|
11537 | 239 |
! |
240 |
||
241 |
emphasizeMergedDiff3TextFromPerforce:mergedText origEmphasis:origEmphasize otherEmphasis:otherEmphasize yourEmphasis:yourEmphasize separatorEmphasis:separatorEmphasize |
|
242 |
"given the merge()/rcsmerge() merged output (as created by 'cvs update'), |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
243 |
create & return a text object which contains the conflicts |
11537 | 244 |
highlighted. |
245 |
CAVEAT: this is a highly specialized method - probably not the right place |
|
246 |
for it here ..." |
|
247 |
||
248 |
|list origSeparator otherSeparator yourSeparator endSeparator line currentEmphasis nextEmphasis| |
|
249 |
||
250 |
list := StringCollection new. |
|
251 |
||
252 |
origSeparator := '>>>> ORIGINAL //'. |
|
253 |
otherSeparator := '==== THEIRS //'. |
|
254 |
yourSeparator := '==== YOURS //'. |
|
255 |
endSeparator := '<<<<'. |
|
256 |
mergedText do:[:aLine| |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
257 |
line := aLine withoutTrailingSeparators. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
258 |
(aLine startsWith:origSeparator) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
259 |
currentEmphasis := separatorEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
260 |
nextEmphasis := origEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
261 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
262 |
(aLine startsWith:otherSeparator) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
263 |
currentEmphasis := separatorEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
264 |
nextEmphasis := otherEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
265 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
266 |
(aLine startsWith:yourSeparator) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
267 |
currentEmphasis := separatorEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
268 |
nextEmphasis := yourEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
269 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
270 |
(aLine startsWith:endSeparator) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
271 |
currentEmphasis := separatorEmphasize. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
272 |
nextEmphasis := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
273 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
274 |
nextEmphasis := currentEmphasis. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
275 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
276 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
277 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
278 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
279 |
list add:(currentEmphasis isNil ifTrue:[aLine] ifFalse:[Text string:aLine emphasis:currentEmphasis]). |
11537 | 280 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
281 |
currentEmphasis := nextEmphasis. |
11537 | 282 |
]. |
283 |
^ list |
|
284 |
||
285 |
"Created: / 01-06-2012 / 10:44:31 / cg" |
|
713 | 286 |
! ! |
287 |
||
271 | 288 |
!Diff3TextView methodsFor:'initialization'! |
289 |
||
290 |
initStyle |
|
291 |
super initStyle. |
|
292 |
||
293 |
showSeparators := false. |
|
294 |
||
3703
97c92239e22f
Use Text instead of ColoredListEntry
Stefan Vogel <sv@exept.de>
parents:
2852
diff
changeset
|
295 |
useColors := true. |
271 | 296 |
useColors ifTrue:[ |
16247 | 297 |
device hasColors ifTrue:[ |
16742 | 298 |
addedColor := self blackColor. |
16247 | 299 |
addedBgColor := Color green. |
271 | 300 |
|
16742 | 301 |
changedColor := removedColor := self whiteColor. |
16247 | 302 |
removedBgColor := Color red. |
303 |
changedBgColor := Color blue. |
|
304 |
] ifFalse:[ |
|
16742 | 305 |
addedBgColor := removedBgColor := changedBgColor := self blackColor. |
306 |
addedColor := removedColor := changedColor := self whiteColor. |
|
16247 | 307 |
] |
271 | 308 |
]. |
309 |
||
310 |
"Created: 16.11.1995 / 16:59:48 / cg" |
|
311 |
"Modified: 12.12.1995 / 12:25:55 / cg" |
|
312 |
! ! |
|
313 |
||
314 |
!Diff3TextView methodsFor:'private'! |
|
315 |
||
316 |
updateListsFromMergedText:mergedText |
|
317 |
"given the merge()/rcsmerge() merged output (as created by 'cvs update'), |
|
318 |
update my views contents" |
|
319 |
||
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
320 |
|idx1 idx2 idx3 dIdx dEnd state entry l1 l2 l3 |
271 | 321 |
textView1 textView2 textView3 skip max| |
322 |
||
323 |
textView1 := textViews at:1. |
|
324 |
textView2 := textViews at:2. |
|
325 |
textView3 := textViews at:3. |
|
326 |
||
327 |
l1 := OrderedCollection new. |
|
328 |
l2 := OrderedCollection new. |
|
329 |
l3 := OrderedCollection new. |
|
330 |
||
331 |
idx1 := 1. |
|
332 |
idx2 := 1. |
|
333 |
idx3 := 1. |
|
334 |
||
335 |
dIdx := 1. |
|
336 |
dEnd := mergedText size + 1. |
|
337 |
state := #initial. |
|
338 |
[dIdx < dEnd] whileTrue:[ |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
339 |
dIdx == dEnd ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
340 |
"dummy cleanup entry" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
341 |
entry := nil. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
342 |
state := #initial. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
343 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
344 |
entry := mergedText at:dIdx. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
345 |
dIdx := dIdx + 1. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
346 |
]. |
271 | 347 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
348 |
state == #initial ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
349 |
" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
350 |
fill up to size difference from previous change |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
351 |
" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
352 |
max := (l1 size max:l2 size) max:l3 size. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
353 |
[l1 size < max] whileTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
354 |
l1 add:nil |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
355 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
356 |
[l2 size < max] whileTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
357 |
l2 add:nil |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
358 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
359 |
[l3 size < max] whileTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
360 |
l3 add:nil |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
361 |
]. |
271 | 362 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
363 |
" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
364 |
except for the first chunk, add a separating line |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
365 |
" |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
366 |
l1 size ~~ 0 ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
367 |
showSeparators ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
368 |
l1 add:'--------'. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
369 |
l2 add:'--------'. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
370 |
l3 add:'--------'. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
371 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
372 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
373 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
374 |
|
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
375 |
skip := false. |
271 | 376 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
377 |
entry notNil ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
378 |
(entry startsWith:'<<<<<<<') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
379 |
state := 1. skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
380 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
381 |
(entry startsWith:'|||||||') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
382 |
state := 2. skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
383 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
384 |
(entry startsWith:'=======') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
385 |
state == 2 ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
386 |
state := 23 "/ on both 2 and 3 |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
387 |
] ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
388 |
state := 3 "/ only in 3 |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
389 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
390 |
skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
391 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
392 |
(entry startsWith:'>>>>>>>') ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
393 |
state := #initial. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
394 |
skip := true. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
395 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
396 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
397 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
398 |
]. |
271 | 399 |
|
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
400 |
skip ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
401 |
(state == #initial or:[state == 1]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
402 |
(useColors and:[state == 1]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
403 |
l1 add:(Text string:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
404 |
emphasis:(Array with:(#color->changedColor) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
405 |
with:(#backgroundColor->changedBgColor))). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
406 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
407 |
l1 add:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
408 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
409 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
410 |
(state == #initial or:[state == 2 or:[state == 23]]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
411 |
(useColors and:[state == 2 or:[state == 23]]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
412 |
l2 add:(Text string:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
413 |
emphasis:(Array with:(#color->changedColor) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
414 |
with:(#backgroundColor->changedBgColor))). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
415 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
416 |
l2 add:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
417 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
418 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
419 |
(state == #initial or:[state == 3 or:[state == 23]]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
420 |
(useColors and:[state == 3 or:[state == 23]]) ifTrue:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
421 |
l3 add:(Text string:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
422 |
emphasis:(Array with:(#color->changedColor) |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
423 |
with:(#backgroundColor->changedBgColor))). |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
424 |
] ifFalse:[ |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
425 |
l3 add:entry |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
426 |
] |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
427 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
428 |
]. |
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
429 |
]. |
271 | 430 |
]. |
14277
717130663d2c
Do not access gc instvars directly
Stefan Vogel <sv@exept.de>
parents:
11537
diff
changeset
|
431 |
|
271 | 432 |
textView1 list:l1. |
433 |
textView2 list:l2. |
|
434 |
textView3 list:l3. |
|
435 |
||
290
5b9361cfa7b8
oops - merge output is different than expected sometimes
Claus Gittinger <cg@exept.de>
parents:
277
diff
changeset
|
436 |
"Modified: 13.12.1995 / 19:56:32 / cg" |
271 | 437 |
! ! |
438 |
||
2245 | 439 |
!Diff3TextView class methodsFor:'documentation'! |
271 | 440 |
|
441 |
version |
|
16247 | 442 |
^ '$Header$' |
271 | 443 |
! ! |
16247 | 444 |