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 |
"
|
10332
|
12 |
"{ Package: 'stx:libtool' }"
|
10196
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
ApplicationModel subclass:#TextDiffTool
|
10654
|
17 |
instanceVariableNames:'titleHolder labelAHolder textAHolder labelBHolder textBHolder
|
|
18 |
classHolder languageHolder codeAspectHolder showDiffHolder
|
|
19 |
diffSpecHolder diffView textAChanged textBChanged codeView'
|
10196
|
20 |
classVariableNames:''
|
|
21 |
poolDictionaries:''
|
|
22 |
category:'Interface-Diff'
|
|
23 |
!
|
|
24 |
|
|
25 |
!TextDiffTool class methodsFor:'documentation'!
|
|
26 |
|
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
30 |
All Rights Reserved
|
|
31 |
|
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
! !
|
|
40 |
|
|
41 |
!TextDiffTool class methodsFor:'image specs'!
|
|
42 |
|
|
43 |
versionA24x24
|
|
44 |
|
|
45 |
^ToolbarIconLibrary versionA24x24
|
|
46 |
|
|
47 |
"Created: / 24-03-2010 / 20:49:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
48 |
!
|
|
49 |
|
|
50 |
versionB24x24
|
|
51 |
|
|
52 |
^ToolbarIconLibrary versionB24x24
|
|
53 |
|
|
54 |
"Created: / 24-03-2010 / 20:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
55 |
!
|
|
56 |
|
|
57 |
versionBase24x24
|
|
58 |
|
|
59 |
^ToolbarIconLibrary versionBase24x24
|
|
60 |
|
|
61 |
"Created: / 24-03-2010 / 20:50:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
62 |
! !
|
|
63 |
|
|
64 |
!TextDiffTool class methodsFor:'interface specs'!
|
|
65 |
|
|
66 |
diffSpec
|
|
67 |
"This resource specification was automatically generated
|
|
68 |
by the UIPainter of ST/X."
|
|
69 |
|
|
70 |
"Do not manually edit this!! If it is corrupted,
|
|
71 |
the UIPainter may not be able to read the specification."
|
|
72 |
|
|
73 |
"
|
|
74 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#diffSpec
|
|
75 |
Tools::TextDiffTool new openInterface:#diffSpec
|
|
76 |
"
|
|
77 |
|
|
78 |
<resource: #canvas>
|
|
79 |
|
|
80 |
^
|
|
81 |
#(FullSpec
|
|
82 |
name: diffSpec
|
|
83 |
window:
|
|
84 |
(WindowSpec
|
|
85 |
label: 'Text Diff Tool (for embedding)'
|
|
86 |
name: 'Text Diff Tool (for embedding)'
|
|
87 |
min: (Point 10 10)
|
|
88 |
bounds: (Rectangle 0 0 782 506)
|
|
89 |
)
|
|
90 |
component:
|
|
91 |
(SpecCollection
|
|
92 |
collection: (
|
|
93 |
(ViewSpec
|
|
94 |
name: '2Labels'
|
|
95 |
layout: (LayoutFrame 0 0 0 0 -16 1 30 0)
|
|
96 |
component:
|
|
97 |
(SpecCollection
|
|
98 |
collection: (
|
|
99 |
(UISubSpecification
|
|
100 |
name: 'VersionA'
|
|
101 |
layout: (LayoutFrame 0 0 0 0 0 0.5 30 0)
|
|
102 |
minorKey: versionALabelSpec
|
|
103 |
)
|
|
104 |
(UISubSpecification
|
|
105 |
name: 'VersionB'
|
|
106 |
layout: (LayoutFrame 5 0.5 0 0 0 1 30 0)
|
|
107 |
minorKey: versionBLabelSpec
|
|
108 |
)
|
|
109 |
)
|
|
110 |
|
|
111 |
)
|
|
112 |
)
|
|
113 |
(ArbitraryComponentSpec
|
|
114 |
name: 'Diff2TextView'
|
|
115 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
116 |
hasHorizontalScrollBar: false
|
|
117 |
hasVerticalScrollBar: false
|
|
118 |
autoHideScrollBars: false
|
|
119 |
hasBorder: false
|
|
120 |
component: #'Tools::DiffCodeView2'
|
|
121 |
postBuildCallback: postBuildDiffView:
|
|
122 |
)
|
|
123 |
)
|
|
124 |
|
|
125 |
)
|
|
126 |
)
|
|
127 |
!
|
|
128 |
|
10344
|
129 |
nothingSpec
|
|
130 |
"This resource specification was automatically generated
|
|
131 |
by the UIPainter of ST/X."
|
|
132 |
|
|
133 |
"Do not manually edit this!! If it is corrupted,
|
|
134 |
the UIPainter may not be able to read the specification."
|
|
135 |
|
|
136 |
"
|
|
137 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#nothingSpec
|
|
138 |
Tools::TextDiffTool new openInterface:#nothingSpec
|
|
139 |
"
|
|
140 |
|
|
141 |
<resource: #canvas>
|
|
142 |
|
|
143 |
^
|
|
144 |
#(FullSpec
|
|
145 |
name: nothingSpec
|
|
146 |
window:
|
|
147 |
(WindowSpec
|
|
148 |
label: 'NewApplication'
|
|
149 |
name: 'NewApplication'
|
|
150 |
bounds: (Rectangle 0 0 300 300)
|
|
151 |
)
|
|
152 |
component:
|
|
153 |
(SpecCollection
|
|
154 |
collection: (
|
|
155 |
(LabelSpec
|
|
156 |
label: 'Nothing selected...'
|
|
157 |
name: 'Label1'
|
|
158 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
159 |
translateLabel: true
|
|
160 |
)
|
|
161 |
)
|
|
162 |
|
|
163 |
)
|
|
164 |
)
|
|
165 |
!
|
|
166 |
|
10332
|
167 |
textViewSpec
|
|
168 |
"This resource specification was automatically generated
|
|
169 |
by the UIPainter of ST/X."
|
|
170 |
|
|
171 |
"Do not manually edit this!! If it is corrupted,
|
|
172 |
the UIPainter may not be able to read the specification."
|
|
173 |
|
|
174 |
"
|
|
175 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#textViewSpec
|
|
176 |
Tools::TextDiffTool new openInterface:#textViewSpec
|
|
177 |
"
|
|
178 |
|
|
179 |
<resource: #canvas>
|
|
180 |
|
|
181 |
^
|
|
182 |
#(FullSpec
|
|
183 |
name: 'textViewSpec'
|
|
184 |
window:
|
|
185 |
(WindowSpec
|
|
186 |
label: 'Text Only'
|
|
187 |
name: 'Text Only'
|
|
188 |
min: (Point 10 10)
|
|
189 |
bounds: (Rectangle 0 0 782 506)
|
|
190 |
)
|
|
191 |
component:
|
|
192 |
(SpecCollection
|
|
193 |
collection: (
|
|
194 |
(ArbitraryComponentSpec
|
|
195 |
name: 'CodeView'
|
|
196 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
197 |
model: textAHolder
|
|
198 |
hasHorizontalScrollBar: false
|
|
199 |
hasVerticalScrollBar: false
|
|
200 |
autoHideScrollBars: false
|
|
201 |
hasBorder: false
|
|
202 |
component: #'Tools::CodeView2'
|
|
203 |
postBuildCallback: postBuildCodeView:
|
|
204 |
)
|
|
205 |
)
|
|
206 |
|
|
207 |
)
|
|
208 |
)
|
|
209 |
!
|
|
210 |
|
|
211 |
versionAOnlySpec
|
|
212 |
"This resource specification was automatically generated
|
|
213 |
by the UIPainter of ST/X."
|
|
214 |
|
|
215 |
"Do not manually edit this!! If it is corrupted,
|
|
216 |
the UIPainter may not be able to read the specification."
|
|
217 |
|
|
218 |
"
|
|
219 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#versionAOnlySpec
|
|
220 |
Tools::TextDiffTool new openInterface:#versionAOnlySpec
|
|
221 |
"
|
|
222 |
|
|
223 |
<resource: #canvas>
|
|
224 |
|
|
225 |
^
|
|
226 |
#(FullSpec
|
|
227 |
name: versionAOnlySpec
|
|
228 |
window:
|
|
229 |
(WindowSpec
|
|
230 |
label: 'Version A Only'
|
|
231 |
name: 'Version A Only'
|
|
232 |
min: (Point 10 10)
|
|
233 |
bounds: (Rectangle 0 0 782 506)
|
|
234 |
)
|
|
235 |
component:
|
|
236 |
(SpecCollection
|
|
237 |
collection: (
|
|
238 |
(UISubSpecification
|
|
239 |
name: 'VersionA'
|
|
240 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
241 |
minorKey: versionALabelSpec
|
|
242 |
)
|
|
243 |
(UISubSpecification
|
|
244 |
name: 'Text'
|
|
245 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
246 |
minorKey: textViewSpec
|
|
247 |
)
|
|
248 |
)
|
|
249 |
|
|
250 |
)
|
|
251 |
)
|
|
252 |
!
|
|
253 |
|
|
254 |
versionBOnlySpec
|
|
255 |
"This resource specification was automatically generated
|
|
256 |
by the UIPainter of ST/X."
|
|
257 |
|
|
258 |
"Do not manually edit this!! If it is corrupted,
|
|
259 |
the UIPainter may not be able to read the specification."
|
|
260 |
|
|
261 |
"
|
|
262 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#versionBOnlySpec
|
|
263 |
Tools::TextDiffTool new openInterface:#versionBOnlySpec
|
|
264 |
"
|
|
265 |
|
|
266 |
<resource: #canvas>
|
|
267 |
|
|
268 |
^
|
|
269 |
#(FullSpec
|
|
270 |
name: 'versionBOnlySpec'
|
|
271 |
window:
|
|
272 |
(WindowSpec
|
|
273 |
label: 'Version B Only'
|
|
274 |
name: 'Version B Only'
|
|
275 |
min: (Point 10 10)
|
|
276 |
bounds: (Rectangle 0 0 782 506)
|
|
277 |
)
|
|
278 |
component:
|
|
279 |
(SpecCollection
|
|
280 |
collection: (
|
|
281 |
(UISubSpecification
|
|
282 |
name: 'VersionB'
|
|
283 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
284 |
minorKey: versionBLabelSpec
|
|
285 |
)
|
|
286 |
(UISubSpecification
|
|
287 |
name: 'Text'
|
|
288 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
289 |
minorKey: textViewSpec
|
|
290 |
)
|
|
291 |
)
|
|
292 |
|
|
293 |
)
|
|
294 |
)
|
|
295 |
|
|
296 |
"Created: / 19-07-2011 / 10:06:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
297 |
!
|
|
298 |
|
10196
|
299 |
windowSpec
|
|
300 |
"This resource specification was automatically generated
|
|
301 |
by the UIPainter of ST/X."
|
|
302 |
|
|
303 |
"Do not manually edit this!! If it is corrupted,
|
|
304 |
the UIPainter may not be able to read the specification."
|
|
305 |
|
|
306 |
"
|
|
307 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpec
|
|
308 |
Tools::TextDiffTool new openInterface:#windowSpec
|
|
309 |
Tools::TextDiffTool open
|
|
310 |
"
|
|
311 |
|
|
312 |
<resource: #canvas>
|
|
313 |
|
|
314 |
^
|
|
315 |
#(FullSpec
|
|
316 |
name: windowSpec
|
|
317 |
window:
|
|
318 |
(WindowSpec
|
|
319 |
label: 'Text Diff Tool'
|
|
320 |
name: 'Text Diff Tool'
|
10654
|
321 |
labelChannel: titleHolder
|
10196
|
322 |
min: (Point 10 10)
|
|
323 |
bounds: (Rectangle 0 0 640 480)
|
|
324 |
)
|
|
325 |
component:
|
|
326 |
(SpecCollection
|
|
327 |
collection: (
|
|
328 |
(UISubSpecification
|
|
329 |
name: 'Contents'
|
|
330 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
331 |
minorKey: windowSpecForEmbedding
|
|
332 |
)
|
|
333 |
)
|
|
334 |
|
|
335 |
)
|
|
336 |
)
|
|
337 |
!
|
|
338 |
|
|
339 |
windowSpecForEmbedding
|
|
340 |
"This resource specification was automatically generated
|
|
341 |
by the UIPainter of ST/X."
|
|
342 |
|
|
343 |
"Do not manually edit this!! If it is corrupted,
|
|
344 |
the UIPainter may not be able to read the specification."
|
|
345 |
|
|
346 |
"
|
|
347 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpecForEmbedding
|
|
348 |
Tools::TextDiffTool new openInterface:#windowSpecForEmbedding
|
|
349 |
"
|
|
350 |
|
|
351 |
<resource: #canvas>
|
|
352 |
|
|
353 |
^
|
|
354 |
#(FullSpec
|
|
355 |
name: windowSpecForEmbedding
|
|
356 |
window:
|
|
357 |
(WindowSpec
|
|
358 |
label: 'Text Diff Tool (for embedding)'
|
|
359 |
name: 'Text Diff Tool (for embedding)'
|
|
360 |
min: (Point 10 10)
|
|
361 |
bounds: (Rectangle 0 0 782 506)
|
|
362 |
)
|
|
363 |
component:
|
|
364 |
(SpecCollection
|
|
365 |
collection: (
|
|
366 |
(SubCanvasSpec
|
|
367 |
name: 'Contents'
|
|
368 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
369 |
hasHorizontalScrollBar: false
|
|
370 |
hasVerticalScrollBar: false
|
|
371 |
specHolder: diffSpecHolder
|
|
372 |
createNewBuilder: false
|
|
373 |
)
|
|
374 |
)
|
|
375 |
|
|
376 |
)
|
|
377 |
)
|
|
378 |
! !
|
|
379 |
|
|
380 |
!TextDiffTool class methodsFor:'interface specs - labels'!
|
|
381 |
|
|
382 |
versionALabelSpec
|
|
383 |
"This resource specification was automatically generated
|
|
384 |
by the UIPainter of ST/X."
|
|
385 |
|
|
386 |
"Do not manually edit this!! If it is corrupted,
|
|
387 |
the UIPainter may not be able to read the specification."
|
|
388 |
|
|
389 |
"
|
|
390 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionALabelSpec
|
|
391 |
SVN::DiffViewApp new openInterface:#versionALabelSpec
|
|
392 |
"
|
|
393 |
|
|
394 |
<resource: #canvas>
|
|
395 |
|
|
396 |
^
|
|
397 |
#(FullSpec
|
|
398 |
name: versionALabelSpec
|
|
399 |
window:
|
|
400 |
(WindowSpec
|
|
401 |
label: 'Version A'
|
|
402 |
name: 'Version A'
|
|
403 |
min: (Point 10 10)
|
|
404 |
bounds: (Rectangle 0 0 300 30)
|
|
405 |
)
|
|
406 |
component:
|
|
407 |
(SpecCollection
|
|
408 |
collection: (
|
|
409 |
(LabelSpec
|
|
410 |
label: 'versionA24x24'
|
|
411 |
name: 'VersionAIcon'
|
|
412 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
413 |
hasCharacterOrientedLabel: false
|
|
414 |
translateLabel: true
|
|
415 |
)
|
|
416 |
(LabelSpec
|
|
417 |
label: 'Version A'
|
|
418 |
name: 'VersionALabel'
|
|
419 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1)
|
|
420 |
translateLabel: true
|
|
421 |
labelChannel: labelAHolder
|
|
422 |
resizeForLabel: true
|
|
423 |
adjust: left
|
|
424 |
)
|
|
425 |
)
|
|
426 |
|
|
427 |
)
|
|
428 |
)
|
|
429 |
|
|
430 |
"Modified: / 30-06-2011 / 20:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
431 |
!
|
|
432 |
|
|
433 |
versionBLabelSpec
|
|
434 |
"This resource specification was automatically generated
|
|
435 |
by the UIPainter of ST/X."
|
|
436 |
|
|
437 |
"Do not manually edit this!! If it is corrupted,
|
|
438 |
the UIPainter may not be able to read the specification."
|
|
439 |
|
|
440 |
"
|
|
441 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBLabelSpec
|
|
442 |
SVN::DiffViewApp new openInterface:#versionBLabelSpec
|
|
443 |
"
|
|
444 |
|
|
445 |
<resource: #canvas>
|
|
446 |
|
|
447 |
^
|
|
448 |
#(FullSpec
|
|
449 |
name: versionBLabelSpec
|
|
450 |
window:
|
|
451 |
(WindowSpec
|
|
452 |
label: 'Version B'
|
|
453 |
name: 'Version B'
|
|
454 |
min: (Point 10 10)
|
|
455 |
bounds: (Rectangle 0 0 300 30)
|
|
456 |
)
|
|
457 |
component:
|
|
458 |
(SpecCollection
|
|
459 |
collection: (
|
|
460 |
(LabelSpec
|
|
461 |
label: 'versionB24x24'
|
|
462 |
name: 'VersionBIcon'
|
|
463 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
464 |
hasCharacterOrientedLabel: false
|
|
465 |
translateLabel: true
|
|
466 |
)
|
|
467 |
(LabelSpec
|
|
468 |
label: 'Version B'
|
|
469 |
name: 'VersionBLabel'
|
|
470 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1)
|
|
471 |
translateLabel: true
|
|
472 |
labelChannel: labelBHolder
|
|
473 |
resizeForLabel: true
|
|
474 |
adjust: left
|
|
475 |
useDynamicPreferredWidth: true
|
|
476 |
usePreferredWidth: true
|
|
477 |
)
|
|
478 |
)
|
|
479 |
|
|
480 |
)
|
|
481 |
)
|
|
482 |
|
|
483 |
"Modified: / 30-06-2011 / 20:53:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
484 |
!
|
|
485 |
|
|
486 |
versionBaseLabelSpec
|
|
487 |
"This resource specification was automatically generated
|
|
488 |
by the UIPainter of ST/X."
|
|
489 |
|
|
490 |
"Do not manually edit this!! If it is corrupted,
|
|
491 |
the UIPainter may not be able to read the specification."
|
|
492 |
|
|
493 |
"
|
|
494 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBaseLabelSpec
|
|
495 |
SVN::DiffViewApp new openInterface:#versionBaseLabelSpec
|
|
496 |
"
|
|
497 |
|
|
498 |
<resource: #canvas>
|
|
499 |
|
|
500 |
^
|
|
501 |
#(FullSpec
|
|
502 |
name: versionBaseLabelSpec
|
|
503 |
window:
|
|
504 |
(WindowSpec
|
|
505 |
label: 'Version Base'
|
|
506 |
name: 'Version Base'
|
|
507 |
min: (Point 10 10)
|
|
508 |
bounds: (Rectangle 0 0 300 30)
|
|
509 |
)
|
|
510 |
component:
|
|
511 |
(SpecCollection
|
|
512 |
collection: (
|
|
513 |
(LabelSpec
|
|
514 |
label: 'versionBase24x24'
|
|
515 |
name: 'VersionBaseIcon'
|
|
516 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5)
|
|
517 |
hasCharacterOrientedLabel: false
|
|
518 |
translateLabel: true
|
|
519 |
)
|
|
520 |
(LabelSpec
|
|
521 |
label: 'Version Base'
|
|
522 |
name: 'VersionBaseLabel'
|
|
523 |
layout: (LayoutFrame 30 0 5 0 191 0 0 1)
|
|
524 |
translateLabel: true
|
|
525 |
labelChannel: versionBaseLabelAspect
|
|
526 |
resizeForLabel: true
|
|
527 |
adjust: left
|
|
528 |
useDynamicPreferredWidth: true
|
|
529 |
usePreferredWidth: true
|
|
530 |
)
|
|
531 |
)
|
|
532 |
|
|
533 |
)
|
|
534 |
)
|
|
535 |
|
|
536 |
"Modified: / 24-03-2010 / 20:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
537 |
! !
|
|
538 |
|
|
539 |
!TextDiffTool class methodsFor:'plugIn spec'!
|
|
540 |
|
|
541 |
aspectSelectors
|
|
542 |
"This resource specification was automatically generated
|
|
543 |
by the UIPainter of ST/X."
|
|
544 |
|
|
545 |
"Do not manually edit this. If it is corrupted,
|
|
546 |
the UIPainter may not be able to read the specification."
|
|
547 |
|
|
548 |
"Return a description of exported aspects;
|
|
549 |
these can be connected to aspects of an embedding application
|
|
550 |
(if this app is embedded in a subCanvas)."
|
|
551 |
|
|
552 |
^ #(
|
10654
|
553 |
#classHolder
|
|
554 |
#codeAspectHolder
|
10196
|
555 |
#labelAHolder
|
|
556 |
#labelBHolder
|
10654
|
557 |
#languageHolder
|
|
558 |
#showDiffHolder
|
10196
|
559 |
#textAHolder
|
|
560 |
#textBHolder
|
|
561 |
).
|
|
562 |
|
10654
|
563 |
! !
|
|
564 |
|
|
565 |
!TextDiffTool methodsFor:'accessing'!
|
|
566 |
|
|
567 |
labelA: aString
|
|
568 |
^self labelAHolder value: aString
|
|
569 |
|
|
570 |
"Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
571 |
"Created: / 30-08-2011 / 09:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
572 |
"Modified (format): / 27-07-2012 / 21:57:10 / cg"
|
10654
|
573 |
!
|
|
574 |
|
|
575 |
labelB: aString
|
|
576 |
^self labelBHolder value: aString
|
|
577 |
|
|
578 |
"Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
579 |
"Created: / 30-08-2011 / 09:42:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
580 |
"Modified (format): / 27-07-2012 / 21:57:15 / cg"
|
10654
|
581 |
!
|
|
582 |
|
|
583 |
textA: aString
|
|
584 |
^self textAHolder value: aString
|
|
585 |
|
|
586 |
"Created: / 30-08-2011 / 09:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
587 |
"Modified (format): / 27-07-2012 / 21:57:37 / cg"
|
10654
|
588 |
!
|
|
589 |
|
|
590 |
textB: aString
|
|
591 |
^self textBHolder value: aString
|
|
592 |
|
|
593 |
"Created: / 30-08-2011 / 09:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
594 |
"Modified (format): / 27-07-2012 / 21:57:41 / cg"
|
10654
|
595 |
!
|
|
596 |
|
|
597 |
title: aString
|
|
598 |
|
|
599 |
^self titleHolder value: aString
|
|
600 |
|
|
601 |
"Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
602 |
"Created: / 30-08-2011 / 09:45:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
603 |
! !
|
|
604 |
|
|
605 |
!TextDiffTool methodsFor:'aspects'!
|
|
606 |
|
10332
|
607 |
classHolder
|
|
608 |
"return/create the 'classHolder' value holder (automatically generated)"
|
|
609 |
|
|
610 |
classHolder isNil ifTrue:[
|
|
611 |
classHolder := ValueHolder new.
|
|
612 |
].
|
|
613 |
^ classHolder
|
|
614 |
!
|
|
615 |
|
|
616 |
classHolder: aValueHolder
|
|
617 |
classHolder := aValueHolder.
|
|
618 |
codeView notNil ifTrue:[codeView classHolder: aValueHolder].
|
|
619 |
diffView notNil ifTrue:[diffView classHolder: aValueHolder].
|
|
620 |
|
|
621 |
"Modified: / 19-07-2011 / 12:54:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
622 |
"Modified (format): / 27-07-2012 / 21:57:00 / cg"
|
10332
|
623 |
!
|
|
624 |
|
10344
|
625 |
codeAspectHolder
|
|
626 |
"return/create the 'codeAspectHolder' value holder (automatically generated)"
|
|
627 |
|
|
628 |
codeAspectHolder isNil ifTrue:[
|
|
629 |
codeAspectHolder := ValueHolder with: #expression.
|
|
630 |
].
|
|
631 |
^ codeAspectHolder
|
|
632 |
|
|
633 |
"Modified: / 19-07-2011 / 19:07:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
634 |
!
|
|
635 |
|
|
636 |
codeAspectHolder:something
|
|
637 |
"set the 'codeAspectHolder' value holder (automatically generated)"
|
|
638 |
|
|
639 |
codeAspectHolder := something.
|
|
640 |
!
|
|
641 |
|
10196
|
642 |
diffSpecHolder
|
|
643 |
"return/create the 'diffSpecHolder' value holder (automatically generated)"
|
|
644 |
|
|
645 |
diffSpecHolder isNil ifTrue:[
|
|
646 |
diffSpecHolder := ValueHolder with: #diffSpec.
|
|
647 |
diffSpecHolder addDependent:self.
|
|
648 |
].
|
|
649 |
^ diffSpecHolder
|
|
650 |
|
|
651 |
"Modified: / 06-07-2011 / 11:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
652 |
!
|
|
653 |
|
|
654 |
diffSpecHolder:something
|
|
655 |
"set the 'diffSpecHolder' value holder (automatically generated)"
|
|
656 |
|
|
657 |
|oldValue newValue|
|
|
658 |
|
|
659 |
diffSpecHolder notNil ifTrue:[
|
|
660 |
oldValue := diffSpecHolder value.
|
|
661 |
diffSpecHolder removeDependent:self.
|
|
662 |
].
|
|
663 |
diffSpecHolder := something.
|
|
664 |
diffSpecHolder notNil ifTrue:[
|
|
665 |
diffSpecHolder addDependent:self.
|
|
666 |
].
|
|
667 |
newValue := diffSpecHolder value.
|
|
668 |
oldValue ~~ newValue ifTrue:[
|
|
669 |
self update:#value with:newValue from:diffSpecHolder.
|
|
670 |
].
|
|
671 |
!
|
|
672 |
|
|
673 |
labelAHolder
|
|
674 |
"return/create the 'labelAHolder' value holder (automatically generated)"
|
|
675 |
|
|
676 |
labelAHolder isNil ifTrue:[
|
10332
|
677 |
labelAHolder := ValueHolder with:'Version A'.
|
10196
|
678 |
labelAHolder addDependent:self.
|
|
679 |
].
|
|
680 |
^ labelAHolder
|
10332
|
681 |
|
|
682 |
"Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
683 |
!
|
|
684 |
|
|
685 |
labelAHolder:something
|
|
686 |
"set the 'labelAHolder' value holder (automatically generated)"
|
|
687 |
|
|
688 |
|oldValue newValue|
|
|
689 |
|
|
690 |
labelAHolder notNil ifTrue:[
|
|
691 |
oldValue := labelAHolder value.
|
|
692 |
labelAHolder removeDependent:self.
|
|
693 |
].
|
|
694 |
labelAHolder := something.
|
|
695 |
labelAHolder notNil ifTrue:[
|
|
696 |
labelAHolder addDependent:self.
|
|
697 |
].
|
|
698 |
newValue := labelAHolder value.
|
|
699 |
oldValue ~~ newValue ifTrue:[
|
|
700 |
self update:#value with:newValue from:labelAHolder.
|
|
701 |
].
|
|
702 |
!
|
|
703 |
|
|
704 |
labelBHolder
|
|
705 |
"return/create the 'labelBHolder' value holder (automatically generated)"
|
|
706 |
|
|
707 |
labelBHolder isNil ifTrue:[
|
10332
|
708 |
labelBHolder := ValueHolder with:'Version B'.
|
10196
|
709 |
labelBHolder addDependent:self.
|
|
710 |
].
|
|
711 |
^ labelBHolder
|
10332
|
712 |
|
|
713 |
"Modified: / 19-07-2011 / 11:42:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
714 |
!
|
|
715 |
|
|
716 |
labelBHolder:something
|
|
717 |
"set the 'labelBHolder' value holder (automatically generated)"
|
|
718 |
|
|
719 |
|oldValue newValue|
|
|
720 |
|
|
721 |
labelBHolder notNil ifTrue:[
|
|
722 |
oldValue := labelBHolder value.
|
|
723 |
labelBHolder removeDependent:self.
|
|
724 |
].
|
|
725 |
labelBHolder := something.
|
|
726 |
labelBHolder notNil ifTrue:[
|
|
727 |
labelBHolder addDependent:self.
|
|
728 |
].
|
|
729 |
newValue := labelBHolder value.
|
|
730 |
oldValue ~~ newValue ifTrue:[
|
|
731 |
self update:#value with:newValue from:labelBHolder.
|
|
732 |
].
|
|
733 |
!
|
|
734 |
|
10332
|
735 |
languageHolder
|
|
736 |
"return/create the 'languageHolder' value holder (automatically generated)"
|
|
737 |
|
|
738 |
languageHolder isNil ifTrue:[
|
|
739 |
languageHolder := ValueHolder new.
|
|
740 |
].
|
|
741 |
^ languageHolder
|
|
742 |
!
|
|
743 |
|
|
744 |
languageHolder:aValueHolder
|
|
745 |
|
|
746 |
languageHolder := aValueHolder.
|
|
747 |
codeView notNil ifTrue:[codeView languageHolder: aValueHolder].
|
|
748 |
diffView notNil ifTrue:[diffView languageHolder: aValueHolder].
|
|
749 |
|
|
750 |
"Modified: / 19-07-2011 / 12:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
751 |
!
|
|
752 |
|
10196
|
753 |
showDiffHolder
|
|
754 |
"return/create the 'showDiffHolder' value holder (automatically generated)"
|
|
755 |
|
|
756 |
showDiffHolder isNil ifTrue:[
|
|
757 |
showDiffHolder := ValueHolder with: true.
|
|
758 |
showDiffHolder addDependent:self.
|
|
759 |
].
|
|
760 |
^ showDiffHolder
|
|
761 |
|
|
762 |
"Modified: / 30-06-2011 / 20:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
763 |
!
|
|
764 |
|
|
765 |
showDiffHolder:something
|
|
766 |
"set the 'showDiffHolder' value holder (automatically generated)"
|
|
767 |
|
|
768 |
|oldValue newValue|
|
|
769 |
|
|
770 |
showDiffHolder notNil ifTrue:[
|
|
771 |
oldValue := showDiffHolder value.
|
|
772 |
showDiffHolder removeDependent:self.
|
|
773 |
].
|
|
774 |
showDiffHolder := something.
|
|
775 |
showDiffHolder notNil ifTrue:[
|
|
776 |
showDiffHolder addDependent:self.
|
|
777 |
].
|
|
778 |
newValue := showDiffHolder value.
|
|
779 |
oldValue ~~ newValue ifTrue:[
|
|
780 |
self update:#value with:newValue from:showDiffHolder.
|
|
781 |
].
|
|
782 |
!
|
|
783 |
|
|
784 |
textAHolder
|
|
785 |
"return/create the 'textAHolder' value holder (automatically generated)"
|
|
786 |
|
|
787 |
textAHolder isNil ifTrue:[
|
|
788 |
textAHolder := ValueHolder new.
|
|
789 |
textAHolder addDependent:self.
|
|
790 |
].
|
|
791 |
^ textAHolder
|
|
792 |
!
|
|
793 |
|
|
794 |
textAHolder:something
|
|
795 |
"set the 'textAHolder' value holder (automatically generated)"
|
|
796 |
|
|
797 |
|oldValue newValue|
|
|
798 |
|
|
799 |
textAHolder notNil ifTrue:[
|
|
800 |
oldValue := textAHolder value.
|
|
801 |
textAHolder removeDependent:self.
|
|
802 |
].
|
|
803 |
textAHolder := something.
|
|
804 |
textAHolder notNil ifTrue:[
|
|
805 |
textAHolder addDependent:self.
|
|
806 |
].
|
|
807 |
newValue := textAHolder value.
|
|
808 |
oldValue ~~ newValue ifTrue:[
|
|
809 |
self update:#value with:newValue from:textAHolder.
|
|
810 |
].
|
|
811 |
!
|
|
812 |
|
|
813 |
textBHolder
|
|
814 |
"return/create the 'textBHolder' value holder (automatically generated)"
|
|
815 |
|
|
816 |
textBHolder isNil ifTrue:[
|
|
817 |
textBHolder := ValueHolder new.
|
|
818 |
textBHolder addDependent:self.
|
|
819 |
].
|
|
820 |
^ textBHolder
|
|
821 |
!
|
|
822 |
|
|
823 |
textBHolder:something
|
|
824 |
"set the 'textBHolder' value holder (automatically generated)"
|
|
825 |
|
|
826 |
|oldValue newValue|
|
|
827 |
|
|
828 |
textBHolder notNil ifTrue:[
|
|
829 |
oldValue := textBHolder value.
|
|
830 |
textBHolder removeDependent:self.
|
|
831 |
].
|
|
832 |
textBHolder := something.
|
|
833 |
textBHolder notNil ifTrue:[
|
|
834 |
textBHolder addDependent:self.
|
|
835 |
].
|
|
836 |
newValue := textBHolder value.
|
|
837 |
oldValue ~~ newValue ifTrue:[
|
|
838 |
self update:#value with:newValue from:textBHolder.
|
|
839 |
].
|
10654
|
840 |
!
|
|
841 |
|
|
842 |
titleHolder
|
|
843 |
"return/create the 'labelAHolder' value holder (automatically generated)"
|
|
844 |
|
|
845 |
titleHolder isNil ifTrue:[
|
|
846 |
titleHolder := ValueHolder with:'Text diff'.
|
|
847 |
"/titleHolder addDependent:self.
|
|
848 |
].
|
|
849 |
^ titleHolder
|
|
850 |
|
|
851 |
"Created: / 30-08-2011 / 09:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
852 |
! !
|
|
853 |
|
|
854 |
!TextDiffTool methodsFor:'change & update'!
|
|
855 |
|
10344
|
856 |
codeAspect
|
|
857 |
^self codeAspectHolder value
|
|
858 |
|
|
859 |
"Created: / 19-07-2011 / 19:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
860 |
"Modified (format): / 27-07-2012 / 21:56:52 / cg"
|
|
861 |
!
|
|
862 |
|
|
863 |
codeAspect:aSymbol
|
|
864 |
self codeAspectHolder value:aSymbol
|
|
865 |
|
|
866 |
"Created: / 19-07-2011 / 19:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
867 |
"Created: / 27-07-2012 / 21:56:48 / cg"
|
10344
|
868 |
!
|
|
869 |
|
10196
|
870 |
update:something with:aParameter from:changedObject
|
|
871 |
"Invoked when an object that I depend upon sends a change notification."
|
|
872 |
|
|
873 |
|
10344
|
874 |
changedObject == textAHolder ifTrue:[
|
|
875 |
textAChanged := true.
|
10332
|
876 |
self updateAfterAorBChanged.
|
|
877 |
^ self.
|
|
878 |
].
|
10344
|
879 |
changedObject == textBHolder ifTrue:[
|
|
880 |
textBChanged := true.
|
|
881 |
self updateAfterAorBChanged.
|
|
882 |
^ self.
|
|
883 |
].
|
|
884 |
|
10332
|
885 |
(changedObject == showDiffHolder) ifTrue:[
|
|
886 |
self updateViews.
|
|
887 |
^self.
|
|
888 |
].
|
10196
|
889 |
super update:something with:aParameter from:changedObject
|
|
890 |
|
10344
|
891 |
"Modified: / 19-07-2011 / 19:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
892 |
!
|
|
893 |
|
|
894 |
updateAfterAorBChanged
|
|
895 |
|
10344
|
896 |
(textAChanged & textBChanged) ifTrue:[
|
|
897 |
textAChanged := textBChanged := false.
|
|
898 |
self updateViews
|
|
899 |
].
|
10196
|
900 |
|
|
901 |
"Created: / 06-07-2011 / 12:12:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10332
|
902 |
!
|
|
903 |
|
|
904 |
updateViews
|
|
905 |
|
|
906 |
| a b |
|
|
907 |
a := self textAHolder value.
|
|
908 |
b := self textBHolder value.
|
|
909 |
|
|
910 |
self showDiffHolder value ifFalse:[
|
|
911 |
self showTextOnly.
|
|
912 |
^ self
|
|
913 |
].
|
|
914 |
|
|
915 |
(a notNil and:[b notNil]) ifTrue:[
|
|
916 |
self showDiff.
|
|
917 |
^self
|
|
918 |
].
|
|
919 |
a notNil ifTrue:[
|
|
920 |
self showVersionA.
|
|
921 |
^self
|
|
922 |
].
|
|
923 |
b notNil ifTrue:[
|
|
924 |
self showVersionB.
|
|
925 |
^self
|
|
926 |
].
|
|
927 |
|
10344
|
928 |
self showNothing.
|
10332
|
929 |
|
|
930 |
"Created: / 19-07-2011 / 11:29:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10196
|
931 |
! !
|
|
932 |
|
|
933 |
!TextDiffTool methodsFor:'hooks'!
|
|
934 |
|
10332
|
935 |
postBuildCodeView:aScrollableView
|
10344
|
936 |
codeView := aScrollableView.
|
|
937 |
codeView notNil ifTrue:[codeView languageHolder: self languageHolder].
|
|
938 |
codeView notNil ifTrue:[codeView classHolder: self classHolder].
|
10332
|
939 |
|
|
940 |
"Created: / 19-07-2011 / 10:17:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
941 |
"Modified (format): / 27-07-2012 / 21:57:23 / cg"
|
10332
|
942 |
!
|
|
943 |
|
10196
|
944 |
postBuildDiffView:aScrollableView
|
10344
|
945 |
diffView := aScrollableView.
|
10654
|
946 |
diffView notNil ifTrue:[
|
|
947 |
diffView languageHolder: self languageHolder.
|
|
948 |
diffView classHolder: self classHolder.
|
|
949 |
|
|
950 |
(self textAHolder value notNil and:[self textBHolder value notNil]) ifTrue:[
|
|
951 |
diffView scrolledView
|
|
952 |
text1: self textAHolder value
|
|
953 |
text2: self textBHolder value
|
|
954 |
]
|
|
955 |
].
|
10196
|
956 |
|
|
957 |
"Created: / 30-06-2011 / 20:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
958 |
"Modified (format): / 27-07-2012 / 21:57:21 / cg"
|
10196
|
959 |
! !
|
|
960 |
|
|
961 |
!TextDiffTool methodsFor:'initialization'!
|
|
962 |
|
|
963 |
initialize
|
|
964 |
super initialize.
|
10344
|
965 |
textAChanged := textBChanged := false.
|
10196
|
966 |
|
10344
|
967 |
"Modified: / 19-07-2011 / 19:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
968 |
"Modified (format): / 27-07-2012 / 21:57:08 / cg"
|
10196
|
969 |
! !
|
|
970 |
|
10332
|
971 |
!TextDiffTool methodsFor:'private'!
|
|
972 |
|
|
973 |
showDiff
|
10868
|
974 |
|scrolledView|
|
10332
|
975 |
|
|
976 |
self diffSpecHolder value: #diffSpec.
|
|
977 |
|
10868
|
978 |
diffView isNil ifTrue:[^self].
|
|
979 |
(scrolledView := diffView scrolledView) isNil ifTrue:[^self].
|
|
980 |
scrolledView
|
10332
|
981 |
text1: self textAHolder value
|
|
982 |
text2: self textBHolder value
|
|
983 |
|
|
984 |
"Created: / 19-07-2011 / 10:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10868
|
985 |
"Modified: / 18-11-2011 / 15:01:12 / cg"
|
10332
|
986 |
!
|
|
987 |
|
10344
|
988 |
showNothing
|
|
989 |
self diffSpecHolder value: #nothingSpec
|
|
990 |
|
|
991 |
"Created: / 19-07-2011 / 19:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
992 |
"Modified (format): / 27-07-2012 / 21:57:28 / cg"
|
10344
|
993 |
!
|
|
994 |
|
10332
|
995 |
showTextOnly
|
|
996 |
self diffSpecHolder value: #textViewSpec
|
|
997 |
|
|
998 |
"Created: / 19-07-2011 / 11:39:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
999 |
"Modified (format): / 27-07-2012 / 21:57:30 / cg"
|
10332
|
1000 |
!
|
|
1001 |
|
|
1002 |
showVersionA
|
|
1003 |
self diffSpecHolder value: #versionAOnlySpec
|
|
1004 |
|
|
1005 |
"Created: / 19-07-2011 / 10:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
1006 |
"Modified (format): / 27-07-2012 / 21:57:33 / cg"
|
10332
|
1007 |
!
|
|
1008 |
|
|
1009 |
showVersionB
|
|
1010 |
self diffSpecHolder value: #versionBOnlySpec
|
|
1011 |
|
|
1012 |
"Created: / 19-07-2011 / 10:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
11700
|
1013 |
"Modified (format): / 27-07-2012 / 21:57:35 / cg"
|
10332
|
1014 |
! !
|
|
1015 |
|
10196
|
1016 |
!TextDiffTool class methodsFor:'documentation'!
|
|
1017 |
|
10870
|
1018 |
version
|
11700
|
1019 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.7 2012-07-27 19:58:09 cg Exp $'
|
10870
|
1020 |
!
|
|
1021 |
|
10196
|
1022 |
version_CVS
|
11700
|
1023 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.7 2012-07-27 19:58:09 cg Exp $'
|
10196
|
1024 |
!
|
|
1025 |
|
|
1026 |
version_SVN
|
|
1027 |
^ '§Id§'
|
|
1028 |
! !
|