author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 12:53:39 +0000 | |
branch | jv |
changeset 12123 | 4bde08cebd48 |
parent 10870 | b263e62a7ea1 |
child 12125 | 0c49a3b13e43 |
permissions | -rw-r--r-- |
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 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
17 |
instanceVariableNames:'labelAHolder textAHolder labelBHolder textBHolder classHolder |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
18 |
languageHolder codeAspectHolder showDiffHolder diffSpecHolder |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
19 |
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' |
|
321 |
min: (Point 10 10) |
|
322 |
bounds: (Rectangle 0 0 640 480) |
|
323 |
) |
|
324 |
component: |
|
325 |
(SpecCollection |
|
326 |
collection: ( |
|
327 |
(UISubSpecification |
|
328 |
name: 'Contents' |
|
329 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
330 |
minorKey: windowSpecForEmbedding |
|
331 |
) |
|
332 |
) |
|
333 |
||
334 |
) |
|
335 |
) |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
336 |
|
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
337 |
"Modified: / 30-06-2011 / 20:45:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10196 | 338 |
! |
339 |
||
340 |
windowSpecForEmbedding |
|
341 |
"This resource specification was automatically generated |
|
342 |
by the UIPainter of ST/X." |
|
343 |
||
344 |
"Do not manually edit this!! If it is corrupted, |
|
345 |
the UIPainter may not be able to read the specification." |
|
346 |
||
347 |
" |
|
348 |
UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpecForEmbedding |
|
349 |
Tools::TextDiffTool new openInterface:#windowSpecForEmbedding |
|
350 |
" |
|
351 |
||
352 |
<resource: #canvas> |
|
353 |
||
354 |
^ |
|
355 |
#(FullSpec |
|
356 |
name: windowSpecForEmbedding |
|
357 |
window: |
|
358 |
(WindowSpec |
|
359 |
label: 'Text Diff Tool (for embedding)' |
|
360 |
name: 'Text Diff Tool (for embedding)' |
|
361 |
min: (Point 10 10) |
|
362 |
bounds: (Rectangle 0 0 782 506) |
|
363 |
) |
|
364 |
component: |
|
365 |
(SpecCollection |
|
366 |
collection: ( |
|
367 |
(SubCanvasSpec |
|
368 |
name: 'Contents' |
|
369 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
370 |
hasHorizontalScrollBar: false |
|
371 |
hasVerticalScrollBar: false |
|
372 |
specHolder: diffSpecHolder |
|
373 |
createNewBuilder: false |
|
374 |
) |
|
375 |
) |
|
376 |
||
377 |
) |
|
378 |
) |
|
379 |
! ! |
|
380 |
||
381 |
!TextDiffTool class methodsFor:'interface specs - labels'! |
|
382 |
||
383 |
versionALabelSpec |
|
384 |
"This resource specification was automatically generated |
|
385 |
by the UIPainter of ST/X." |
|
386 |
||
387 |
"Do not manually edit this!! If it is corrupted, |
|
388 |
the UIPainter may not be able to read the specification." |
|
389 |
||
390 |
" |
|
391 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionALabelSpec |
|
392 |
SVN::DiffViewApp new openInterface:#versionALabelSpec |
|
393 |
" |
|
394 |
||
395 |
<resource: #canvas> |
|
396 |
||
397 |
^ |
|
398 |
#(FullSpec |
|
399 |
name: versionALabelSpec |
|
400 |
window: |
|
401 |
(WindowSpec |
|
402 |
label: 'Version A' |
|
403 |
name: 'Version A' |
|
404 |
min: (Point 10 10) |
|
405 |
bounds: (Rectangle 0 0 300 30) |
|
406 |
) |
|
407 |
component: |
|
408 |
(SpecCollection |
|
409 |
collection: ( |
|
410 |
(LabelSpec |
|
411 |
label: 'versionA24x24' |
|
412 |
name: 'VersionAIcon' |
|
413 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
414 |
hasCharacterOrientedLabel: false |
|
415 |
translateLabel: true |
|
416 |
) |
|
417 |
(LabelSpec |
|
418 |
label: 'Version A' |
|
419 |
name: 'VersionALabel' |
|
420 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1) |
|
421 |
translateLabel: true |
|
422 |
labelChannel: labelAHolder |
|
423 |
resizeForLabel: true |
|
424 |
adjust: left |
|
425 |
) |
|
426 |
) |
|
427 |
||
428 |
) |
|
429 |
) |
|
430 |
||
431 |
"Modified: / 30-06-2011 / 20:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
432 |
! |
|
433 |
||
434 |
versionBLabelSpec |
|
435 |
"This resource specification was automatically generated |
|
436 |
by the UIPainter of ST/X." |
|
437 |
||
438 |
"Do not manually edit this!! If it is corrupted, |
|
439 |
the UIPainter may not be able to read the specification." |
|
440 |
||
441 |
" |
|
442 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBLabelSpec |
|
443 |
SVN::DiffViewApp new openInterface:#versionBLabelSpec |
|
444 |
" |
|
445 |
||
446 |
<resource: #canvas> |
|
447 |
||
448 |
^ |
|
449 |
#(FullSpec |
|
450 |
name: versionBLabelSpec |
|
451 |
window: |
|
452 |
(WindowSpec |
|
453 |
label: 'Version B' |
|
454 |
name: 'Version B' |
|
455 |
min: (Point 10 10) |
|
456 |
bounds: (Rectangle 0 0 300 30) |
|
457 |
) |
|
458 |
component: |
|
459 |
(SpecCollection |
|
460 |
collection: ( |
|
461 |
(LabelSpec |
|
462 |
label: 'versionB24x24' |
|
463 |
name: 'VersionBIcon' |
|
464 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
465 |
hasCharacterOrientedLabel: false |
|
466 |
translateLabel: true |
|
467 |
) |
|
468 |
(LabelSpec |
|
469 |
label: 'Version B' |
|
470 |
name: 'VersionBLabel' |
|
471 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1) |
|
472 |
translateLabel: true |
|
473 |
labelChannel: labelBHolder |
|
474 |
resizeForLabel: true |
|
475 |
adjust: left |
|
476 |
useDynamicPreferredWidth: true |
|
477 |
usePreferredWidth: true |
|
478 |
) |
|
479 |
) |
|
480 |
||
481 |
) |
|
482 |
) |
|
483 |
||
484 |
"Modified: / 30-06-2011 / 20:53:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
485 |
! |
|
486 |
||
487 |
versionBaseLabelSpec |
|
488 |
"This resource specification was automatically generated |
|
489 |
by the UIPainter of ST/X." |
|
490 |
||
491 |
"Do not manually edit this!! If it is corrupted, |
|
492 |
the UIPainter may not be able to read the specification." |
|
493 |
||
494 |
" |
|
495 |
UIPainter new openOnClass:SVN::DiffViewApp andSelector:#versionBaseLabelSpec |
|
496 |
SVN::DiffViewApp new openInterface:#versionBaseLabelSpec |
|
497 |
" |
|
498 |
||
499 |
<resource: #canvas> |
|
500 |
||
501 |
^ |
|
502 |
#(FullSpec |
|
503 |
name: versionBaseLabelSpec |
|
504 |
window: |
|
505 |
(WindowSpec |
|
506 |
label: 'Version Base' |
|
507 |
name: 'Version Base' |
|
508 |
min: (Point 10 10) |
|
509 |
bounds: (Rectangle 0 0 300 30) |
|
510 |
) |
|
511 |
component: |
|
512 |
(SpecCollection |
|
513 |
collection: ( |
|
514 |
(LabelSpec |
|
515 |
label: 'versionBase24x24' |
|
516 |
name: 'VersionBaseIcon' |
|
517 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
518 |
hasCharacterOrientedLabel: false |
|
519 |
translateLabel: true |
|
520 |
) |
|
521 |
(LabelSpec |
|
522 |
label: 'Version Base' |
|
523 |
name: 'VersionBaseLabel' |
|
524 |
layout: (LayoutFrame 30 0 5 0 191 0 0 1) |
|
525 |
translateLabel: true |
|
526 |
labelChannel: versionBaseLabelAspect |
|
527 |
resizeForLabel: true |
|
528 |
adjust: left |
|
529 |
useDynamicPreferredWidth: true |
|
530 |
usePreferredWidth: true |
|
531 |
) |
|
532 |
) |
|
533 |
||
534 |
) |
|
535 |
) |
|
536 |
||
537 |
"Modified: / 24-03-2010 / 20:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
538 |
! ! |
|
539 |
||
540 |
!TextDiffTool class methodsFor:'plugIn spec'! |
|
541 |
||
542 |
aspectSelectors |
|
543 |
"This resource specification was automatically generated |
|
544 |
by the UIPainter of ST/X." |
|
545 |
||
546 |
"Do not manually edit this. If it is corrupted, |
|
547 |
the UIPainter may not be able to read the specification." |
|
548 |
||
549 |
"Return a description of exported aspects; |
|
550 |
these can be connected to aspects of an embedding application |
|
551 |
(if this app is embedded in a subCanvas)." |
|
552 |
||
553 |
^ #( |
|
554 |
#labelAHolder |
|
555 |
#labelBHolder |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
556 |
|
10196 | 557 |
#textAHolder |
558 |
#textBHolder |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
559 |
|
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
560 |
#showDiffHolder |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
561 |
|
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
562 |
#classHolder |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
563 |
#languageHolder |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
564 |
#codeAspectHolder |
10196 | 565 |
). |
566 |
||
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
567 |
"Modified: / 19-07-2011 / 19:07:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10196 | 568 |
! ! |
569 |
||
570 |
!TextDiffTool methodsFor:'aspects'! |
|
571 |
||
10332 | 572 |
classHolder |
573 |
"return/create the 'classHolder' value holder (automatically generated)" |
|
574 |
||
575 |
classHolder isNil ifTrue:[ |
|
576 |
classHolder := ValueHolder new. |
|
577 |
]. |
|
578 |
^ classHolder |
|
579 |
! |
|
580 |
||
581 |
classHolder: aValueHolder |
|
582 |
||
583 |
classHolder := aValueHolder. |
|
584 |
codeView notNil ifTrue:[codeView classHolder: aValueHolder]. |
|
585 |
diffView notNil ifTrue:[diffView classHolder: aValueHolder]. |
|
586 |
||
587 |
"Modified: / 19-07-2011 / 12:54:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
588 |
! |
|
589 |
||
10344 | 590 |
codeAspectHolder |
591 |
"return/create the 'codeAspectHolder' value holder (automatically generated)" |
|
592 |
||
593 |
codeAspectHolder isNil ifTrue:[ |
|
594 |
codeAspectHolder := ValueHolder with: #expression. |
|
595 |
]. |
|
596 |
^ codeAspectHolder |
|
597 |
||
598 |
"Modified: / 19-07-2011 / 19:07:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
599 |
! |
|
600 |
||
601 |
codeAspectHolder:something |
|
602 |
"set the 'codeAspectHolder' value holder (automatically generated)" |
|
603 |
||
604 |
codeAspectHolder := something. |
|
605 |
! |
|
606 |
||
10196 | 607 |
diffSpecHolder |
608 |
"return/create the 'diffSpecHolder' value holder (automatically generated)" |
|
609 |
||
610 |
diffSpecHolder isNil ifTrue:[ |
|
611 |
diffSpecHolder := ValueHolder with: #diffSpec. |
|
612 |
diffSpecHolder addDependent:self. |
|
613 |
]. |
|
614 |
^ diffSpecHolder |
|
615 |
||
616 |
"Modified: / 06-07-2011 / 11:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
617 |
! |
|
618 |
||
619 |
diffSpecHolder:something |
|
620 |
"set the 'diffSpecHolder' value holder (automatically generated)" |
|
621 |
||
622 |
|oldValue newValue| |
|
623 |
||
624 |
diffSpecHolder notNil ifTrue:[ |
|
625 |
oldValue := diffSpecHolder value. |
|
626 |
diffSpecHolder removeDependent:self. |
|
627 |
]. |
|
628 |
diffSpecHolder := something. |
|
629 |
diffSpecHolder notNil ifTrue:[ |
|
630 |
diffSpecHolder addDependent:self. |
|
631 |
]. |
|
632 |
newValue := diffSpecHolder value. |
|
633 |
oldValue ~~ newValue ifTrue:[ |
|
634 |
self update:#value with:newValue from:diffSpecHolder. |
|
635 |
]. |
|
636 |
! |
|
637 |
||
638 |
labelAHolder |
|
639 |
"return/create the 'labelAHolder' value holder (automatically generated)" |
|
640 |
||
641 |
labelAHolder isNil ifTrue:[ |
|
10332 | 642 |
labelAHolder := ValueHolder with:'Version A'. |
10196 | 643 |
labelAHolder addDependent:self. |
644 |
]. |
|
645 |
^ labelAHolder |
|
10332 | 646 |
|
647 |
"Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10196 | 648 |
! |
649 |
||
650 |
labelAHolder:something |
|
651 |
"set the 'labelAHolder' value holder (automatically generated)" |
|
652 |
||
653 |
|oldValue newValue| |
|
654 |
||
655 |
labelAHolder notNil ifTrue:[ |
|
656 |
oldValue := labelAHolder value. |
|
657 |
labelAHolder removeDependent:self. |
|
658 |
]. |
|
659 |
labelAHolder := something. |
|
660 |
labelAHolder notNil ifTrue:[ |
|
661 |
labelAHolder addDependent:self. |
|
662 |
]. |
|
663 |
newValue := labelAHolder value. |
|
664 |
oldValue ~~ newValue ifTrue:[ |
|
665 |
self update:#value with:newValue from:labelAHolder. |
|
666 |
]. |
|
667 |
! |
|
668 |
||
669 |
labelBHolder |
|
670 |
"return/create the 'labelBHolder' value holder (automatically generated)" |
|
671 |
||
672 |
labelBHolder isNil ifTrue:[ |
|
10332 | 673 |
labelBHolder := ValueHolder with:'Version B'. |
10196 | 674 |
labelBHolder addDependent:self. |
675 |
]. |
|
676 |
^ labelBHolder |
|
10332 | 677 |
|
678 |
"Modified: / 19-07-2011 / 11:42:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10196 | 679 |
! |
680 |
||
681 |
labelBHolder:something |
|
682 |
"set the 'labelBHolder' value holder (automatically generated)" |
|
683 |
||
684 |
|oldValue newValue| |
|
685 |
||
686 |
labelBHolder notNil ifTrue:[ |
|
687 |
oldValue := labelBHolder value. |
|
688 |
labelBHolder removeDependent:self. |
|
689 |
]. |
|
690 |
labelBHolder := something. |
|
691 |
labelBHolder notNil ifTrue:[ |
|
692 |
labelBHolder addDependent:self. |
|
693 |
]. |
|
694 |
newValue := labelBHolder value. |
|
695 |
oldValue ~~ newValue ifTrue:[ |
|
696 |
self update:#value with:newValue from:labelBHolder. |
|
697 |
]. |
|
698 |
! |
|
699 |
||
10332 | 700 |
languageHolder |
701 |
"return/create the 'languageHolder' value holder (automatically generated)" |
|
702 |
||
703 |
languageHolder isNil ifTrue:[ |
|
704 |
languageHolder := ValueHolder new. |
|
705 |
]. |
|
706 |
^ languageHolder |
|
707 |
! |
|
708 |
||
709 |
languageHolder:aValueHolder |
|
710 |
||
711 |
languageHolder := aValueHolder. |
|
712 |
codeView notNil ifTrue:[codeView languageHolder: aValueHolder]. |
|
713 |
diffView notNil ifTrue:[diffView languageHolder: aValueHolder]. |
|
714 |
||
715 |
"Modified: / 19-07-2011 / 12:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
716 |
! |
|
717 |
||
10196 | 718 |
showDiffHolder |
719 |
"return/create the 'showDiffHolder' value holder (automatically generated)" |
|
720 |
||
721 |
showDiffHolder isNil ifTrue:[ |
|
722 |
showDiffHolder := ValueHolder with: true. |
|
723 |
showDiffHolder addDependent:self. |
|
724 |
]. |
|
725 |
^ showDiffHolder |
|
726 |
||
727 |
"Modified: / 30-06-2011 / 20:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
728 |
! |
|
729 |
||
730 |
showDiffHolder:something |
|
731 |
"set the 'showDiffHolder' value holder (automatically generated)" |
|
732 |
||
733 |
|oldValue newValue| |
|
734 |
||
735 |
showDiffHolder notNil ifTrue:[ |
|
736 |
oldValue := showDiffHolder value. |
|
737 |
showDiffHolder removeDependent:self. |
|
738 |
]. |
|
739 |
showDiffHolder := something. |
|
740 |
showDiffHolder notNil ifTrue:[ |
|
741 |
showDiffHolder addDependent:self. |
|
742 |
]. |
|
743 |
newValue := showDiffHolder value. |
|
744 |
oldValue ~~ newValue ifTrue:[ |
|
745 |
self update:#value with:newValue from:showDiffHolder. |
|
746 |
]. |
|
747 |
! |
|
748 |
||
749 |
textAHolder |
|
750 |
"return/create the 'textAHolder' value holder (automatically generated)" |
|
751 |
||
752 |
textAHolder isNil ifTrue:[ |
|
753 |
textAHolder := ValueHolder new. |
|
754 |
textAHolder addDependent:self. |
|
755 |
]. |
|
756 |
^ textAHolder |
|
757 |
! |
|
758 |
||
759 |
textAHolder:something |
|
760 |
"set the 'textAHolder' value holder (automatically generated)" |
|
761 |
||
762 |
|oldValue newValue| |
|
763 |
||
764 |
textAHolder notNil ifTrue:[ |
|
765 |
oldValue := textAHolder value. |
|
766 |
textAHolder removeDependent:self. |
|
767 |
]. |
|
768 |
textAHolder := something. |
|
769 |
textAHolder notNil ifTrue:[ |
|
770 |
textAHolder addDependent:self. |
|
771 |
]. |
|
772 |
newValue := textAHolder value. |
|
773 |
oldValue ~~ newValue ifTrue:[ |
|
774 |
self update:#value with:newValue from:textAHolder. |
|
775 |
]. |
|
776 |
! |
|
777 |
||
778 |
textBHolder |
|
779 |
"return/create the 'textBHolder' value holder (automatically generated)" |
|
780 |
||
781 |
textBHolder isNil ifTrue:[ |
|
782 |
textBHolder := ValueHolder new. |
|
783 |
textBHolder addDependent:self. |
|
784 |
]. |
|
785 |
^ textBHolder |
|
786 |
! |
|
787 |
||
788 |
textBHolder:something |
|
789 |
"set the 'textBHolder' value holder (automatically generated)" |
|
790 |
||
791 |
|oldValue newValue| |
|
792 |
||
793 |
textBHolder notNil ifTrue:[ |
|
794 |
oldValue := textBHolder value. |
|
795 |
textBHolder removeDependent:self. |
|
796 |
]. |
|
797 |
textBHolder := something. |
|
798 |
textBHolder notNil ifTrue:[ |
|
799 |
textBHolder addDependent:self. |
|
800 |
]. |
|
801 |
newValue := textBHolder value. |
|
802 |
oldValue ~~ newValue ifTrue:[ |
|
803 |
self update:#value with:newValue from:textBHolder. |
|
804 |
]. |
|
805 |
! ! |
|
806 |
||
807 |
!TextDiffTool methodsFor:'change & update'! |
|
808 |
||
10344 | 809 |
codeAspect |
810 |
||
811 |
^self codeAspectHolder value |
|
812 |
||
813 |
"Created: / 19-07-2011 / 19:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
814 |
! |
|
815 |
||
10196 | 816 |
update:something with:aParameter from:changedObject |
817 |
"Invoked when an object that I depend upon sends a change notification." |
|
818 |
||
819 |
||
10344 | 820 |
changedObject == textAHolder ifTrue:[ |
821 |
textAChanged := true. |
|
10332 | 822 |
self updateAfterAorBChanged. |
823 |
^ self. |
|
824 |
]. |
|
10344 | 825 |
changedObject == textBHolder ifTrue:[ |
826 |
textBChanged := true. |
|
827 |
self updateAfterAorBChanged. |
|
828 |
^ self. |
|
829 |
]. |
|
830 |
||
10332 | 831 |
(changedObject == showDiffHolder) ifTrue:[ |
832 |
self updateViews. |
|
833 |
^self. |
|
834 |
]. |
|
10196 | 835 |
super update:something with:aParameter from:changedObject |
836 |
||
10344 | 837 |
"Modified: / 19-07-2011 / 19:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10196 | 838 |
! |
839 |
||
840 |
updateAfterAorBChanged |
|
841 |
||
10344 | 842 |
(textAChanged & textBChanged) ifTrue:[ |
843 |
textAChanged := textBChanged := false. |
|
844 |
self updateViews |
|
845 |
]. |
|
10196 | 846 |
|
847 |
"Created: / 06-07-2011 / 12:12:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10332 | 848 |
! |
849 |
||
850 |
updateViews |
|
851 |
||
852 |
| a b | |
|
853 |
a := self textAHolder value. |
|
854 |
b := self textBHolder value. |
|
855 |
||
856 |
self showDiffHolder value ifFalse:[ |
|
857 |
self showTextOnly. |
|
858 |
^ self |
|
859 |
]. |
|
860 |
||
861 |
(a notNil and:[b notNil]) ifTrue:[ |
|
862 |
self showDiff. |
|
863 |
^self |
|
864 |
]. |
|
865 |
a notNil ifTrue:[ |
|
866 |
self showVersionA. |
|
867 |
^self |
|
868 |
]. |
|
869 |
b notNil ifTrue:[ |
|
870 |
self showVersionB. |
|
871 |
^self |
|
872 |
]. |
|
873 |
||
10344 | 874 |
self showNothing. |
10332 | 875 |
|
876 |
"Created: / 19-07-2011 / 11:29:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10196 | 877 |
! ! |
878 |
||
879 |
!TextDiffTool methodsFor:'hooks'! |
|
880 |
||
10332 | 881 |
postBuildCodeView:aScrollableView |
882 |
||
10344 | 883 |
codeView := aScrollableView. |
884 |
codeView notNil ifTrue:[codeView languageHolder: self languageHolder]. |
|
885 |
codeView notNil ifTrue:[codeView classHolder: self classHolder]. |
|
10332 | 886 |
|
887 |
"Created: / 19-07-2011 / 10:17:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
888 |
! |
|
889 |
||
10196 | 890 |
postBuildDiffView:aScrollableView |
891 |
||
10344 | 892 |
diffView := aScrollableView. |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
893 |
diffView notNil ifTrue:[diffView languageHolder: self languageHolder]. |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
894 |
diffView notNil ifTrue:[diffView classHolder: self classHolder]. |
10196 | 895 |
|
896 |
"Created: / 30-06-2011 / 20:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
897 |
! ! |
|
898 |
||
899 |
!TextDiffTool methodsFor:'initialization'! |
|
900 |
||
901 |
initialize |
|
902 |
||
903 |
super initialize. |
|
10344 | 904 |
textAChanged := textBChanged := false. |
10196 | 905 |
|
10344 | 906 |
"Modified: / 19-07-2011 / 19:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10196 | 907 |
! ! |
908 |
||
10332 | 909 |
!TextDiffTool methodsFor:'private'! |
910 |
||
911 |
showDiff |
|
912 |
||
913 |
self diffSpecHolder value: #diffSpec. |
|
914 |
||
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
915 |
diffView ifNil:[^self]. |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
916 |
diffView scrolledView ifNil:[^self]. |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
917 |
diffView scrolledView |
10332 | 918 |
text1: self textAHolder value |
919 |
text2: self textBHolder value |
|
920 |
||
921 |
"Created: / 19-07-2011 / 10:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
922 |
! |
|
923 |
||
10344 | 924 |
showNothing |
925 |
||
926 |
self diffSpecHolder value: #nothingSpec |
|
927 |
||
928 |
"Created: / 19-07-2011 / 19:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
929 |
! |
|
930 |
||
10332 | 931 |
showTextOnly |
932 |
||
933 |
self diffSpecHolder value: #textViewSpec |
|
934 |
||
935 |
"Created: / 19-07-2011 / 11:39:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
936 |
! |
|
937 |
||
938 |
showVersionA |
|
939 |
||
940 |
self diffSpecHolder value: #versionAOnlySpec |
|
941 |
||
942 |
"Created: / 19-07-2011 / 10:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
943 |
! |
|
944 |
||
945 |
showVersionB |
|
946 |
||
947 |
self diffSpecHolder value: #versionBOnlySpec |
|
948 |
||
949 |
"Created: / 19-07-2011 / 10:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
950 |
! ! |
|
951 |
||
10196 | 952 |
!TextDiffTool class methodsFor:'documentation'! |
953 |
||
954 |
version_CVS |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
955 |
^ '§Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.3 2011/07/19 19:25:25 vrany Exp §' |
10196 | 956 |
! |
957 |
||
958 |
version_SVN |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
959 |
^ '$Id: Tools__TextDiffTool.st 7810 2011-08-12 14:54:02Z vranyj1 $' |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10870
diff
changeset
|
960 |
! ! |