author | vrany |
Mon, 19 Dec 2011 09:39:53 +0100 | |
changeset 10975 | 1d7029646c90 |
parent 10939 | e8a439fbd82d |
child 12123 | 4bde08cebd48 |
child 13017 | 62a2cd2d8b70 |
permissions | -rw-r--r-- |
10194 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
10741
e4645cbb0958
Fix package def libbasic3->libtool
Stefan Vogel <sv@exept.de>
parents:
10194
diff
changeset
|
26 |
"{ Package: 'stx:libtool' }" |
10194 | 27 |
|
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
ApplicationModel subclass:#ChangeSetDiffTool |
|
31 |
instanceVariableNames:'listHolder singleSelectionHolder diffsetHolder titleHolder |
|
32 |
firstColSelectionHolder navigatorPanelSpecHolder diffMenuHolder |
|
33 |
diffsetHolderPrivate selectionHolder versionATextHolder |
|
34 |
versionBTextHolder' |
|
35 |
classVariableNames:'' |
|
36 |
poolDictionaries:'' |
|
37 |
category:'Interface-Diff' |
|
38 |
! |
|
39 |
||
40 |
SimpleDialog subclass:#OpenDialog |
|
41 |
instanceVariableNames:'doAcceptEnabled changesetSpecAHolder changesetSpecBHolder' |
|
42 |
classVariableNames:'LastDirectory' |
|
43 |
poolDictionaries:'' |
|
44 |
privateIn:ChangeSetDiffTool |
|
45 |
! |
|
46 |
||
47 |
!ChangeSetDiffTool class methodsFor:'documentation'! |
|
48 |
||
49 |
copyright |
|
50 |
" |
|
51 |
Copyright (c) 2007-2010 Jan Vrany |
|
52 |
Copyright (c) 2009-2010 eXept Software AG |
|
53 |
||
54 |
Permission is hereby granted, free of charge, to any person |
|
55 |
obtaining a copy of this software and associated documentation |
|
56 |
files (the 'Software'), to deal in the Software without |
|
57 |
restriction, including without limitation the rights to use, |
|
58 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
59 |
copies of the Software, and to permit persons to whom the |
|
60 |
Software is furnished to do so, subject to the following |
|
61 |
conditions: |
|
62 |
||
63 |
The above copyright notice and this permission notice shall be |
|
64 |
included in all copies or substantial portions of the Software. |
|
65 |
||
66 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
67 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
68 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
69 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
70 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
71 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
72 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
73 |
OTHER DEALINGS IN THE SOFTWARE. |
|
74 |
||
75 |
" |
|
76 |
! ! |
|
77 |
||
78 |
!ChangeSetDiffTool class methodsFor:'accessing - defaults'! |
|
79 |
||
80 |
versionAColor |
|
81 |
||
82 |
^Color green lightened lightened |
|
83 |
||
84 |
"Created: / 01-11-2009 / 10:14:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
85 |
! |
|
86 |
||
87 |
versionBColor |
|
88 |
||
89 |
^Color blue lightened lightened |
|
90 |
||
91 |
"Created: / 01-11-2009 / 10:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 |
! |
|
93 |
||
94 |
versionBaseColor |
|
95 |
||
96 |
^Color yellow lightened lightened |
|
97 |
||
98 |
"Created: / 01-11-2009 / 10:14:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
99 |
! |
|
100 |
||
101 |
versionNotPresentText |
|
102 |
^ 'Not present' asText allItalic colorizeAllWith:Color gray lighter |
|
103 |
! ! |
|
104 |
||
105 |
!ChangeSetDiffTool class methodsFor:'image specs'! |
|
106 |
||
107 |
versionA24x24 |
|
108 |
||
109 |
^ToolbarIconLibrary versionA24x24 |
|
110 |
||
111 |
"Created: / 24-03-2010 / 20:49:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
112 |
! |
|
113 |
||
114 |
versionB24x24 |
|
115 |
||
116 |
^ToolbarIconLibrary versionB24x24 |
|
117 |
||
118 |
"Created: / 24-03-2010 / 20:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! ! |
|
120 |
||
121 |
!ChangeSetDiffTool class methodsFor:'interface specs'! |
|
122 |
||
123 |
labelSpec |
|
124 |
"This resource specification was automatically generated |
|
125 |
by the UIPainter of ST/X." |
|
126 |
||
127 |
"Do not manually edit this!! If it is corrupted, |
|
128 |
the UIPainter may not be able to read the specification." |
|
129 |
||
130 |
" |
|
131 |
UIPainter new openOnClass:SVN::DiffBrowser andSelector:#labelSpec |
|
132 |
SVN::DiffBrowser new openInterface:#labelSpec |
|
133 |
" |
|
134 |
||
135 |
<resource: #canvas> |
|
136 |
||
137 |
^ |
|
138 |
#(FullSpec |
|
139 |
name: labelSpec |
|
140 |
window: |
|
141 |
(WindowSpec |
|
142 |
label: 'Label' |
|
143 |
name: 'Label' |
|
144 |
min: (Point 10 10) |
|
145 |
bounds: (Rectangle 0 0 600 48) |
|
146 |
) |
|
147 |
component: |
|
148 |
(SpecCollection |
|
149 |
collection: ( |
|
150 |
(UISubSpecification |
|
151 |
name: 'LabelA' |
|
152 |
layout: (LayoutFrame 0 0 0 0 0 1 0 0.5) |
|
153 |
minorKey: versionALabelSpec |
|
154 |
) |
|
155 |
(UISubSpecification |
|
156 |
name: 'LabelB' |
|
157 |
layout: (LayoutFrame 0 0 0 0.5 0 1 0 1) |
|
158 |
minorKey: versionBLabelSpec |
|
159 |
) |
|
160 |
) |
|
161 |
||
162 |
) |
|
163 |
) |
|
164 |
! |
|
165 |
||
166 |
oneColumnNavigatorSpec |
|
167 |
"This resource specification was automatically generated |
|
168 |
by the UIPainter of ST/X." |
|
169 |
||
170 |
"Do not manually edit this!! If it is corrupted, |
|
171 |
the UIPainter may not be able to read the specification." |
|
172 |
||
173 |
" |
|
174 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser andSelector:#oneColumnNavigatorSpec |
|
175 |
Tools::ChangeSetDiffBrowser new openInterface:#oneColumnNavigatorSpec |
|
176 |
" |
|
177 |
||
178 |
<resource: #canvas> |
|
179 |
||
180 |
^ |
|
181 |
#(FullSpec |
|
182 |
name: oneColumnNavigatorSpec |
|
183 |
window: |
|
184 |
(WindowSpec |
|
185 |
label: 'One Column Navigator' |
|
186 |
name: 'One Column Navigator' |
|
187 |
min: (Point 10 10) |
|
188 |
bounds: (Rectangle 0 0 300 300) |
|
189 |
) |
|
190 |
component: |
|
191 |
(SpecCollection |
|
192 |
collection: ( |
|
193 |
(SubCanvasSpec |
|
194 |
name: 'DiffList' |
|
195 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
196 |
hasHorizontalScrollBar: false |
|
197 |
hasVerticalScrollBar: false |
|
198 |
majorKey: #'Tools::ChangeSetDiffList' |
|
199 |
subAspectHolders: |
|
200 |
(Array |
|
201 |
||
202 |
(SubChannelInfoSpec |
|
203 |
subAspect: inGeneratorHolder |
|
204 |
aspect: diffsetHolderPrivate |
|
205 |
) |
|
206 |
(SubChannelInfoSpec |
|
207 |
subAspect: listEntryLabelGenerator |
|
208 |
aspect: diffListEntryLabelGeneratorAspect |
|
209 |
) |
|
210 |
||
211 |
(SubChannelInfoSpec |
|
212 |
subAspect: menuHolder |
|
213 |
aspect: listMenuHolder |
|
214 |
) |
|
215 |
(SubChannelInfoSpec |
|
216 |
subAspect: outGeneratorHolder |
|
217 |
aspect: selectionHolder |
|
218 |
) |
|
219 |
) |
|
220 |
createNewApplication: true |
|
221 |
createNewBuilder: false |
|
222 |
) |
|
223 |
) |
|
224 |
||
225 |
) |
|
226 |
) |
|
227 |
! |
|
228 |
||
229 |
twoColumnNavigatorSpec |
|
230 |
"This resource specification was automatically generated |
|
231 |
by the UIPainter of ST/X." |
|
232 |
||
233 |
"Do not manually edit this!! If it is corrupted, |
|
234 |
the UIPainter may not be able to read the specification." |
|
235 |
||
236 |
" |
|
237 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser andSelector:#twoColumnNavigatorSpec |
|
238 |
Tools::ChangeSetDiffBrowser new openInterface:#twoColumnNavigatorSpec |
|
239 |
" |
|
240 |
||
241 |
<resource: #canvas> |
|
242 |
||
243 |
^ |
|
244 |
#(FullSpec |
|
245 |
name: twoColumnNavigatorSpec |
|
246 |
window: |
|
247 |
(WindowSpec |
|
248 |
label: 'Two Column Navigator' |
|
249 |
name: 'Two Column Navigator' |
|
250 |
min: (Point 10 10) |
|
251 |
bounds: (Rectangle 0 0 300 300) |
|
252 |
) |
|
253 |
component: |
|
254 |
(SpecCollection |
|
255 |
collection: ( |
|
256 |
(VariableHorizontalPanelSpec |
|
257 |
name: 'Columns' |
|
258 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
259 |
component: |
|
260 |
(SpecCollection |
|
261 |
collection: ( |
|
262 |
(SubCanvasSpec |
|
263 |
name: 'FirstColumn' |
|
264 |
hasHorizontalScrollBar: false |
|
265 |
hasVerticalScrollBar: false |
|
266 |
majorKey: #'Tools::ChangeSetDiffList' |
|
267 |
subAspectHolders: |
|
268 |
(Array |
|
269 |
||
270 |
(SubChannelInfoSpec |
|
271 |
subAspect: inGeneratorHolder |
|
272 |
aspect: diffsetHolderPrivate |
|
273 |
) |
|
274 |
(SubChannelInfoSpec |
|
275 |
subAspect: listEntryLabelGenerator |
|
276 |
aspect: diffListEntryLabelGeneratorAspect |
|
277 |
) |
|
278 |
||
279 |
(SubChannelInfoSpec |
|
280 |
subAspect: menuHolder |
|
281 |
aspect: listMenuHolder |
|
282 |
) |
|
283 |
(SubChannelInfoSpec |
|
284 |
subAspect: outGeneratorHolder |
|
285 |
aspect: firstColSelectionHolder |
|
286 |
) |
|
287 |
) |
|
288 |
createNewApplication: true |
|
289 |
createNewBuilder: true |
|
290 |
) |
|
291 |
(SubCanvasSpec |
|
292 |
name: 'SecondColumn' |
|
293 |
hasHorizontalScrollBar: false |
|
294 |
hasVerticalScrollBar: false |
|
295 |
majorKey: #'Tools::ChangeSetDiffList' |
|
296 |
subAspectHolders: |
|
297 |
(Array |
|
298 |
||
299 |
(SubChannelInfoSpec |
|
300 |
subAspect: inGeneratorHolder |
|
301 |
aspect: firstColSelectionHolder |
|
302 |
) |
|
303 |
(SubChannelInfoSpec |
|
304 |
subAspect: listEntryLabelGenerator |
|
305 |
aspect: diffListEntryLabelGeneratorAspect |
|
306 |
) |
|
307 |
||
308 |
(SubChannelInfoSpec |
|
309 |
subAspect: menuHolder |
|
310 |
aspect: listMenuHolder |
|
311 |
) |
|
312 |
(SubChannelInfoSpec |
|
313 |
subAspect: outGeneratorHolder |
|
314 |
aspect: selectionHolder |
|
315 |
) |
|
316 |
) |
|
317 |
createNewApplication: true |
|
318 |
createNewBuilder: true |
|
319 |
) |
|
320 |
) |
|
321 |
||
322 |
) |
|
323 |
handles: (Any 0.5 1.0) |
|
324 |
) |
|
325 |
) |
|
326 |
||
327 |
) |
|
328 |
) |
|
329 |
! |
|
330 |
||
331 |
windowSpec |
|
332 |
"This resource specification was automatically generated |
|
333 |
by the UIPainter of ST/X." |
|
334 |
||
335 |
"Do not manually edit this!! If it is corrupted, |
|
336 |
the UIPainter may not be able to read the specification." |
|
337 |
||
338 |
" |
|
339 |
UIPainter new openOnClass:Tools::ChangeSetDiffTool andSelector:#windowSpec |
|
340 |
Tools::ChangeSetDiffTool new openInterface:#windowSpec |
|
341 |
Tools::ChangeSetDiffTool open |
|
342 |
" |
|
343 |
||
344 |
<resource: #canvas> |
|
345 |
||
346 |
^ |
|
347 |
#(FullSpec |
|
348 |
name: windowSpec |
|
349 |
window: |
|
350 |
(WindowSpec |
|
351 |
label: 'Diff Browser' |
|
352 |
name: 'Diff Browser' |
|
353 |
min: (Point 10 10) |
|
354 |
bounds: (Rectangle 0 0 665 397) |
|
355 |
menu: mainMenu |
|
356 |
) |
|
357 |
component: |
|
358 |
(SpecCollection |
|
359 |
collection: ( |
|
360 |
(UISubSpecification |
|
361 |
name: 'Label' |
|
362 |
layout: (LayoutFrame 0 0 0 0 0 1 56 0) |
|
363 |
minorKey: labelSpec |
|
364 |
) |
|
365 |
(VariableVerticalPanelSpec |
|
366 |
name: 'Panel' |
|
367 |
layout: (LayoutFrame 0 0 56 0 0 1 0 1) |
|
368 |
showHandle: true |
|
369 |
component: |
|
370 |
(SpecCollection |
|
371 |
collection: ( |
|
372 |
(SubCanvasSpec |
|
373 |
name: 'NavigatorPanel' |
|
374 |
hasHorizontalScrollBar: false |
|
375 |
hasVerticalScrollBar: false |
|
376 |
specHolder: navigatorPanelSpecHolder |
|
377 |
createNewBuilder: false |
|
378 |
) |
|
379 |
(SubCanvasSpec |
|
380 |
name: 'TextDiff' |
|
381 |
majorKey: #'Tools::TextDiffTool' |
|
382 |
minorKey: windowSpecForEmbedding |
|
383 |
subAspectHolders: |
|
384 |
(Array |
|
385 |
||
386 |
(SubChannelInfoSpec |
|
387 |
subAspect: labelAHolder |
|
388 |
aspect: versionALabelHolder |
|
389 |
) |
|
390 |
(SubChannelInfoSpec |
|
391 |
subAspect: labelBHolder |
|
392 |
aspect: versionBLabelHolder |
|
393 |
) |
|
394 |
||
395 |
(SubChannelInfoSpec |
|
396 |
subAspect: textAHolder |
|
397 |
aspect: versionATextHolder |
|
398 |
) |
|
399 |
(SubChannelInfoSpec |
|
400 |
subAspect: textBHolder |
|
401 |
aspect: versionBTextHolder |
|
402 |
) |
|
403 |
) |
|
404 |
createNewApplication: true |
|
405 |
createNewBuilder: true |
|
406 |
) |
|
407 |
) |
|
408 |
||
409 |
) |
|
410 |
handles: (Any 0.5 1.0) |
|
411 |
) |
|
412 |
) |
|
413 |
||
414 |
) |
|
415 |
) |
|
416 |
! ! |
|
417 |
||
418 |
!ChangeSetDiffTool class methodsFor:'interface specs - labels'! |
|
419 |
||
420 |
versionALabelSpec |
|
421 |
"This resource specification was automatically generated |
|
422 |
by the UIPainter of ST/X." |
|
423 |
||
424 |
"Do not manually edit this!! If it is corrupted, |
|
425 |
the UIPainter may not be able to read the specification." |
|
426 |
||
427 |
" |
|
428 |
UIPainter new openOnClass:Tools::ChangeSetDiffTool andSelector:#versionALabelSpec |
|
429 |
Tools::ChangeSetDiffTool new openInterface:#versionALabelSpec |
|
430 |
" |
|
431 |
||
432 |
<resource: #canvas> |
|
433 |
||
434 |
^ |
|
435 |
#(FullSpec |
|
436 |
name: versionALabelSpec |
|
437 |
window: |
|
438 |
(WindowSpec |
|
439 |
label: 'Version A' |
|
440 |
name: 'Version A' |
|
441 |
min: (Point 10 10) |
|
442 |
bounds: (Rectangle 0 0 300 30) |
|
443 |
backgroundColor: (Color 79.6078431372549 90.5882352941177 69.4117647058823) |
|
444 |
forceRecursiveBackground: true |
|
445 |
) |
|
446 |
component: |
|
447 |
(SpecCollection |
|
448 |
collection: ( |
|
449 |
(LabelSpec |
|
450 |
label: 'versionA24x24' |
|
451 |
name: 'VersionAIcon' |
|
452 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
453 |
hasCharacterOrientedLabel: false |
|
454 |
translateLabel: true |
|
455 |
) |
|
456 |
(LabelSpec |
|
457 |
label: 'Version A' |
|
458 |
name: 'VersionALabel' |
|
459 |
layout: (LayoutFrame 30 0 0 0 0 1 0 1) |
|
460 |
translateLabel: true |
|
461 |
labelChannel: versionALabelHolder |
|
462 |
resizeForLabel: true |
|
463 |
adjust: left |
|
464 |
) |
|
10975 | 465 |
(LabelSpec |
466 |
label: '(A)' |
|
467 |
name: 'ALabel' |
|
468 |
layout: (LayoutFrame -30 1 0 0 0 1 0 1) |
|
469 |
translateLabel: true |
|
470 |
) |
|
10194 | 471 |
) |
472 |
||
473 |
) |
|
474 |
) |
|
475 |
! |
|
476 |
||
477 |
versionBLabelSpec |
|
478 |
"This resource specification was automatically generated |
|
479 |
by the UIPainter of ST/X." |
|
480 |
||
481 |
"Do not manually edit this!! If it is corrupted, |
|
482 |
the UIPainter may not be able to read the specification." |
|
483 |
||
484 |
" |
|
485 |
UIPainter new openOnClass:Tools::ChangeSetDiffTool andSelector:#versionBLabelSpec |
|
486 |
Tools::ChangeSetDiffTool new openInterface:#versionBLabelSpec |
|
487 |
" |
|
488 |
||
489 |
<resource: #canvas> |
|
490 |
||
491 |
^ |
|
492 |
#(FullSpec |
|
493 |
name: versionBLabelSpec |
|
494 |
window: |
|
495 |
(WindowSpec |
|
496 |
label: 'Version B' |
|
497 |
name: 'Version B' |
|
498 |
min: (Point 10 10) |
|
499 |
bounds: (Rectangle 0 0 300 30) |
|
500 |
backgroundColor: (Color 100.0 90.5882352941177 60.0) |
|
501 |
forceRecursiveBackground: true |
|
502 |
) |
|
503 |
component: |
|
504 |
(SpecCollection |
|
505 |
collection: ( |
|
506 |
(LabelSpec |
|
507 |
label: 'versionB24x24' |
|
508 |
name: 'VersionBIcon' |
|
509 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
510 |
hasCharacterOrientedLabel: false |
|
511 |
translateLabel: true |
|
512 |
) |
|
513 |
(LabelSpec |
|
514 |
label: 'Version B' |
|
515 |
name: 'VersionBLabel' |
|
516 |
layout: (LayoutFrame 30 0 0 0 167 0 0 1) |
|
517 |
translateLabel: true |
|
518 |
labelChannel: versionBLabelHolder |
|
519 |
resizeForLabel: true |
|
520 |
adjust: left |
|
521 |
useDynamicPreferredWidth: true |
|
522 |
usePreferredWidth: true |
|
523 |
) |
|
10975 | 524 |
(LabelSpec |
525 |
label: '(B)' |
|
526 |
name: 'BLabel' |
|
527 |
layout: (LayoutFrame -30 1 0 0 0 1 0 1) |
|
528 |
translateLabel: true |
|
529 |
) |
|
10194 | 530 |
) |
531 |
||
532 |
) |
|
533 |
) |
|
10975 | 534 |
|
535 |
"Modified: / 16-12-2011 / 14:17:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10194 | 536 |
! ! |
537 |
||
538 |
!ChangeSetDiffTool class methodsFor:'menu specs'! |
|
539 |
||
540 |
listMenu |
|
541 |
"This resource specification was automatically generated |
|
542 |
by the MenuEditor of ST/X." |
|
543 |
||
544 |
"Do not manually edit this!! If it is corrupted, |
|
545 |
the MenuEditor may not be able to read the specification." |
|
546 |
||
547 |
" |
|
548 |
MenuEditor new openOnClass:SVN::DiffBrowser andSelector:#listMenu |
|
549 |
(Menu new fromLiteralArrayEncoding:(SVN::DiffBrowser listMenu)) startUp |
|
550 |
" |
|
551 |
||
552 |
<resource: #menu> |
|
553 |
||
554 |
^ |
|
555 |
#(Menu |
|
556 |
( |
|
557 |
(MenuItem |
|
558 |
label: 'Browse' |
|
559 |
itemValue: listMenuBrowse |
|
560 |
translateLabel: true |
|
561 |
) |
|
562 |
(MenuItem |
|
563 |
label: '-' |
|
564 |
) |
|
565 |
(MenuItem |
|
566 |
label: 'Load version A' |
|
567 |
itemValue: listMenuLoadVersionA |
|
568 |
nameKey: LoadVersionA |
|
569 |
translateLabel: true |
|
570 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionA16x16 'Load version A') |
|
571 |
) |
|
572 |
(MenuItem |
|
573 |
label: 'Load version B' |
|
574 |
itemValue: listMenuLoadVersionB |
|
575 |
nameKey: LoadVersionB |
|
576 |
translateLabel: true |
|
577 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionB16x16 'Load version B') |
|
578 |
) |
|
579 |
(MenuItem |
|
580 |
label: '-' |
|
581 |
) |
|
582 |
(MenuItem |
|
583 |
enabled: hasSelection |
|
584 |
label: 'Inspect' |
|
585 |
itemValue: listMenuInspect |
|
586 |
translateLabel: true |
|
587 |
) |
|
588 |
) |
|
589 |
nil |
|
590 |
nil |
|
591 |
) |
|
592 |
! |
|
593 |
||
594 |
mainMenu |
|
595 |
"This resource specification was automatically generated |
|
596 |
by the MenuEditor of ST/X." |
|
597 |
||
598 |
"Do not manually edit this!! If it is corrupted, |
|
599 |
the MenuEditor may not be able to read the specification." |
|
600 |
||
10975 | 601 |
|
10194 | 602 |
" |
10975 | 603 |
MenuEditor new openOnClass:Tools::ChangeSetDiffTool andSelector:#mainMenu |
604 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetDiffTool mainMenu)) startUp |
|
10194 | 605 |
" |
606 |
||
607 |
<resource: #menu> |
|
608 |
||
609 |
^ |
|
610 |
#(Menu |
|
611 |
( |
|
612 |
(MenuItem |
|
613 |
label: 'File' |
|
614 |
translateLabel: true |
|
615 |
submenu: |
|
616 |
(Menu |
|
617 |
( |
|
618 |
(MenuItem |
|
619 |
label: 'Open' |
|
620 |
itemValue: fileMenuOpen |
|
621 |
translateLabel: true |
|
622 |
shortcutKey: Ctrlo |
|
623 |
) |
|
624 |
(MenuItem |
|
625 |
enabled: false |
|
626 |
label: 'Save as patch ' |
|
627 |
itemValue: fileMenuSaveAsPatch |
|
628 |
translateLabel: true |
|
629 |
) |
|
630 |
(MenuItem |
|
631 |
label: '-' |
|
632 |
) |
|
633 |
(MenuItem |
|
634 |
label: 'Exit' |
|
635 |
itemValue: closeRequest |
|
636 |
translateLabel: true |
|
637 |
) |
|
638 |
) |
|
639 |
nil |
|
640 |
nil |
|
641 |
) |
|
642 |
) |
|
643 |
(MenuItem |
|
10975 | 644 |
label: 'Changeset' |
645 |
translateLabel: true |
|
646 |
submenu: |
|
647 |
(Menu |
|
648 |
( |
|
649 |
(MenuItem |
|
650 |
label: 'Browse changes (A)' |
|
651 |
itemValue: changesetMenuBrowseA |
|
652 |
translateLabel: true |
|
653 |
) |
|
654 |
(MenuItem |
|
655 |
label: 'Browse changes (B)' |
|
656 |
itemValue: changesetMenuBrowseB |
|
657 |
translateLabel: true |
|
658 |
) |
|
659 |
||
660 |
) |
|
661 |
nil |
|
662 |
nil |
|
663 |
) |
|
664 |
) |
|
665 |
(MenuItem |
|
10194 | 666 |
label: 'Diff' |
667 |
translateLabel: true |
|
668 |
submenuChannel: listMenu |
|
669 |
) |
|
670 |
) |
|
671 |
nil |
|
672 |
nil |
|
673 |
) |
|
10975 | 674 |
|
675 |
"Modified: / 16-12-2011 / 14:24:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10194 | 676 |
! ! |
677 |
||
678 |
!ChangeSetDiffTool class methodsFor:'plugIn spec'! |
|
679 |
||
680 |
aspectSelectors |
|
681 |
"This resource specification was automatically generated |
|
682 |
by the UIPainter of ST/X." |
|
683 |
||
684 |
"Do not manually edit this. If it is corrupted, |
|
685 |
the UIPainter may not be able to read the specification." |
|
686 |
||
687 |
"Return a description of exported aspects; |
|
688 |
these can be connected to aspects of an embedding application |
|
689 |
(if this app is embedded in a subCanvas)." |
|
690 |
||
691 |
^ #( |
|
692 |
#diffsetHolder |
|
693 |
). |
|
694 |
||
695 |
! ! |
|
696 |
||
697 |
!ChangeSetDiffTool methodsFor:'accessing'! |
|
698 |
||
699 |
beSingleColumn |
|
700 |
||
701 |
self navigatorPanelSpecHolder value: #oneColumnNavigatorSpec |
|
702 |
||
703 |
"Created: / 20-11-2009 / 20:41:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
704 |
! |
|
705 |
||
706 |
beTwoColumn |
|
707 |
||
708 |
self navigatorPanelSpecHolder value: #twoColumnNavigatorSpec |
|
709 |
||
710 |
"Created: / 20-11-2009 / 20:42:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
711 |
! |
|
712 |
||
713 |
beTwoColumn: aBoolean |
|
714 |
||
715 |
aBoolean |
|
716 |
ifTrue:[self beTwoColumn] |
|
717 |
ifFalse:[self beSingleColumn] |
|
718 |
||
719 |
"Created: / 20-11-2009 / 20:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
720 |
! |
|
721 |
||
722 |
diffset |
|
723 |
||
724 |
^self diffsetHolder value |
|
725 |
||
726 |
"Created: / 05-12-2009 / 11:53:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
727 |
! |
|
728 |
||
729 |
diffset: aDiff3Set |
|
730 |
||
731 |
self diffsetHolder value: aDiff3Set |
|
732 |
||
733 |
"Created: / 01-11-2009 / 09:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
734 |
! |
|
735 |
||
736 |
patchset |
|
737 |
||
738 |
| patchset | |
|
739 |
patchset := ChangeSet new. |
|
740 |
self diffset do: |
|
741 |
[:diff|patchset add:diff versionA]. |
|
742 |
^patchset |
|
743 |
||
744 |
"Created: / 05-12-2009 / 11:54:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
745 |
! |
|
746 |
||
747 |
selection |
|
748 |
||
749 |
^self selectionHolder value |
|
750 |
||
751 |
"Created: / 22-10-2008 / 11:30:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
752 |
! |
|
753 |
||
754 |
selection: selection |
|
755 |
||
756 |
^self selectionHolder value: selection |
|
757 |
||
758 |
"Created: / 22-10-2008 / 11:30:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
759 |
! |
|
760 |
||
761 |
title: aString |
|
762 |
||
763 |
self titleHolder value: aString |
|
764 |
||
765 |
"Created: / 19-11-2009 / 15:44:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
766 |
! ! |
|
767 |
||
768 |
!ChangeSetDiffTool methodsFor:'accessing - selection'! |
|
769 |
||
770 |
theSingleSelectedObject |
|
771 |
||
772 |
| sel selSize obj | |
|
773 |
sel := self selection. |
|
774 |
||
775 |
(sel isCollection and:[self isString not]) |
|
776 |
ifFalse:[^sel]. |
|
777 |
||
778 |
selSize := 0. |
|
779 |
obj := nil. |
|
780 |
sel do: |
|
781 |
[:each| |
|
782 |
selSize := selSize + 1. |
|
783 |
selSize > 1 ifTrue:[^nil]. |
|
784 |
obj := each]. |
|
785 |
^obj |
|
786 |
||
787 |
"Created: / 10-11-2009 / 11:12:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
788 |
"Modified: / 20-11-2009 / 19:54:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
789 |
! ! |
|
790 |
||
791 |
!ChangeSetDiffTool methodsFor:'aspects'! |
|
792 |
||
793 |
diffListEntryLabelGeneratorAspect |
|
794 |
||
795 |
^nil |
|
796 |
||
797 |
"Created: / 24-11-2009 / 10:01:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
798 |
! |
|
799 |
||
800 |
diffsetHolder |
|
801 |
"return/create the 'diffsetHolder' value holder (automatically generated)" |
|
802 |
||
803 |
diffsetHolder isNil ifTrue:[ |
|
804 |
diffsetHolder := ValueHolder new. |
|
805 |
diffsetHolder addDependent:self. |
|
806 |
]. |
|
807 |
^ diffsetHolder |
|
808 |
! |
|
809 |
||
810 |
diffsetHolder:aValueHolder |
|
811 |
"set the 'diffsetHolder' value holder (automatically generated)" |
|
812 |
||
813 |
|oldValue newValue| |
|
814 |
||
815 |
diffsetHolder notNil ifTrue:[ |
|
816 |
oldValue := diffsetHolder value. |
|
817 |
diffsetHolder removeDependent:self. |
|
818 |
]. |
|
819 |
diffsetHolder := aValueHolder. |
|
820 |
diffsetHolder notNil ifTrue:[ |
|
821 |
diffsetHolder addDependent:self. |
|
822 |
]. |
|
823 |
newValue := diffsetHolder value. |
|
824 |
oldValue ~~ newValue ifTrue:[ |
|
825 |
self update:#value with:newValue from:diffsetHolder. |
|
826 |
]. |
|
827 |
! |
|
828 |
||
829 |
diffsetHolderPrivate |
|
830 |
"return/create the 'diffSetHolderPrivate' value holder (automatically generated)" |
|
831 |
||
832 |
diffsetHolderPrivate isNil ifTrue:[ |
|
833 |
diffsetHolderPrivate := ValueHolder with: (self diffsetHolder value). |
|
834 |
]. |
|
835 |
^ diffsetHolderPrivate |
|
836 |
||
837 |
"Created: / 05-12-2009 / 11:03:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
838 |
! |
|
839 |
||
840 |
firstColSelectionHolder |
|
841 |
"return/create the valueHolder 'firstColSelectionHolder'" |
|
842 |
||
843 |
firstColSelectionHolder isNil ifTrue:[ |
|
844 |
firstColSelectionHolder := ValueHolder with:nil "defaultValue here". |
|
845 |
]. |
|
846 |
^ firstColSelectionHolder |
|
847 |
! |
|
848 |
||
849 |
hasSelectionHolder |
|
850 |
||
851 |
|holder| |
|
852 |
||
853 |
(holder := builder bindingAt:#hasSelectionHolder) isNil ifTrue:[ |
|
854 |
holder := (AspectAdaptor forAspect: #notEmptyOrNil) |
|
855 |
subjectChannel: self selectionHolder. |
|
856 |
builder aspectAt:#hasSelectionHolder put: holder |
|
857 |
]. |
|
858 |
^ holder. |
|
859 |
||
860 |
"Created: / 22-10-2008 / 11:34:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
861 |
"Modified: / 22-10-2008 / 12:38:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
862 |
! |
|
863 |
||
864 |
listHolder |
|
865 |
"return/create the 'listHolder' value holder (automatically generated)" |
|
866 |
||
867 |
listHolder isNil ifTrue:[ |
|
868 |
listHolder := ValueHolder new. |
|
869 |
]. |
|
870 |
^ listHolder |
|
871 |
||
872 |
"Modified: / 01-11-2009 / 16:57:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
873 |
! |
|
874 |
||
875 |
listMenuHolder |
|
10879 | 876 |
diffMenuHolder isNil ifTrue:[ |
877 |
diffMenuHolder := ValueHolder with:(Menu decodeFromLiteralArray: self class listMenu) |
|
878 |
]. |
|
10194 | 879 |
^ diffMenuHolder |
880 |
||
881 |
"Created: / 21-11-2009 / 18:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
882 |
"Modified: / 09-12-2009 / 23:34:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10879 | 883 |
"Modified: / 18-11-2011 / 14:57:47 / cg" |
10194 | 884 |
! |
885 |
||
886 |
nameAspect |
|
887 |
||
888 |
^(AspectAdaptor forAspect: #name) |
|
889 |
subjectChannel: self diffsetHolder |
|
890 |
||
891 |
"Created: / 01-11-2009 / 11:14:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
892 |
! |
|
893 |
||
894 |
navigatorPanelSpecHolder |
|
895 |
<resource: #uiAspect> |
|
896 |
||
897 |
navigatorPanelSpecHolder isNil ifTrue:[ |
|
898 |
navigatorPanelSpecHolder := ValueHolder with: #twoColumnNavigatorSpec. |
|
899 |
]. |
|
900 |
^ navigatorPanelSpecHolder. |
|
901 |
||
902 |
"Modified: / 20-11-2009 / 20:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
903 |
! |
|
904 |
||
905 |
selectionHolder |
|
906 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
907 |
||
908 |
selectionHolder isNil ifTrue:[ |
|
909 |
||
910 |
selectionHolder := ValueHolder new. |
|
911 |
selectionHolder addDependent:self. |
|
912 |
]. |
|
913 |
^ selectionHolder |
|
914 |
||
915 |
"Modified (format): / 06-07-2011 / 12:25:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
916 |
! |
|
917 |
||
918 |
singleSelectionHolder |
|
919 |
"return/create the 'singleSelectionHolder' value holder (automatically generated)" |
|
920 |
||
921 |
singleSelectionHolder isNil ifTrue:[ |
|
922 |
singleSelectionHolder := ValueHolder new. |
|
923 |
]. |
|
924 |
^ singleSelectionHolder |
|
925 |
||
926 |
"Modified: / 10-11-2009 / 11:09:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
927 |
! |
|
928 |
||
929 |
titleHolder |
|
930 |
"return/create the 'titleHolder' value holder (automatically generated)" |
|
931 |
||
932 |
titleHolder isNil ifTrue:[ |
|
933 |
titleHolder := ValueHolder with: 'Diff Browser'. |
|
934 |
]. |
|
935 |
^ titleHolder |
|
936 |
||
937 |
"Modified: / 01-11-2009 / 14:04:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
938 |
! |
|
939 |
||
940 |
versionALabelHolder |
|
941 |
||
942 |
^(AspectAdaptor forAspect: #versionALabel) |
|
943 |
subjectChannel: self diffsetHolder |
|
944 |
||
945 |
"Created: / 09-04-2011 / 23:30:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
946 |
! |
|
947 |
||
948 |
versionATextHolder |
|
949 |
||
10879 | 950 |
versionATextHolder isNil ifTrue:[ |
10194 | 951 |
versionATextHolder := ValueHolder new |
952 |
]. |
|
953 |
^versionATextHolder |
|
954 |
||
955 |
"Created: / 06-07-2011 / 12:05:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10879 | 956 |
"Modified: / 18-11-2011 / 14:57:56 / cg" |
10194 | 957 |
! |
958 |
||
959 |
versionBLabelHolder |
|
960 |
||
961 |
^(AspectAdaptor forAspect: #versionBLabel) |
|
962 |
subjectChannel: self diffsetHolder |
|
963 |
||
964 |
"Created: / 09-04-2011 / 23:30:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
965 |
! |
|
966 |
||
967 |
versionBTextHolder |
|
968 |
||
10879 | 969 |
versionBTextHolder isNil ifTrue:[ |
10194 | 970 |
versionBTextHolder := ValueHolder new |
971 |
]. |
|
972 |
^versionBTextHolder |
|
973 |
||
974 |
"Created: / 06-07-2011 / 12:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10879 | 975 |
"Modified: / 18-11-2011 / 14:57:59 / cg" |
10194 | 976 |
! ! |
977 |
||
978 |
!ChangeSetDiffTool methodsFor:'change & update'! |
|
979 |
||
980 |
diffsetChanged |
|
981 |
||
982 |
| ds | |
|
983 |
||
984 |
ds := self diffsetHolder value. |
|
985 |
||
986 |
self diffsetHolderPrivate value: |
|
987 |
(self isOneColumnBrowser |
|
988 |
ifTrue:[ds flattened] |
|
989 |
ifFalse:[ds value]). |
|
990 |
||
991 |
self versionALabelHolder value: ds versionALabel. |
|
992 |
self versionBLabelHolder value: ds versionBLabel. |
|
993 |
||
994 |
"Created: / 05-12-2009 / 11:03:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
995 |
"Modified: / 29-06-2011 / 08:24:18 / Jan Vrany <enter your email here>" |
|
996 |
! |
|
997 |
||
998 |
selectionChanged |
|
999 |
||
1000 |
| diffItem | |
|
1001 |
||
1002 |
diffItem := self theSingleSelectedObject. |
|
1003 |
self singleSelectionHolder value: diffItem. |
|
1004 |
diffItem isNil ifTrue:[^self]. |
|
1005 |
||
1006 |
self versionATextHolder setValue: diffItem versionAText. |
|
1007 |
self versionBTextHolder setValue: diffItem versionBText. |
|
1008 |
||
1009 |
self versionATextHolder changed: #value. |
|
1010 |
self versionBTextHolder changed: #value. |
|
1011 |
||
1012 |
"Created: / 22-10-2008 / 11:29:24 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1013 |
"Modified: / 06-07-2011 / 12:47:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1014 |
! |
|
1015 |
||
1016 |
update: aspect with: param from: sender |
|
1017 |
||
1018 |
sender == selectionHolder ifTrue:[ |
|
1019 |
self selectionChanged. |
|
1020 |
^self. |
|
1021 |
]. |
|
1022 |
||
1023 |
sender == diffsetHolder ifTrue:[ |
|
1024 |
self diffsetChanged. |
|
1025 |
^self. |
|
1026 |
]. |
|
1027 |
||
1028 |
^super update: aspect with: param from: sender |
|
1029 |
||
1030 |
"Created: / 05-12-2009 / 11:02:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1031 |
! |
|
1032 |
||
1033 |
updateListMenu |
|
1034 |
|menu diffs loadA loadB| |
|
1035 |
||
1036 |
menu := self listMenuHolder value. |
|
1037 |
diffs := self selection ? #(). |
|
1038 |
loadA := menu atNameKey:#LoadVersionA. |
|
1039 |
loadA disable. |
|
1040 |
loadB := menu atNameKey:#LoadVersionB. |
|
1041 |
loadB disable. |
|
1042 |
(diffs select:[:e | true ]) do:[:diff | |
|
1043 |
diff versionA |
|
1044 |
ifNotNil:[ |
|
1045 |
loadA enable. |
|
1046 |
loadA label:'Load version ' , diff versionALabel |
|
1047 |
]. |
|
1048 |
diff versionB |
|
1049 |
ifNotNil:[ |
|
1050 |
loadB |
|
1051 |
label:'Load version ' , diff versionBLabel; |
|
1052 |
enable |
|
1053 |
]. |
|
1054 |
]. |
|
1055 |
! ! |
|
1056 |
||
1057 |
!ChangeSetDiffTool methodsFor:'initialization'! |
|
1058 |
||
1059 |
initialize |
|
1060 |
||
1061 |
super initialize. |
|
1062 |
self createBuilder |
|
1063 |
||
1064 |
"Created: / 22-10-2008 / 12:37:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1065 |
! ! |
|
1066 |
||
1067 |
!ChangeSetDiffTool methodsFor:'menu actions'! |
|
1068 |
||
10975 | 1069 |
changesetMenuBrowse: changeset |
1070 |
||
1071 |
Tools::ChangeSetBrowser2 openOn: changeset |
|
1072 |
||
1073 |
"Created: / 16-12-2011 / 14:31:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1074 |
! |
|
1075 |
||
1076 |
changesetMenuBrowseA |
|
1077 |
||
1078 |
self changesetMenuBrowse: self diffsetHolder value changesetA |
|
1079 |
||
1080 |
"Created: / 16-12-2011 / 14:23:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1081 |
! |
|
1082 |
||
1083 |
changesetMenuBrowseB |
|
1084 |
||
1085 |
self changesetMenuBrowse: self diffsetHolder value changesetB |
|
1086 |
||
1087 |
"Created: / 16-12-2011 / 14:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1088 |
! |
|
1089 |
||
10194 | 1090 |
fileMenuOpen |
1091 |
||
1092 |
| dlg a b | |
|
1093 |
dlg := OpenDialog new. |
|
1094 |
dlg open ifFalse:[^self]. |
|
1095 |
a := dlg changeSetA. |
|
1096 |
b := dlg changeSetB. |
|
1097 |
^self fileMenuOpenOnDiffBetween: a and: b |
|
1098 |
||
1099 |
"Modified: / 06-07-2011 / 11:36:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1100 |
! |
|
1101 |
||
1102 |
fileMenuOpenOnDiffBetween: a and: b |
|
1103 |
||
1104 |
self diffset: (ChangeSetDiff versionA: a versionB: b). |
|
1105 |
||
1106 |
"Created: / 21-03-2011 / 23:23:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1107 |
"Modified: / 29-06-2011 / 08:10:17 / Jan Vrany <enter your email here>" |
|
1108 |
"Modified: / 06-07-2011 / 12:56:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1109 |
! |
|
1110 |
||
1111 |
fileMenuSaveAsPatch |
|
1112 |
||
1113 |
| filename | |
|
1114 |
filename := Smalltalk::Dialog requestFileName: 'Enter filename' default:'patch.chg' ifFail:[^self]. |
|
1115 |
self patchset fileOutAs: filename. |
|
1116 |
||
1117 |
"Modified: / 05-12-2009 / 12:37:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1118 |
! |
|
1119 |
||
10939 | 1120 |
listMenuBrowse |
1121 |
||
1122 |
| items | |
|
1123 |
items := self selection collect:[:e|e]. "/must do collect as selection is an iterator..." |
|
1124 |
items size == 1 ifTrue:[ |
|
1125 |
| item cls sel | |
|
1126 |
item:= items anElement. |
|
1127 |
cls := item changeClass. |
|
1128 |
sel := item changeSelector. |
|
1129 |
cls notNil ifTrue:[ |
|
1130 |
sel notNil ifTrue:[ |
|
1131 |
UserPreferences current systemBrowserClass |
|
1132 |
openInClass:cls selector:sel |
|
1133 |
||
1134 |
] ifFalse:[ |
|
1135 |
UserPreferences current systemBrowserClass |
|
1136 |
browseClass: cls |
|
1137 |
] |
|
1138 |
] ifFalse:[ |
|
1139 |
Dialog warn: (self class resources at: 'Oops, class is gone') |
|
1140 |
] |
|
1141 |
] ifFalse:[ |
|
1142 |
Dialog error: 'Not yet implemented (Tools::ChangeSetDiffTool>>listMenuBrowse)'. |
|
1143 |
] |
|
1144 |
||
1145 |
"Created: / 30-11-2011 / 11:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1146 |
! |
|
1147 |
||
10194 | 1148 |
listMenuInspect |
1149 |
||
1150 |
(self selection collect:[:e|e]) inspect |
|
1151 |
||
1152 |
"Modified: / 24-11-2009 / 12:51:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1153 |
! |
|
1154 |
||
1155 |
listMenuLoadVersionA |
|
1156 |
||
1157 |
self selection do: |
|
1158 |
[:diff|diff versionA apply] |
|
1159 |
||
1160 |
"Modified: / 09-12-2009 / 23:09:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1161 |
! |
|
1162 |
||
1163 |
listMenuLoadVersionB |
|
1164 |
||
1165 |
self selection do: |
|
1166 |
[:diff|diff versionB apply] |
|
1167 |
||
1168 |
"Modified: / 09-12-2009 / 23:10:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1169 |
! ! |
|
1170 |
||
1171 |
!ChangeSetDiffTool methodsFor:'queries'! |
|
1172 |
||
1173 |
canBrowse |
|
1174 |
||
1175 |
^true |
|
1176 |
||
1177 |
"^[self selection notNil |
|
1178 |
and:[self selection versionA notNil]]" |
|
1179 |
||
1180 |
"Created: / 02-11-2009 / 18:32:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1181 |
"Modified: / 21-11-2009 / 18:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1182 |
! |
|
1183 |
||
1184 |
hasSelection |
|
1185 |
||
1186 |
^[self selection notNil] |
|
1187 |
||
1188 |
"Created: / 03-11-2009 / 10:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1189 |
! |
|
1190 |
||
1191 |
isOneColumnBrowser |
|
1192 |
||
1193 |
^self navigatorPanelSpecHolder value = #oneColumnNavigatorSpec |
|
1194 |
||
1195 |
"Created: / 05-12-2009 / 11:04:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1196 |
! ! |
|
1197 |
||
1198 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'image specs'! |
|
1199 |
||
1200 |
versionA24x24 |
|
1201 |
||
1202 |
^ToolbarIconLibrary versionA24x24 |
|
1203 |
||
1204 |
"Created: / 24-03-2010 / 20:49:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1205 |
! |
|
1206 |
||
1207 |
versionB24x24 |
|
1208 |
||
1209 |
^ToolbarIconLibrary versionB24x24 |
|
1210 |
||
1211 |
"Created: / 24-03-2010 / 20:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1212 |
! ! |
|
1213 |
||
1214 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'interface specs'! |
|
1215 |
||
1216 |
windowSpec |
|
1217 |
"This resource specification was automatically generated |
|
1218 |
by the UIPainter of ST/X." |
|
1219 |
||
1220 |
"Do not manually edit this!! If it is corrupted, |
|
1221 |
the UIPainter may not be able to read the specification." |
|
1222 |
||
1223 |
" |
|
1224 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#windowSpec |
|
1225 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#windowSpec |
|
1226 |
Tools::ChangeSetDiffBrowser::OpenDialog open |
|
1227 |
" |
|
1228 |
||
1229 |
<resource: #canvas> |
|
1230 |
||
1231 |
^ |
|
1232 |
#(FullSpec |
|
1233 |
name: windowSpec |
|
1234 |
window: |
|
1235 |
(WindowSpec |
|
1236 |
label: 'Open...' |
|
1237 |
name: 'Open...' |
|
1238 |
min: (Point 10 10) |
|
1239 |
bounds: (Rectangle 0 0 640 130) |
|
1240 |
) |
|
1241 |
component: |
|
1242 |
(SpecCollection |
|
1243 |
collection: ( |
|
1244 |
(VariableHorizontalPanelSpec |
|
1245 |
name: 'ChangeSetsSpecPanel' |
|
1246 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
1247 |
barWidth: 3 |
|
1248 |
showHandle: true |
|
1249 |
component: |
|
1250 |
(SpecCollection |
|
1251 |
collection: ( |
|
1252 |
(ViewSpec |
|
1253 |
name: 'A' |
|
1254 |
component: |
|
1255 |
(SpecCollection |
|
1256 |
collection: ( |
|
1257 |
(UISubSpecification |
|
1258 |
name: 'SubSpecification1' |
|
1259 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
1260 |
minorKey: versionALabelSpec |
|
1261 |
) |
|
1262 |
(SubCanvasSpec |
|
1263 |
name: 'ChangesetASpec' |
|
1264 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
1265 |
hasHorizontalScrollBar: false |
|
1266 |
hasVerticalScrollBar: false |
|
1267 |
majorKey: #'Tools::ChangeSetSelectionDialog' |
|
1268 |
minorKey: windowSpecForEmbedding |
|
1269 |
subAspectHolders: |
|
1270 |
(Array |
|
1271 |
||
1272 |
(SubChannelInfoSpec |
|
1273 |
subAspect: specHolder |
|
1274 |
aspect: changesetSpecAHolder |
|
1275 |
) |
|
1276 |
) |
|
1277 |
createNewApplication: true |
|
1278 |
createNewBuilder: true |
|
1279 |
) |
|
1280 |
) |
|
1281 |
||
1282 |
) |
|
1283 |
) |
|
1284 |
(ViewSpec |
|
1285 |
name: 'B' |
|
1286 |
component: |
|
1287 |
(SpecCollection |
|
1288 |
collection: ( |
|
1289 |
(UISubSpecification |
|
1290 |
name: 'SubSpecification2' |
|
1291 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
1292 |
minorKey: versionBLabelSpec |
|
1293 |
) |
|
1294 |
(SubCanvasSpec |
|
1295 |
name: 'SubCanvas1' |
|
1296 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
1297 |
hasHorizontalScrollBar: false |
|
1298 |
hasVerticalScrollBar: false |
|
1299 |
majorKey: #'Tools::ChangeSetSelectionDialog' |
|
1300 |
minorKey: windowSpecForEmbedding |
|
1301 |
subAspectHolders: |
|
1302 |
(Array |
|
1303 |
||
1304 |
(SubChannelInfoSpec |
|
1305 |
subAspect: specHolder |
|
1306 |
aspect: changesetSpecBHolder |
|
1307 |
) |
|
1308 |
) |
|
1309 |
createNewApplication: true |
|
1310 |
createNewBuilder: true |
|
1311 |
) |
|
1312 |
) |
|
1313 |
||
1314 |
) |
|
1315 |
) |
|
1316 |
) |
|
1317 |
||
1318 |
) |
|
1319 |
handles: (Any 0.5 1.0) |
|
1320 |
) |
|
1321 |
(HorizontalPanelViewSpec |
|
1322 |
name: 'ButtonPanel' |
|
1323 |
layout: (LayoutFrame 3 0 -30 1 -3 1 0 1) |
|
1324 |
horizontalLayout: right |
|
1325 |
verticalLayout: center |
|
1326 |
horizontalSpace: 3 |
|
1327 |
verticalSpace: 3 |
|
1328 |
reverseOrderIfOKAtLeft: true |
|
1329 |
component: |
|
1330 |
(SpecCollection |
|
1331 |
collection: ( |
|
1332 |
(ActionButtonSpec |
|
1333 |
label: 'OK' |
|
1334 |
name: 'Button1' |
|
1335 |
translateLabel: true |
|
1336 |
model: doAccept |
|
1337 |
enableChannel: doAcceptEnabled |
|
1338 |
extent: (Point 125 22) |
|
1339 |
) |
|
1340 |
(ActionButtonSpec |
|
1341 |
label: 'Cancel' |
|
1342 |
name: 'Button2' |
|
1343 |
translateLabel: true |
|
1344 |
model: doCancel |
|
1345 |
extent: (Point 125 22) |
|
1346 |
) |
|
1347 |
) |
|
1348 |
||
1349 |
) |
|
1350 |
) |
|
1351 |
) |
|
1352 |
||
1353 |
) |
|
1354 |
) |
|
1355 |
||
1356 |
"Modified: / 06-07-2011 / 11:32:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1357 |
! ! |
|
1358 |
||
1359 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'interface specs - labels'! |
|
1360 |
||
1361 |
versionALabelSpec |
|
1362 |
"This resource specification was automatically generated |
|
1363 |
by the UIPainter of ST/X." |
|
1364 |
||
1365 |
"Do not manually edit this!! If it is corrupted, |
|
1366 |
the UIPainter may not be able to read the specification." |
|
1367 |
||
1368 |
" |
|
1369 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#versionALabelSpec |
|
1370 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#versionALabelSpec |
|
1371 |
" |
|
1372 |
||
1373 |
<resource: #canvas> |
|
1374 |
||
1375 |
^ |
|
1376 |
#(FullSpec |
|
1377 |
name: versionALabelSpec |
|
1378 |
window: |
|
1379 |
(WindowSpec |
|
1380 |
label: 'Version A' |
|
1381 |
name: 'Changeset A' |
|
1382 |
min: (Point 10 10) |
|
1383 |
bounds: (Rectangle 0 0 300 30) |
|
1384 |
backgroundColor: (Color 79.6078431372549 90.5882352941177 69.4117647058823) |
|
1385 |
forceRecursiveBackground: true |
|
1386 |
) |
|
1387 |
component: |
|
1388 |
(SpecCollection |
|
1389 |
collection: ( |
|
1390 |
(LabelSpec |
|
1391 |
label: 'versionA24x24' |
|
1392 |
name: 'VersionAIcon' |
|
1393 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
1394 |
hasCharacterOrientedLabel: false |
|
1395 |
translateLabel: true |
|
1396 |
) |
|
1397 |
(LabelSpec |
|
1398 |
label: 'Version A' |
|
1399 |
name: 'VersionALabel' |
|
1400 |
layout: (LayoutFrame 30 0 5 0 0 1 0 1) |
|
1401 |
translateLabel: true |
|
1402 |
resizeForLabel: true |
|
1403 |
adjust: left |
|
1404 |
) |
|
1405 |
) |
|
1406 |
||
1407 |
) |
|
1408 |
) |
|
1409 |
||
1410 |
"Modified: / 06-07-2011 / 11:24:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1411 |
! |
|
1412 |
||
1413 |
versionBLabelSpec |
|
1414 |
"This resource specification was automatically generated |
|
1415 |
by the UIPainter of ST/X." |
|
1416 |
||
1417 |
"Do not manually edit this!! If it is corrupted, |
|
1418 |
the UIPainter may not be able to read the specification." |
|
1419 |
||
1420 |
" |
|
1421 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#versionBLabelSpec |
|
1422 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#versionBLabelSpec |
|
1423 |
" |
|
1424 |
||
1425 |
<resource: #canvas> |
|
1426 |
||
1427 |
^ |
|
1428 |
#(FullSpec |
|
1429 |
name: versionBLabelSpec |
|
1430 |
window: |
|
1431 |
(WindowSpec |
|
1432 |
label: 'Version B' |
|
1433 |
name: 'Changeset B' |
|
1434 |
min: (Point 10 10) |
|
1435 |
bounds: (Rectangle 0 0 300 30) |
|
1436 |
backgroundColor: (Color 100.0 90.5882352941177 60.0) |
|
1437 |
forceRecursiveBackground: true |
|
1438 |
) |
|
1439 |
component: |
|
1440 |
(SpecCollection |
|
1441 |
collection: ( |
|
1442 |
(LabelSpec |
|
1443 |
label: 'versionB24x24' |
|
1444 |
name: 'VersionBIcon' |
|
1445 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
1446 |
hasCharacterOrientedLabel: false |
|
1447 |
translateLabel: true |
|
1448 |
) |
|
1449 |
(LabelSpec |
|
1450 |
label: 'Version B' |
|
1451 |
name: 'VersionBLabel' |
|
1452 |
layout: (LayoutFrame 30 0 5 0 97 0 0 1) |
|
1453 |
translateLabel: true |
|
1454 |
resizeForLabel: true |
|
1455 |
adjust: left |
|
1456 |
useDynamicPreferredWidth: true |
|
1457 |
usePreferredWidth: true |
|
1458 |
) |
|
1459 |
) |
|
1460 |
||
1461 |
) |
|
1462 |
) |
|
1463 |
||
1464 |
"Modified: / 06-07-2011 / 11:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1465 |
! ! |
|
1466 |
||
1467 |
!ChangeSetDiffTool::OpenDialog methodsFor:'accessing'! |
|
1468 |
||
1469 |
changeSetA |
|
1470 |
||
1471 |
| specA | |
|
1472 |
||
1473 |
specA := self changesetSpecAHolder value. |
|
1474 |
^specA ifNil:[nil] ifNotNil:[specA changeSet] |
|
1475 |
||
1476 |
"Created: / 06-07-2011 / 11:36:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1477 |
! |
|
1478 |
||
1479 |
changeSetB |
|
1480 |
||
1481 |
| specB | |
|
1482 |
||
1483 |
specB := self changesetSpecBHolder value. |
|
1484 |
^specB ifNil:[nil] ifNotNil:[specB changeSet] |
|
1485 |
||
1486 |
"Created: / 06-07-2011 / 11:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1487 |
! ! |
|
1488 |
||
1489 |
!ChangeSetDiffTool::OpenDialog methodsFor:'aspects'! |
|
1490 |
||
1491 |
changesetSpecAHolder |
|
1492 |
"return/create the 'changesetSpecAHolder' value holder (automatically generated)" |
|
1493 |
||
1494 |
changesetSpecAHolder isNil ifTrue:[ |
|
1495 |
changesetSpecAHolder := ValueHolder new. |
|
1496 |
]. |
|
1497 |
^ changesetSpecAHolder |
|
1498 |
! |
|
1499 |
||
1500 |
changesetSpecAHolder:something |
|
1501 |
"set the 'changesetSpecAHolder' value holder (automatically generated)" |
|
1502 |
||
1503 |
changesetSpecAHolder := something. |
|
1504 |
! |
|
1505 |
||
1506 |
changesetSpecBHolder |
|
1507 |
"return/create the 'changesetSpecBHolder' value holder (automatically generated)" |
|
1508 |
||
1509 |
changesetSpecBHolder isNil ifTrue:[ |
|
1510 |
changesetSpecBHolder := ValueHolder new. |
|
1511 |
]. |
|
1512 |
^ changesetSpecBHolder |
|
1513 |
! |
|
1514 |
||
1515 |
changesetSpecBHolder:something |
|
1516 |
"set the 'changesetSpecBHolder' value holder (automatically generated)" |
|
1517 |
||
1518 |
changesetSpecBHolder := something. |
|
1519 |
! |
|
1520 |
||
1521 |
doAcceptEnabled |
|
1522 |
<resource: #uiAspect> |
|
1523 |
||
1524 |
^BlockValue |
|
1525 |
with:[:a :b|a value notNil and:[b value notNil]] |
|
1526 |
argument:self changesetSpecAHolder |
|
1527 |
argument:self changesetSpecAHolder. |
|
1528 |
||
1529 |
"Modified: / 06-07-2011 / 11:26:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1530 |
! ! |
|
1531 |
||
1532 |
!ChangeSetDiffTool::OpenDialog methodsFor:'events'! |
|
1533 |
||
1534 |
closeAccept |
|
1535 |
||
1536 |
^super closeAccept |
|
1537 |
||
1538 |
"Created: / 06-07-2011 / 12:09:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1539 |
! ! |
|
1540 |
||
1541 |
!ChangeSetDiffTool class methodsFor:'documentation'! |
|
1542 |
||
1543 |
version_CVS |
|
10975 | 1544 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffTool.st,v 1.5 2011-12-19 08:39:53 vrany Exp $' |
10194 | 1545 |
! |
1546 |
||
1547 |
version_SVN |
|
1548 |
^ '§Id: SVN__DiffBrowser.st 346 2011-06-29 06:40:53Z vranyj1 §' |
|
1549 |
! ! |