10196
|
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:libbasic3' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
ApplicationModel subclass:#TextDiffTool
|
|
17 |
instanceVariableNames:'labelAHolder textAHolder labelBHolder textBHolder diffSpecHolder
|
|
18 |
showDiffHolder diffView numChangedTexts'
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
|
21 |
category:'Interface-Diff'
|
|
22 |
!
|
|
23 |
|
|
24 |
!TextDiffTool class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
! !
|
|
39 |
|
|
40 |
!TextDiffTool class methodsFor:'image specs'!
|
|
41 |
|
|
42 |
versionA24x24
|
|
43 |
|
|
44 |
^ToolbarIconLibrary versionA24x24
|
|
45 |
|
|
46 |
"Created: / 24-03-2010 / 20:49:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
47 |
!
|
|
48 |
|
|
49 |
versionB24x24
|
|
50 |
|
|
51 |
^ToolbarIconLibrary versionB24x24
|
|
52 |
|
|
53 |
"Created: / 24-03-2010 / 20:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
54 |
!
|
|
55 |
|
|
56 |
versionBase24x24
|
|
57 |
|
|
58 |
^ToolbarIconLibrary versionBase24x24
|
|
59 |
|
|
60 |
"Created: / 24-03-2010 / 20:50:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
61 |
! !
|
|
62 |
|
|
63 |
!TextDiffTool class methodsFor:'interface specs'!
|
|
64 |
|
|
65 |
diffSpec
|
|
66 |
"This resource specification was automatically generated
|
|
67 |
by the UIPainter of ST/X."
|
|
68 |
|
|
69 |
"Do not manually edit this!! If it is corrupted,
|
|
70 |
the UIPainter may not be able to read the specification."
|
|
71 |
|
|
72 |
"
|
|
73 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#diffSpec
|
|
74 |
Tools::TextDiffTool new openInterface:#diffSpec
|
|
75 |
"
|
|
76 |
|
|
77 |
<resource: #canvas>
|
|
78 |
|
|
79 |
^
|
|
80 |
#(FullSpec
|
|
81 |
name: diffSpec
|
|
82 |
window:
|
|
83 |
(WindowSpec
|
|
84 |
label: 'Text Diff Tool (for embedding)'
|
|
85 |
name: 'Text Diff Tool (for embedding)'
|
|
86 |
min: (Point 10 10)
|
|
87 |
bounds: (Rectangle 0 0 782 506)
|
|
88 |
)
|
|
89 |
component:
|
|
90 |
(SpecCollection
|
|
91 |
collection: (
|
|
92 |
(ViewSpec
|
|
93 |
name: '2Labels'
|
|
94 |
layout: (LayoutFrame 0 0 0 0 -16 1 30 0)
|
|
95 |
component:
|
|
96 |
(SpecCollection
|
|
97 |
collection: (
|
|
98 |
(UISubSpecification
|
|
99 |
name: 'VersionA'
|
|
100 |
layout: (LayoutFrame 0 0 0 0 0 0.5 30 0)
|
|
101 |
minorKey: versionALabelSpec
|
|
102 |
)
|
|
103 |
(UISubSpecification
|
|
104 |
name: 'VersionB'
|
|
105 |
layout: (LayoutFrame 5 0.5 0 0 0 1 30 0)
|
|
106 |
minorKey: versionBLabelSpec
|
|
107 |
)
|
|
108 |
)
|
|
109 |
|
|
110 |
)
|
|
111 |
)
|
|
112 |
(ArbitraryComponentSpec
|
|
113 |
name: 'Diff2TextView'
|
|
114 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
115 |
hasHorizontalScrollBar: false
|
|
116 |
hasVerticalScrollBar: false
|
|
117 |
autoHideScrollBars: false
|
|
118 |
hasBorder: false
|
|
119 |
component: #'Tools::DiffCodeView2'
|
|
120 |
postBuildCallback: postBuildDiffView:
|
|
121 |
)
|
|
122 |
)
|
|
123 |
|
|
124 |
)
|
|
125 |
)
|
|
126 |
!
|
|
127 |
|
|
128 |
windowSpec
|
|
129 |
"This resource specification was automatically generated
|
|
130 |
by the UIPainter of ST/X."
|
|
131 |
|
|
132 |
"Do not manually edit this!! If it is corrupted,
|
|
133 |
the UIPainter may not be able to read the specification."
|
|
134 |
|
|
135 |
"
|
|
136 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpec
|
|
137 |
Tools::TextDiffTool new openInterface:#windowSpec
|
|
138 |
Tools::TextDiffTool open
|
|
139 |
"
|
|
140 |
|
|
141 |
<resource: #canvas>
|
|
142 |
|
|
143 |
^
|
|
144 |
#(FullSpec
|
|
145 |
name: windowSpec
|
|
146 |
window:
|
|
147 |
(WindowSpec
|
|
148 |
label: 'Text Diff Tool'
|
|
149 |
name: 'Text Diff Tool'
|
|
150 |
min: (Point 10 10)
|
|
151 |
bounds: (Rectangle 0 0 640 480)
|
|
152 |
)
|
|
153 |
component:
|
|
154 |
(SpecCollection
|
|
155 |
collection: (
|
|
156 |
(UISubSpecification
|
|
157 |
name: 'Contents'
|
|
158 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
159 |
minorKey: windowSpecForEmbedding
|
|
160 |
)
|
|
161 |
)
|
|
162 |
|
|
163 |
)
|
|
164 |
)
|
|
165 |
|
|
166 |
"Modified: / 30-06-2011 / 20:45:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
167 |
!
|
|
168 |
|
|
169 |
windowSpecForEmbedding
|
|
170 |
"This resource specification was automatically generated
|
|
171 |
by the UIPainter of ST/X."
|
|
172 |
|
|
173 |
"Do not manually edit this!! If it is corrupted,
|
|
174 |
the UIPainter may not be able to read the specification."
|
|
175 |
|
|
176 |
"
|
|
177 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpecForEmbedding
|
|
178 |
Tools::TextDiffTool new openInterface:#windowSpecForEmbedding
|
|
179 |
"
|
|
180 |
|
|
181 |
<resource: #canvas>
|
|
182 |
|
|
183 |
^
|
|
184 |
#(FullSpec
|
|
185 |
name: windowSpecForEmbedding
|
|
186 |
window:
|
|
187 |
(WindowSpec
|
|
188 |
label: 'Text Diff Tool (for embedding)'
|
|
189 |
name: 'Text Diff Tool (for embedding)'
|
|
190 |
min: (Point 10 10)
|
|
191 |
bounds: (Rectangle 0 0 782 506)
|
|
192 |
)
|
|
193 |
component:
|
|
194 |
(SpecCollection
|
|
195 |
collection: (
|
|
196 |
(SubCanvasSpec
|
|
197 |
name: 'Contents'
|
|
198 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
199 |
hasHorizontalScrollBar: false
|
|
200 |
hasVerticalScrollBar: false
|
|
201 |
specHolder: diffSpecHolder
|
|
202 |
createNewBuilder: false
|
|
203 |
)
|
|
204 |
)
|
|
205 |
|
|
206 |
)
|
|
207 |
)
|
|
208 |
! !
|
|
209 |
|
|
210 |
!TextDiffTool class methodsFor:'interface specs - labels'!
|
|
211 |
|
|
212 |
versionALabelSpec
|
|
213 |
"This resource specification was automatically generated
|
|
214 |
by the UIPainter of ST/X."
|
|
215 |
|
|
216 |
"Do not manually edit this!! If it is corrupted,
|
|
217 |
the UIPainter may not be able to read the specification."
|
|
218 |
|
|
219 |
"
|
|
220 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionALabelSpec
|
|
221 |
SVN::DiffViewApp new openInterface:#versionALabelSpec
|
|
222 |
"
|
|
223 |
|
|
224 |
<resource: #canvas>
|
|
225 |
|
|
226 |
^
|
|
227 |
#(FullSpec
|
|
228 |
name: versionALabelSpec
|
|
229 |
window:
|
|
230 |
(WindowSpec
|
|
231 |
label: 'Version A'
|
|
232 |
name: 'Version A'
|
|
233 |
min: (Point 10 10)
|
|
234 |
bounds: (Rectangle 0 0 300 30)
|
|
235 |
)
|
|
236 |
component:
|
|
237 |
(SpecCollection
|
|
238 |
collection: (
|
|
239 |
(LabelSpec
|
|
240 |
label: 'versionA24x24'
|
|
241 |
name: 'VersionAIcon'
|
|
242 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
243 |
hasCharacterOrientedLabel: false
|
|
244 |
translateLabel: true
|
|
245 |
)
|
|
246 |
(LabelSpec
|
|
247 |
label: 'Version A'
|
|
248 |
name: 'VersionALabel'
|
|
249 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1)
|
|
250 |
translateLabel: true
|
|
251 |
labelChannel: labelAHolder
|
|
252 |
resizeForLabel: true
|
|
253 |
adjust: left
|
|
254 |
)
|
|
255 |
)
|
|
256 |
|
|
257 |
)
|
|
258 |
)
|
|
259 |
|
|
260 |
"Modified: / 30-06-2011 / 20:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
261 |
!
|
|
262 |
|
|
263 |
versionBLabelSpec
|
|
264 |
"This resource specification was automatically generated
|
|
265 |
by the UIPainter of ST/X."
|
|
266 |
|
|
267 |
"Do not manually edit this!! If it is corrupted,
|
|
268 |
the UIPainter may not be able to read the specification."
|
|
269 |
|
|
270 |
"
|
|
271 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBLabelSpec
|
|
272 |
SVN::DiffViewApp new openInterface:#versionBLabelSpec
|
|
273 |
"
|
|
274 |
|
|
275 |
<resource: #canvas>
|
|
276 |
|
|
277 |
^
|
|
278 |
#(FullSpec
|
|
279 |
name: versionBLabelSpec
|
|
280 |
window:
|
|
281 |
(WindowSpec
|
|
282 |
label: 'Version B'
|
|
283 |
name: 'Version B'
|
|
284 |
min: (Point 10 10)
|
|
285 |
bounds: (Rectangle 0 0 300 30)
|
|
286 |
)
|
|
287 |
component:
|
|
288 |
(SpecCollection
|
|
289 |
collection: (
|
|
290 |
(LabelSpec
|
|
291 |
label: 'versionB24x24'
|
|
292 |
name: 'VersionBIcon'
|
|
293 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
294 |
hasCharacterOrientedLabel: false
|
|
295 |
translateLabel: true
|
|
296 |
)
|
|
297 |
(LabelSpec
|
|
298 |
label: 'Version B'
|
|
299 |
name: 'VersionBLabel'
|
|
300 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1)
|
|
301 |
translateLabel: true
|
|
302 |
labelChannel: labelBHolder
|
|
303 |
resizeForLabel: true
|
|
304 |
adjust: left
|
|
305 |
useDynamicPreferredWidth: true
|
|
306 |
usePreferredWidth: true
|
|
307 |
)
|
|
308 |
)
|
|
309 |
|
|
310 |
)
|
|
311 |
)
|
|
312 |
|
|
313 |
"Modified: / 30-06-2011 / 20:53:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
314 |
!
|
|
315 |
|
|
316 |
versionBaseLabelSpec
|
|
317 |
"This resource specification was automatically generated
|
|
318 |
by the UIPainter of ST/X."
|
|
319 |
|
|
320 |
"Do not manually edit this!! If it is corrupted,
|
|
321 |
the UIPainter may not be able to read the specification."
|
|
322 |
|
|
323 |
"
|
|
324 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBaseLabelSpec
|
|
325 |
SVN::DiffViewApp new openInterface:#versionBaseLabelSpec
|
|
326 |
"
|
|
327 |
|
|
328 |
<resource: #canvas>
|
|
329 |
|
|
330 |
^
|
|
331 |
#(FullSpec
|
|
332 |
name: versionBaseLabelSpec
|
|
333 |
window:
|
|
334 |
(WindowSpec
|
|
335 |
label: 'Version Base'
|
|
336 |
name: 'Version Base'
|
|
337 |
min: (Point 10 10)
|
|
338 |
bounds: (Rectangle 0 0 300 30)
|
|
339 |
)
|
|
340 |
component:
|
|
341 |
(SpecCollection
|
|
342 |
collection: (
|
|
343 |
(LabelSpec
|
|
344 |
label: 'versionBase24x24'
|
|
345 |
name: 'VersionBaseIcon'
|
|
346 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
347 |
hasCharacterOrientedLabel: false
|
|
348 |
translateLabel: true
|
|
349 |
)
|
|
350 |
(LabelSpec
|
|
351 |
label: 'Version Base'
|
|
352 |
name: 'VersionBaseLabel'
|
|
353 |
layout: (LayoutFrame 30 0 5 0 191 0 0 1)
|
|
354 |
translateLabel: true
|
|
355 |
labelChannel: versionBaseLabelAspect
|
|
356 |
resizeForLabel: true
|
|
357 |
adjust: left
|
|
358 |
useDynamicPreferredWidth: true
|
|
359 |
usePreferredWidth: true
|
|
360 |
)
|
|
361 |
)
|
|
362 |
|
|
363 |
)
|
|
364 |
)
|
|
365 |
|
|
366 |
"Modified: / 24-03-2010 / 20:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
367 |
! !
|
|
368 |
|
|
369 |
!TextDiffTool class methodsFor:'plugIn spec'!
|
|
370 |
|
|
371 |
aspectSelectors
|
|
372 |
"This resource specification was automatically generated
|
|
373 |
by the UIPainter of ST/X."
|
|
374 |
|
|
375 |
"Do not manually edit this. If it is corrupted,
|
|
376 |
the UIPainter may not be able to read the specification."
|
|
377 |
|
|
378 |
"Return a description of exported aspects;
|
|
379 |
these can be connected to aspects of an embedding application
|
|
380 |
(if this app is embedded in a subCanvas)."
|
|
381 |
|
|
382 |
^ #(
|
|
383 |
#labelAHolder
|
|
384 |
#labelBHolder
|
|
385 |
#textAHolder
|
|
386 |
#textBHolder
|
|
387 |
).
|
|
388 |
|
|
389 |
! !
|
|
390 |
|
|
391 |
!TextDiffTool methodsFor:'aspects'!
|
|
392 |
|
|
393 |
diffSpecHolder
|
|
394 |
"return/create the 'diffSpecHolder' value holder (automatically generated)"
|
|
395 |
|
|
396 |
diffSpecHolder isNil ifTrue:[
|
|
397 |
diffSpecHolder := ValueHolder with: #diffSpec.
|
|
398 |
diffSpecHolder addDependent:self.
|
|
399 |
].
|
|
400 |
^ diffSpecHolder
|
|
401 |
|
|
402 |
"Modified: / 06-07-2011 / 11:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
403 |
!
|
|
404 |
|
|
405 |
diffSpecHolder:something
|
|
406 |
"set the 'diffSpecHolder' value holder (automatically generated)"
|
|
407 |
|
|
408 |
|oldValue newValue|
|
|
409 |
|
|
410 |
diffSpecHolder notNil ifTrue:[
|
|
411 |
oldValue := diffSpecHolder value.
|
|
412 |
diffSpecHolder removeDependent:self.
|
|
413 |
].
|
|
414 |
diffSpecHolder := something.
|
|
415 |
diffSpecHolder notNil ifTrue:[
|
|
416 |
diffSpecHolder addDependent:self.
|
|
417 |
].
|
|
418 |
newValue := diffSpecHolder value.
|
|
419 |
oldValue ~~ newValue ifTrue:[
|
|
420 |
self update:#value with:newValue from:diffSpecHolder.
|
|
421 |
].
|
|
422 |
!
|
|
423 |
|
|
424 |
labelAHolder
|
|
425 |
"return/create the 'labelAHolder' value holder (automatically generated)"
|
|
426 |
|
|
427 |
labelAHolder isNil ifTrue:[
|
|
428 |
labelAHolder := ValueHolder new.
|
|
429 |
labelAHolder addDependent:self.
|
|
430 |
].
|
|
431 |
^ labelAHolder
|
|
432 |
!
|
|
433 |
|
|
434 |
labelAHolder:something
|
|
435 |
"set the 'labelAHolder' value holder (automatically generated)"
|
|
436 |
|
|
437 |
|oldValue newValue|
|
|
438 |
|
|
439 |
labelAHolder notNil ifTrue:[
|
|
440 |
oldValue := labelAHolder value.
|
|
441 |
labelAHolder removeDependent:self.
|
|
442 |
].
|
|
443 |
labelAHolder := something.
|
|
444 |
labelAHolder notNil ifTrue:[
|
|
445 |
labelAHolder addDependent:self.
|
|
446 |
].
|
|
447 |
newValue := labelAHolder value.
|
|
448 |
oldValue ~~ newValue ifTrue:[
|
|
449 |
self update:#value with:newValue from:labelAHolder.
|
|
450 |
].
|
|
451 |
!
|
|
452 |
|
|
453 |
labelBHolder
|
|
454 |
"return/create the 'labelBHolder' value holder (automatically generated)"
|
|
455 |
|
|
456 |
labelBHolder isNil ifTrue:[
|
|
457 |
labelBHolder := ValueHolder new.
|
|
458 |
labelBHolder addDependent:self.
|
|
459 |
].
|
|
460 |
^ labelBHolder
|
|
461 |
!
|
|
462 |
|
|
463 |
labelBHolder:something
|
|
464 |
"set the 'labelBHolder' value holder (automatically generated)"
|
|
465 |
|
|
466 |
|oldValue newValue|
|
|
467 |
|
|
468 |
labelBHolder notNil ifTrue:[
|
|
469 |
oldValue := labelBHolder value.
|
|
470 |
labelBHolder removeDependent:self.
|
|
471 |
].
|
|
472 |
labelBHolder := something.
|
|
473 |
labelBHolder notNil ifTrue:[
|
|
474 |
labelBHolder addDependent:self.
|
|
475 |
].
|
|
476 |
newValue := labelBHolder value.
|
|
477 |
oldValue ~~ newValue ifTrue:[
|
|
478 |
self update:#value with:newValue from:labelBHolder.
|
|
479 |
].
|
|
480 |
!
|
|
481 |
|
|
482 |
showDiffHolder
|
|
483 |
"return/create the 'showDiffHolder' value holder (automatically generated)"
|
|
484 |
|
|
485 |
showDiffHolder isNil ifTrue:[
|
|
486 |
showDiffHolder := ValueHolder with: true.
|
|
487 |
showDiffHolder addDependent:self.
|
|
488 |
].
|
|
489 |
^ showDiffHolder
|
|
490 |
|
|
491 |
"Modified: / 30-06-2011 / 20:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
492 |
!
|
|
493 |
|
|
494 |
showDiffHolder:something
|
|
495 |
"set the 'showDiffHolder' value holder (automatically generated)"
|
|
496 |
|
|
497 |
|oldValue newValue|
|
|
498 |
|
|
499 |
showDiffHolder notNil ifTrue:[
|
|
500 |
oldValue := showDiffHolder value.
|
|
501 |
showDiffHolder removeDependent:self.
|
|
502 |
].
|
|
503 |
showDiffHolder := something.
|
|
504 |
showDiffHolder notNil ifTrue:[
|
|
505 |
showDiffHolder addDependent:self.
|
|
506 |
].
|
|
507 |
newValue := showDiffHolder value.
|
|
508 |
oldValue ~~ newValue ifTrue:[
|
|
509 |
self update:#value with:newValue from:showDiffHolder.
|
|
510 |
].
|
|
511 |
!
|
|
512 |
|
|
513 |
textAHolder
|
|
514 |
"return/create the 'textAHolder' value holder (automatically generated)"
|
|
515 |
|
|
516 |
textAHolder isNil ifTrue:[
|
|
517 |
textAHolder := ValueHolder new.
|
|
518 |
textAHolder addDependent:self.
|
|
519 |
].
|
|
520 |
^ textAHolder
|
|
521 |
!
|
|
522 |
|
|
523 |
textAHolder:something
|
|
524 |
"set the 'textAHolder' value holder (automatically generated)"
|
|
525 |
|
|
526 |
|oldValue newValue|
|
|
527 |
|
|
528 |
textAHolder notNil ifTrue:[
|
|
529 |
oldValue := textAHolder value.
|
|
530 |
textAHolder removeDependent:self.
|
|
531 |
].
|
|
532 |
textAHolder := something.
|
|
533 |
textAHolder notNil ifTrue:[
|
|
534 |
textAHolder addDependent:self.
|
|
535 |
].
|
|
536 |
newValue := textAHolder value.
|
|
537 |
oldValue ~~ newValue ifTrue:[
|
|
538 |
self update:#value with:newValue from:textAHolder.
|
|
539 |
].
|
|
540 |
!
|
|
541 |
|
|
542 |
textBHolder
|
|
543 |
"return/create the 'textBHolder' value holder (automatically generated)"
|
|
544 |
|
|
545 |
textBHolder isNil ifTrue:[
|
|
546 |
textBHolder := ValueHolder new.
|
|
547 |
textBHolder addDependent:self.
|
|
548 |
].
|
|
549 |
^ textBHolder
|
|
550 |
!
|
|
551 |
|
|
552 |
textBHolder:something
|
|
553 |
"set the 'textBHolder' value holder (automatically generated)"
|
|
554 |
|
|
555 |
|oldValue newValue|
|
|
556 |
|
|
557 |
textBHolder notNil ifTrue:[
|
|
558 |
oldValue := textBHolder value.
|
|
559 |
textBHolder removeDependent:self.
|
|
560 |
].
|
|
561 |
textBHolder := something.
|
|
562 |
textBHolder notNil ifTrue:[
|
|
563 |
textBHolder addDependent:self.
|
|
564 |
].
|
|
565 |
newValue := textBHolder value.
|
|
566 |
oldValue ~~ newValue ifTrue:[
|
|
567 |
self update:#value with:newValue from:textBHolder.
|
|
568 |
].
|
|
569 |
! !
|
|
570 |
|
|
571 |
!TextDiffTool methodsFor:'change & update'!
|
|
572 |
|
|
573 |
update:something with:aParameter from:changedObject
|
|
574 |
"Invoked when an object that I depend upon sends a change notification."
|
|
575 |
|
|
576 |
|
|
577 |
(changedObject == textAHolder or:[changedObject == textBHolder]) ifTrue:[
|
|
578 |
self updateAfterAorBChanged.
|
|
579 |
^ self.
|
|
580 |
].
|
|
581 |
super update:something with:aParameter from:changedObject
|
|
582 |
|
|
583 |
"Modified: / 06-07-2011 / 12:46:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
584 |
!
|
|
585 |
|
|
586 |
updateAfterAorBChanged
|
|
587 |
|
|
588 |
numChangedTexts := numChangedTexts + 1.
|
|
589 |
numChangedTexts >= 2 ifFalse:[^self].
|
|
590 |
numChangedTexts := 0.
|
|
591 |
|
|
592 |
diffView ifNil:[^self].
|
|
593 |
diffView scrolledView ifNil:[^self].
|
|
594 |
diffView scrolledView
|
|
595 |
text1: self textAHolder value
|
|
596 |
text2: self textBHolder value
|
|
597 |
|
|
598 |
"Created: / 06-07-2011 / 12:12:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
599 |
! !
|
|
600 |
|
|
601 |
!TextDiffTool methodsFor:'hooks'!
|
|
602 |
|
|
603 |
postBuildDiffView:aScrollableView
|
|
604 |
|
|
605 |
diffView := aScrollableView
|
|
606 |
|
|
607 |
"Created: / 30-06-2011 / 20:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
608 |
! !
|
|
609 |
|
|
610 |
!TextDiffTool methodsFor:'initialization'!
|
|
611 |
|
|
612 |
initialize
|
|
613 |
|
|
614 |
super initialize.
|
|
615 |
numChangedTexts := 0.
|
|
616 |
|
|
617 |
"Modified: / 06-07-2011 / 12:15:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
618 |
! !
|
|
619 |
|
|
620 |
!TextDiffTool class methodsFor:'documentation'!
|
|
621 |
|
|
622 |
version_CVS
|
|
623 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.1 2011-07-06 12:03:36 vrany Exp $'
|
|
624 |
!
|
|
625 |
|
|
626 |
version_SVN
|
|
627 |
^ '§Id§'
|
|
628 |
! !
|