author | Stefan Vogel <sv@exept.de> |
Sun, 02 Oct 2011 21:52:17 +0200 | |
changeset 10741 | e4645cbb0958 |
parent 10194 | ce5e1fc44d81 |
child 10879 | 0dc2095adecf |
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 |
) |
|
465 |
) |
|
466 |
||
467 |
) |
|
468 |
) |
|
469 |
! |
|
470 |
||
471 |
versionBLabelSpec |
|
472 |
"This resource specification was automatically generated |
|
473 |
by the UIPainter of ST/X." |
|
474 |
||
475 |
"Do not manually edit this!! If it is corrupted, |
|
476 |
the UIPainter may not be able to read the specification." |
|
477 |
||
478 |
" |
|
479 |
UIPainter new openOnClass:Tools::ChangeSetDiffTool andSelector:#versionBLabelSpec |
|
480 |
Tools::ChangeSetDiffTool new openInterface:#versionBLabelSpec |
|
481 |
" |
|
482 |
||
483 |
<resource: #canvas> |
|
484 |
||
485 |
^ |
|
486 |
#(FullSpec |
|
487 |
name: versionBLabelSpec |
|
488 |
window: |
|
489 |
(WindowSpec |
|
490 |
label: 'Version B' |
|
491 |
name: 'Version B' |
|
492 |
min: (Point 10 10) |
|
493 |
bounds: (Rectangle 0 0 300 30) |
|
494 |
backgroundColor: (Color 100.0 90.5882352941177 60.0) |
|
495 |
forceRecursiveBackground: true |
|
496 |
) |
|
497 |
component: |
|
498 |
(SpecCollection |
|
499 |
collection: ( |
|
500 |
(LabelSpec |
|
501 |
label: 'versionB24x24' |
|
502 |
name: 'VersionBIcon' |
|
503 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
504 |
hasCharacterOrientedLabel: false |
|
505 |
translateLabel: true |
|
506 |
) |
|
507 |
(LabelSpec |
|
508 |
label: 'Version B' |
|
509 |
name: 'VersionBLabel' |
|
510 |
layout: (LayoutFrame 30 0 0 0 167 0 0 1) |
|
511 |
translateLabel: true |
|
512 |
labelChannel: versionBLabelHolder |
|
513 |
resizeForLabel: true |
|
514 |
adjust: left |
|
515 |
useDynamicPreferredWidth: true |
|
516 |
usePreferredWidth: true |
|
517 |
) |
|
518 |
) |
|
519 |
||
520 |
) |
|
521 |
) |
|
522 |
! ! |
|
523 |
||
524 |
!ChangeSetDiffTool class methodsFor:'menu specs'! |
|
525 |
||
526 |
listMenu |
|
527 |
"This resource specification was automatically generated |
|
528 |
by the MenuEditor of ST/X." |
|
529 |
||
530 |
"Do not manually edit this!! If it is corrupted, |
|
531 |
the MenuEditor may not be able to read the specification." |
|
532 |
||
533 |
" |
|
534 |
MenuEditor new openOnClass:SVN::DiffBrowser andSelector:#listMenu |
|
535 |
(Menu new fromLiteralArrayEncoding:(SVN::DiffBrowser listMenu)) startUp |
|
536 |
" |
|
537 |
||
538 |
<resource: #menu> |
|
539 |
||
540 |
^ |
|
541 |
#(Menu |
|
542 |
( |
|
543 |
(MenuItem |
|
544 |
label: 'Browse' |
|
545 |
itemValue: listMenuBrowse |
|
546 |
translateLabel: true |
|
547 |
) |
|
548 |
(MenuItem |
|
549 |
label: '-' |
|
550 |
) |
|
551 |
(MenuItem |
|
552 |
label: 'Load version A' |
|
553 |
itemValue: listMenuLoadVersionA |
|
554 |
nameKey: LoadVersionA |
|
555 |
translateLabel: true |
|
556 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionA16x16 'Load version A') |
|
557 |
) |
|
558 |
(MenuItem |
|
559 |
label: 'Load version B' |
|
560 |
itemValue: listMenuLoadVersionB |
|
561 |
nameKey: LoadVersionB |
|
562 |
translateLabel: true |
|
563 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionB16x16 'Load version B') |
|
564 |
) |
|
565 |
(MenuItem |
|
566 |
label: '-' |
|
567 |
) |
|
568 |
(MenuItem |
|
569 |
enabled: hasSelection |
|
570 |
label: 'Inspect' |
|
571 |
itemValue: listMenuInspect |
|
572 |
translateLabel: true |
|
573 |
) |
|
574 |
) |
|
575 |
nil |
|
576 |
nil |
|
577 |
) |
|
578 |
! |
|
579 |
||
580 |
mainMenu |
|
581 |
"This resource specification was automatically generated |
|
582 |
by the MenuEditor of ST/X." |
|
583 |
||
584 |
"Do not manually edit this!! If it is corrupted, |
|
585 |
the MenuEditor may not be able to read the specification." |
|
586 |
||
587 |
" |
|
588 |
MenuEditor new openOnClass:SVN::DiffBrowser andSelector:#mainMenu |
|
589 |
(Menu new fromLiteralArrayEncoding:(SVN::DiffBrowser mainMenu)) startUp |
|
590 |
" |
|
591 |
||
592 |
<resource: #menu> |
|
593 |
||
594 |
^ |
|
595 |
#(Menu |
|
596 |
( |
|
597 |
(MenuItem |
|
598 |
label: 'File' |
|
599 |
translateLabel: true |
|
600 |
submenu: |
|
601 |
(Menu |
|
602 |
( |
|
603 |
(MenuItem |
|
604 |
label: 'Open' |
|
605 |
itemValue: fileMenuOpen |
|
606 |
translateLabel: true |
|
607 |
shortcutKey: Ctrlo |
|
608 |
) |
|
609 |
(MenuItem |
|
610 |
enabled: false |
|
611 |
label: 'Save as patch ' |
|
612 |
itemValue: fileMenuSaveAsPatch |
|
613 |
translateLabel: true |
|
614 |
) |
|
615 |
(MenuItem |
|
616 |
label: '-' |
|
617 |
) |
|
618 |
(MenuItem |
|
619 |
label: 'Exit' |
|
620 |
itemValue: closeRequest |
|
621 |
translateLabel: true |
|
622 |
) |
|
623 |
) |
|
624 |
nil |
|
625 |
nil |
|
626 |
) |
|
627 |
) |
|
628 |
(MenuItem |
|
629 |
label: 'Diff' |
|
630 |
translateLabel: true |
|
631 |
submenuChannel: listMenu |
|
632 |
) |
|
633 |
) |
|
634 |
nil |
|
635 |
nil |
|
636 |
) |
|
637 |
! ! |
|
638 |
||
639 |
!ChangeSetDiffTool class methodsFor:'plugIn spec'! |
|
640 |
||
641 |
aspectSelectors |
|
642 |
"This resource specification was automatically generated |
|
643 |
by the UIPainter of ST/X." |
|
644 |
||
645 |
"Do not manually edit this. If it is corrupted, |
|
646 |
the UIPainter may not be able to read the specification." |
|
647 |
||
648 |
"Return a description of exported aspects; |
|
649 |
these can be connected to aspects of an embedding application |
|
650 |
(if this app is embedded in a subCanvas)." |
|
651 |
||
652 |
^ #( |
|
653 |
#diffsetHolder |
|
654 |
). |
|
655 |
||
656 |
! ! |
|
657 |
||
658 |
!ChangeSetDiffTool methodsFor:'accessing'! |
|
659 |
||
660 |
beSingleColumn |
|
661 |
||
662 |
self navigatorPanelSpecHolder value: #oneColumnNavigatorSpec |
|
663 |
||
664 |
"Created: / 20-11-2009 / 20:41:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 |
! |
|
666 |
||
667 |
beTwoColumn |
|
668 |
||
669 |
self navigatorPanelSpecHolder value: #twoColumnNavigatorSpec |
|
670 |
||
671 |
"Created: / 20-11-2009 / 20:42:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
672 |
! |
|
673 |
||
674 |
beTwoColumn: aBoolean |
|
675 |
||
676 |
aBoolean |
|
677 |
ifTrue:[self beTwoColumn] |
|
678 |
ifFalse:[self beSingleColumn] |
|
679 |
||
680 |
"Created: / 20-11-2009 / 20:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
681 |
! |
|
682 |
||
683 |
diffset |
|
684 |
||
685 |
^self diffsetHolder value |
|
686 |
||
687 |
"Created: / 05-12-2009 / 11:53:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
688 |
! |
|
689 |
||
690 |
diffset: aDiff3Set |
|
691 |
||
692 |
self diffsetHolder value: aDiff3Set |
|
693 |
||
694 |
"Created: / 01-11-2009 / 09:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
695 |
! |
|
696 |
||
697 |
patchset |
|
698 |
||
699 |
| patchset | |
|
700 |
patchset := ChangeSet new. |
|
701 |
self diffset do: |
|
702 |
[:diff|patchset add:diff versionA]. |
|
703 |
^patchset |
|
704 |
||
705 |
"Created: / 05-12-2009 / 11:54:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
706 |
! |
|
707 |
||
708 |
selection |
|
709 |
||
710 |
^self selectionHolder value |
|
711 |
||
712 |
"Created: / 22-10-2008 / 11:30:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
713 |
! |
|
714 |
||
715 |
selection: selection |
|
716 |
||
717 |
^self selectionHolder value: selection |
|
718 |
||
719 |
"Created: / 22-10-2008 / 11:30:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
720 |
! |
|
721 |
||
722 |
title: aString |
|
723 |
||
724 |
self titleHolder value: aString |
|
725 |
||
726 |
"Created: / 19-11-2009 / 15:44:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
727 |
! ! |
|
728 |
||
729 |
!ChangeSetDiffTool methodsFor:'accessing - selection'! |
|
730 |
||
731 |
theSingleSelectedObject |
|
732 |
||
733 |
| sel selSize obj | |
|
734 |
sel := self selection. |
|
735 |
||
736 |
(sel isCollection and:[self isString not]) |
|
737 |
ifFalse:[^sel]. |
|
738 |
||
739 |
selSize := 0. |
|
740 |
obj := nil. |
|
741 |
sel do: |
|
742 |
[:each| |
|
743 |
selSize := selSize + 1. |
|
744 |
selSize > 1 ifTrue:[^nil]. |
|
745 |
obj := each]. |
|
746 |
^obj |
|
747 |
||
748 |
"Created: / 10-11-2009 / 11:12:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
749 |
"Modified: / 20-11-2009 / 19:54:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
750 |
! ! |
|
751 |
||
752 |
!ChangeSetDiffTool methodsFor:'aspects'! |
|
753 |
||
754 |
diffListEntryLabelGeneratorAspect |
|
755 |
||
756 |
^nil |
|
757 |
||
758 |
"Created: / 24-11-2009 / 10:01:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
759 |
! |
|
760 |
||
761 |
diffsetHolder |
|
762 |
"return/create the 'diffsetHolder' value holder (automatically generated)" |
|
763 |
||
764 |
diffsetHolder isNil ifTrue:[ |
|
765 |
diffsetHolder := ValueHolder new. |
|
766 |
diffsetHolder addDependent:self. |
|
767 |
]. |
|
768 |
^ diffsetHolder |
|
769 |
! |
|
770 |
||
771 |
diffsetHolder:aValueHolder |
|
772 |
"set the 'diffsetHolder' value holder (automatically generated)" |
|
773 |
||
774 |
|oldValue newValue| |
|
775 |
||
776 |
diffsetHolder notNil ifTrue:[ |
|
777 |
oldValue := diffsetHolder value. |
|
778 |
diffsetHolder removeDependent:self. |
|
779 |
]. |
|
780 |
diffsetHolder := aValueHolder. |
|
781 |
diffsetHolder notNil ifTrue:[ |
|
782 |
diffsetHolder addDependent:self. |
|
783 |
]. |
|
784 |
newValue := diffsetHolder value. |
|
785 |
oldValue ~~ newValue ifTrue:[ |
|
786 |
self update:#value with:newValue from:diffsetHolder. |
|
787 |
]. |
|
788 |
! |
|
789 |
||
790 |
diffsetHolderPrivate |
|
791 |
"return/create the 'diffSetHolderPrivate' value holder (automatically generated)" |
|
792 |
||
793 |
diffsetHolderPrivate isNil ifTrue:[ |
|
794 |
diffsetHolderPrivate := ValueHolder with: (self diffsetHolder value). |
|
795 |
]. |
|
796 |
^ diffsetHolderPrivate |
|
797 |
||
798 |
"Created: / 05-12-2009 / 11:03:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
799 |
! |
|
800 |
||
801 |
firstColSelectionHolder |
|
802 |
"return/create the valueHolder 'firstColSelectionHolder'" |
|
803 |
||
804 |
firstColSelectionHolder isNil ifTrue:[ |
|
805 |
firstColSelectionHolder := ValueHolder with:nil "defaultValue here". |
|
806 |
]. |
|
807 |
^ firstColSelectionHolder |
|
808 |
! |
|
809 |
||
810 |
hasSelectionHolder |
|
811 |
||
812 |
|holder| |
|
813 |
||
814 |
(holder := builder bindingAt:#hasSelectionHolder) isNil ifTrue:[ |
|
815 |
holder := (AspectAdaptor forAspect: #notEmptyOrNil) |
|
816 |
subjectChannel: self selectionHolder. |
|
817 |
builder aspectAt:#hasSelectionHolder put: holder |
|
818 |
]. |
|
819 |
^ holder. |
|
820 |
||
821 |
"Created: / 22-10-2008 / 11:34:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
822 |
"Modified: / 22-10-2008 / 12:38:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
823 |
! |
|
824 |
||
825 |
listHolder |
|
826 |
"return/create the 'listHolder' value holder (automatically generated)" |
|
827 |
||
828 |
listHolder isNil ifTrue:[ |
|
829 |
listHolder := ValueHolder new. |
|
830 |
]. |
|
831 |
^ listHolder |
|
832 |
||
833 |
"Modified: / 01-11-2009 / 16:57:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
834 |
! |
|
835 |
||
836 |
listMenuHolder |
|
837 |
diffMenuHolder |
|
838 |
ifNil:[ diffMenuHolder := ValueHolder with:(Menu decodeFromLiteralArray: self class listMenu) ]. |
|
839 |
^ diffMenuHolder |
|
840 |
||
841 |
"Created: / 21-11-2009 / 18:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
842 |
"Modified: / 09-12-2009 / 23:34:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
843 |
! |
|
844 |
||
845 |
nameAspect |
|
846 |
||
847 |
^(AspectAdaptor forAspect: #name) |
|
848 |
subjectChannel: self diffsetHolder |
|
849 |
||
850 |
"Created: / 01-11-2009 / 11:14:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
851 |
! |
|
852 |
||
853 |
navigatorPanelSpecHolder |
|
854 |
<resource: #uiAspect> |
|
855 |
||
856 |
navigatorPanelSpecHolder isNil ifTrue:[ |
|
857 |
navigatorPanelSpecHolder := ValueHolder with: #twoColumnNavigatorSpec. |
|
858 |
]. |
|
859 |
^ navigatorPanelSpecHolder. |
|
860 |
||
861 |
"Modified: / 20-11-2009 / 20:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
862 |
! |
|
863 |
||
864 |
selectionHolder |
|
865 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
866 |
||
867 |
selectionHolder isNil ifTrue:[ |
|
868 |
||
869 |
selectionHolder := ValueHolder new. |
|
870 |
selectionHolder addDependent:self. |
|
871 |
]. |
|
872 |
^ selectionHolder |
|
873 |
||
874 |
"Modified (format): / 06-07-2011 / 12:25:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
875 |
! |
|
876 |
||
877 |
singleSelectionHolder |
|
878 |
"return/create the 'singleSelectionHolder' value holder (automatically generated)" |
|
879 |
||
880 |
singleSelectionHolder isNil ifTrue:[ |
|
881 |
singleSelectionHolder := ValueHolder new. |
|
882 |
]. |
|
883 |
^ singleSelectionHolder |
|
884 |
||
885 |
"Modified: / 10-11-2009 / 11:09:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
886 |
! |
|
887 |
||
888 |
titleHolder |
|
889 |
"return/create the 'titleHolder' value holder (automatically generated)" |
|
890 |
||
891 |
titleHolder isNil ifTrue:[ |
|
892 |
titleHolder := ValueHolder with: 'Diff Browser'. |
|
893 |
]. |
|
894 |
^ titleHolder |
|
895 |
||
896 |
"Modified: / 01-11-2009 / 14:04:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
897 |
! |
|
898 |
||
899 |
versionALabelHolder |
|
900 |
||
901 |
^(AspectAdaptor forAspect: #versionALabel) |
|
902 |
subjectChannel: self diffsetHolder |
|
903 |
||
904 |
"Created: / 09-04-2011 / 23:30:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
905 |
! |
|
906 |
||
907 |
versionATextHolder |
|
908 |
||
909 |
versionATextHolder ifNil:[ |
|
910 |
versionATextHolder := ValueHolder new |
|
911 |
]. |
|
912 |
^versionATextHolder |
|
913 |
||
914 |
"Created: / 06-07-2011 / 12:05:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
915 |
! |
|
916 |
||
917 |
versionBLabelHolder |
|
918 |
||
919 |
^(AspectAdaptor forAspect: #versionBLabel) |
|
920 |
subjectChannel: self diffsetHolder |
|
921 |
||
922 |
"Created: / 09-04-2011 / 23:30:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
923 |
! |
|
924 |
||
925 |
versionBTextHolder |
|
926 |
||
927 |
versionBTextHolder ifNil:[ |
|
928 |
versionBTextHolder := ValueHolder new |
|
929 |
]. |
|
930 |
^versionBTextHolder |
|
931 |
||
932 |
"Created: / 06-07-2011 / 12:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
933 |
! ! |
|
934 |
||
935 |
!ChangeSetDiffTool methodsFor:'change & update'! |
|
936 |
||
937 |
diffsetChanged |
|
938 |
||
939 |
| ds | |
|
940 |
||
941 |
ds := self diffsetHolder value. |
|
942 |
||
943 |
self diffsetHolderPrivate value: |
|
944 |
(self isOneColumnBrowser |
|
945 |
ifTrue:[ds flattened] |
|
946 |
ifFalse:[ds value]). |
|
947 |
||
948 |
self versionALabelHolder value: ds versionALabel. |
|
949 |
self versionBLabelHolder value: ds versionBLabel. |
|
950 |
||
951 |
"Created: / 05-12-2009 / 11:03:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
952 |
"Modified: / 29-06-2011 / 08:24:18 / Jan Vrany <enter your email here>" |
|
953 |
! |
|
954 |
||
955 |
selectionChanged |
|
956 |
||
957 |
| diffItem | |
|
958 |
||
959 |
diffItem := self theSingleSelectedObject. |
|
960 |
self singleSelectionHolder value: diffItem. |
|
961 |
diffItem isNil ifTrue:[^self]. |
|
962 |
||
963 |
self versionATextHolder setValue: diffItem versionAText. |
|
964 |
self versionBTextHolder setValue: diffItem versionBText. |
|
965 |
||
966 |
self versionATextHolder changed: #value. |
|
967 |
self versionBTextHolder changed: #value. |
|
968 |
||
969 |
"Created: / 22-10-2008 / 11:29:24 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
970 |
"Modified: / 06-07-2011 / 12:47:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
971 |
! |
|
972 |
||
973 |
update: aspect with: param from: sender |
|
974 |
||
975 |
sender == selectionHolder ifTrue:[ |
|
976 |
self selectionChanged. |
|
977 |
^self. |
|
978 |
]. |
|
979 |
||
980 |
sender == diffsetHolder ifTrue:[ |
|
981 |
self diffsetChanged. |
|
982 |
^self. |
|
983 |
]. |
|
984 |
||
985 |
^super update: aspect with: param from: sender |
|
986 |
||
987 |
"Created: / 05-12-2009 / 11:02:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
988 |
! |
|
989 |
||
990 |
updateListMenu |
|
991 |
|menu diffs loadA loadB| |
|
992 |
||
993 |
menu := self listMenuHolder value. |
|
994 |
diffs := self selection ? #(). |
|
995 |
loadA := menu atNameKey:#LoadVersionA. |
|
996 |
loadA disable. |
|
997 |
loadB := menu atNameKey:#LoadVersionB. |
|
998 |
loadB disable. |
|
999 |
(diffs select:[:e | true ]) do:[:diff | |
|
1000 |
diff versionA |
|
1001 |
ifNotNil:[ |
|
1002 |
loadA enable. |
|
1003 |
loadA label:'Load version ' , diff versionALabel |
|
1004 |
]. |
|
1005 |
diff versionB |
|
1006 |
ifNotNil:[ |
|
1007 |
loadB |
|
1008 |
label:'Load version ' , diff versionBLabel; |
|
1009 |
enable |
|
1010 |
]. |
|
1011 |
]. |
|
1012 |
! ! |
|
1013 |
||
1014 |
!ChangeSetDiffTool methodsFor:'initialization'! |
|
1015 |
||
1016 |
initialize |
|
1017 |
||
1018 |
super initialize. |
|
1019 |
self createBuilder |
|
1020 |
||
1021 |
"Created: / 22-10-2008 / 12:37:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1022 |
! ! |
|
1023 |
||
1024 |
!ChangeSetDiffTool methodsFor:'menu actions'! |
|
1025 |
||
1026 |
fileMenuOpen |
|
1027 |
||
1028 |
| dlg a b | |
|
1029 |
dlg := OpenDialog new. |
|
1030 |
dlg open ifFalse:[^self]. |
|
1031 |
a := dlg changeSetA. |
|
1032 |
b := dlg changeSetB. |
|
1033 |
^self fileMenuOpenOnDiffBetween: a and: b |
|
1034 |
||
1035 |
"Modified: / 06-07-2011 / 11:36:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1036 |
! |
|
1037 |
||
1038 |
fileMenuOpenOnDiffBetween: a and: b |
|
1039 |
||
1040 |
self diffset: (ChangeSetDiff versionA: a versionB: b). |
|
1041 |
||
1042 |
"Created: / 21-03-2011 / 23:23:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1043 |
"Modified: / 29-06-2011 / 08:10:17 / Jan Vrany <enter your email here>" |
|
1044 |
"Modified: / 06-07-2011 / 12:56:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1045 |
! |
|
1046 |
||
1047 |
fileMenuSaveAsPatch |
|
1048 |
||
1049 |
| filename | |
|
1050 |
filename := Smalltalk::Dialog requestFileName: 'Enter filename' default:'patch.chg' ifFail:[^self]. |
|
1051 |
self patchset fileOutAs: filename. |
|
1052 |
||
1053 |
"Modified: / 05-12-2009 / 12:37:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1054 |
! |
|
1055 |
||
1056 |
listMenuInspect |
|
1057 |
||
1058 |
(self selection collect:[:e|e]) inspect |
|
1059 |
||
1060 |
"Modified: / 24-11-2009 / 12:51:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1061 |
! |
|
1062 |
||
1063 |
listMenuLoadVersionA |
|
1064 |
||
1065 |
self selection do: |
|
1066 |
[:diff|diff versionA apply] |
|
1067 |
||
1068 |
"Modified: / 09-12-2009 / 23:09:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1069 |
! |
|
1070 |
||
1071 |
listMenuLoadVersionB |
|
1072 |
||
1073 |
self selection do: |
|
1074 |
[:diff|diff versionB apply] |
|
1075 |
||
1076 |
"Modified: / 09-12-2009 / 23:10:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1077 |
! ! |
|
1078 |
||
1079 |
!ChangeSetDiffTool methodsFor:'queries'! |
|
1080 |
||
1081 |
canBrowse |
|
1082 |
||
1083 |
^true |
|
1084 |
||
1085 |
"^[self selection notNil |
|
1086 |
and:[self selection versionA notNil]]" |
|
1087 |
||
1088 |
"Created: / 02-11-2009 / 18:32:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1089 |
"Modified: / 21-11-2009 / 18:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1090 |
! |
|
1091 |
||
1092 |
hasSelection |
|
1093 |
||
1094 |
^[self selection notNil] |
|
1095 |
||
1096 |
"Created: / 03-11-2009 / 10:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1097 |
! |
|
1098 |
||
1099 |
isOneColumnBrowser |
|
1100 |
||
1101 |
^self navigatorPanelSpecHolder value = #oneColumnNavigatorSpec |
|
1102 |
||
1103 |
"Created: / 05-12-2009 / 11:04:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1104 |
! ! |
|
1105 |
||
1106 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'image specs'! |
|
1107 |
||
1108 |
versionA24x24 |
|
1109 |
||
1110 |
^ToolbarIconLibrary versionA24x24 |
|
1111 |
||
1112 |
"Created: / 24-03-2010 / 20:49:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1113 |
! |
|
1114 |
||
1115 |
versionB24x24 |
|
1116 |
||
1117 |
^ToolbarIconLibrary versionB24x24 |
|
1118 |
||
1119 |
"Created: / 24-03-2010 / 20:50:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1120 |
! ! |
|
1121 |
||
1122 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'interface specs'! |
|
1123 |
||
1124 |
windowSpec |
|
1125 |
"This resource specification was automatically generated |
|
1126 |
by the UIPainter of ST/X." |
|
1127 |
||
1128 |
"Do not manually edit this!! If it is corrupted, |
|
1129 |
the UIPainter may not be able to read the specification." |
|
1130 |
||
1131 |
" |
|
1132 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#windowSpec |
|
1133 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#windowSpec |
|
1134 |
Tools::ChangeSetDiffBrowser::OpenDialog open |
|
1135 |
" |
|
1136 |
||
1137 |
<resource: #canvas> |
|
1138 |
||
1139 |
^ |
|
1140 |
#(FullSpec |
|
1141 |
name: windowSpec |
|
1142 |
window: |
|
1143 |
(WindowSpec |
|
1144 |
label: 'Open...' |
|
1145 |
name: 'Open...' |
|
1146 |
min: (Point 10 10) |
|
1147 |
bounds: (Rectangle 0 0 640 130) |
|
1148 |
) |
|
1149 |
component: |
|
1150 |
(SpecCollection |
|
1151 |
collection: ( |
|
1152 |
(VariableHorizontalPanelSpec |
|
1153 |
name: 'ChangeSetsSpecPanel' |
|
1154 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
1155 |
barWidth: 3 |
|
1156 |
showHandle: true |
|
1157 |
component: |
|
1158 |
(SpecCollection |
|
1159 |
collection: ( |
|
1160 |
(ViewSpec |
|
1161 |
name: 'A' |
|
1162 |
component: |
|
1163 |
(SpecCollection |
|
1164 |
collection: ( |
|
1165 |
(UISubSpecification |
|
1166 |
name: 'SubSpecification1' |
|
1167 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
1168 |
minorKey: versionALabelSpec |
|
1169 |
) |
|
1170 |
(SubCanvasSpec |
|
1171 |
name: 'ChangesetASpec' |
|
1172 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
1173 |
hasHorizontalScrollBar: false |
|
1174 |
hasVerticalScrollBar: false |
|
1175 |
majorKey: #'Tools::ChangeSetSelectionDialog' |
|
1176 |
minorKey: windowSpecForEmbedding |
|
1177 |
subAspectHolders: |
|
1178 |
(Array |
|
1179 |
||
1180 |
(SubChannelInfoSpec |
|
1181 |
subAspect: specHolder |
|
1182 |
aspect: changesetSpecAHolder |
|
1183 |
) |
|
1184 |
) |
|
1185 |
createNewApplication: true |
|
1186 |
createNewBuilder: true |
|
1187 |
) |
|
1188 |
) |
|
1189 |
||
1190 |
) |
|
1191 |
) |
|
1192 |
(ViewSpec |
|
1193 |
name: 'B' |
|
1194 |
component: |
|
1195 |
(SpecCollection |
|
1196 |
collection: ( |
|
1197 |
(UISubSpecification |
|
1198 |
name: 'SubSpecification2' |
|
1199 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
1200 |
minorKey: versionBLabelSpec |
|
1201 |
) |
|
1202 |
(SubCanvasSpec |
|
1203 |
name: 'SubCanvas1' |
|
1204 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
1205 |
hasHorizontalScrollBar: false |
|
1206 |
hasVerticalScrollBar: false |
|
1207 |
majorKey: #'Tools::ChangeSetSelectionDialog' |
|
1208 |
minorKey: windowSpecForEmbedding |
|
1209 |
subAspectHolders: |
|
1210 |
(Array |
|
1211 |
||
1212 |
(SubChannelInfoSpec |
|
1213 |
subAspect: specHolder |
|
1214 |
aspect: changesetSpecBHolder |
|
1215 |
) |
|
1216 |
) |
|
1217 |
createNewApplication: true |
|
1218 |
createNewBuilder: true |
|
1219 |
) |
|
1220 |
) |
|
1221 |
||
1222 |
) |
|
1223 |
) |
|
1224 |
) |
|
1225 |
||
1226 |
) |
|
1227 |
handles: (Any 0.5 1.0) |
|
1228 |
) |
|
1229 |
(HorizontalPanelViewSpec |
|
1230 |
name: 'ButtonPanel' |
|
1231 |
layout: (LayoutFrame 3 0 -30 1 -3 1 0 1) |
|
1232 |
horizontalLayout: right |
|
1233 |
verticalLayout: center |
|
1234 |
horizontalSpace: 3 |
|
1235 |
verticalSpace: 3 |
|
1236 |
reverseOrderIfOKAtLeft: true |
|
1237 |
component: |
|
1238 |
(SpecCollection |
|
1239 |
collection: ( |
|
1240 |
(ActionButtonSpec |
|
1241 |
label: 'OK' |
|
1242 |
name: 'Button1' |
|
1243 |
translateLabel: true |
|
1244 |
model: doAccept |
|
1245 |
enableChannel: doAcceptEnabled |
|
1246 |
extent: (Point 125 22) |
|
1247 |
) |
|
1248 |
(ActionButtonSpec |
|
1249 |
label: 'Cancel' |
|
1250 |
name: 'Button2' |
|
1251 |
translateLabel: true |
|
1252 |
model: doCancel |
|
1253 |
extent: (Point 125 22) |
|
1254 |
) |
|
1255 |
) |
|
1256 |
||
1257 |
) |
|
1258 |
) |
|
1259 |
) |
|
1260 |
||
1261 |
) |
|
1262 |
) |
|
1263 |
||
1264 |
"Modified: / 06-07-2011 / 11:32:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1265 |
! ! |
|
1266 |
||
1267 |
!ChangeSetDiffTool::OpenDialog class methodsFor:'interface specs - labels'! |
|
1268 |
||
1269 |
versionALabelSpec |
|
1270 |
"This resource specification was automatically generated |
|
1271 |
by the UIPainter of ST/X." |
|
1272 |
||
1273 |
"Do not manually edit this!! If it is corrupted, |
|
1274 |
the UIPainter may not be able to read the specification." |
|
1275 |
||
1276 |
" |
|
1277 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#versionALabelSpec |
|
1278 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#versionALabelSpec |
|
1279 |
" |
|
1280 |
||
1281 |
<resource: #canvas> |
|
1282 |
||
1283 |
^ |
|
1284 |
#(FullSpec |
|
1285 |
name: versionALabelSpec |
|
1286 |
window: |
|
1287 |
(WindowSpec |
|
1288 |
label: 'Version A' |
|
1289 |
name: 'Changeset A' |
|
1290 |
min: (Point 10 10) |
|
1291 |
bounds: (Rectangle 0 0 300 30) |
|
1292 |
backgroundColor: (Color 79.6078431372549 90.5882352941177 69.4117647058823) |
|
1293 |
forceRecursiveBackground: true |
|
1294 |
) |
|
1295 |
component: |
|
1296 |
(SpecCollection |
|
1297 |
collection: ( |
|
1298 |
(LabelSpec |
|
1299 |
label: 'versionA24x24' |
|
1300 |
name: 'VersionAIcon' |
|
1301 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
1302 |
hasCharacterOrientedLabel: false |
|
1303 |
translateLabel: true |
|
1304 |
) |
|
1305 |
(LabelSpec |
|
1306 |
label: 'Version A' |
|
1307 |
name: 'VersionALabel' |
|
1308 |
layout: (LayoutFrame 30 0 5 0 0 1 0 1) |
|
1309 |
translateLabel: true |
|
1310 |
resizeForLabel: true |
|
1311 |
adjust: left |
|
1312 |
) |
|
1313 |
) |
|
1314 |
||
1315 |
) |
|
1316 |
) |
|
1317 |
||
1318 |
"Modified: / 06-07-2011 / 11:24:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1319 |
! |
|
1320 |
||
1321 |
versionBLabelSpec |
|
1322 |
"This resource specification was automatically generated |
|
1323 |
by the UIPainter of ST/X." |
|
1324 |
||
1325 |
"Do not manually edit this!! If it is corrupted, |
|
1326 |
the UIPainter may not be able to read the specification." |
|
1327 |
||
1328 |
" |
|
1329 |
UIPainter new openOnClass:Tools::ChangeSetDiffBrowser::OpenDialog andSelector:#versionBLabelSpec |
|
1330 |
Tools::ChangeSetDiffBrowser::OpenDialog new openInterface:#versionBLabelSpec |
|
1331 |
" |
|
1332 |
||
1333 |
<resource: #canvas> |
|
1334 |
||
1335 |
^ |
|
1336 |
#(FullSpec |
|
1337 |
name: versionBLabelSpec |
|
1338 |
window: |
|
1339 |
(WindowSpec |
|
1340 |
label: 'Version B' |
|
1341 |
name: 'Changeset B' |
|
1342 |
min: (Point 10 10) |
|
1343 |
bounds: (Rectangle 0 0 300 30) |
|
1344 |
backgroundColor: (Color 100.0 90.5882352941177 60.0) |
|
1345 |
forceRecursiveBackground: true |
|
1346 |
) |
|
1347 |
component: |
|
1348 |
(SpecCollection |
|
1349 |
collection: ( |
|
1350 |
(LabelSpec |
|
1351 |
label: 'versionB24x24' |
|
1352 |
name: 'VersionBIcon' |
|
1353 |
layout: (LayoutFrame 0 0 -12 0.5 27 0 12 0.5) |
|
1354 |
hasCharacterOrientedLabel: false |
|
1355 |
translateLabel: true |
|
1356 |
) |
|
1357 |
(LabelSpec |
|
1358 |
label: 'Version B' |
|
1359 |
name: 'VersionBLabel' |
|
1360 |
layout: (LayoutFrame 30 0 5 0 97 0 0 1) |
|
1361 |
translateLabel: true |
|
1362 |
resizeForLabel: true |
|
1363 |
adjust: left |
|
1364 |
useDynamicPreferredWidth: true |
|
1365 |
usePreferredWidth: true |
|
1366 |
) |
|
1367 |
) |
|
1368 |
||
1369 |
) |
|
1370 |
) |
|
1371 |
||
1372 |
"Modified: / 06-07-2011 / 11:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1373 |
! ! |
|
1374 |
||
1375 |
!ChangeSetDiffTool::OpenDialog methodsFor:'accessing'! |
|
1376 |
||
1377 |
changeSetA |
|
1378 |
||
1379 |
| specA | |
|
1380 |
||
1381 |
specA := self changesetSpecAHolder value. |
|
1382 |
^specA ifNil:[nil] ifNotNil:[specA changeSet] |
|
1383 |
||
1384 |
"Created: / 06-07-2011 / 11:36:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1385 |
! |
|
1386 |
||
1387 |
changeSetB |
|
1388 |
||
1389 |
| specB | |
|
1390 |
||
1391 |
specB := self changesetSpecBHolder value. |
|
1392 |
^specB ifNil:[nil] ifNotNil:[specB changeSet] |
|
1393 |
||
1394 |
"Created: / 06-07-2011 / 11:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1395 |
! ! |
|
1396 |
||
1397 |
!ChangeSetDiffTool::OpenDialog methodsFor:'aspects'! |
|
1398 |
||
1399 |
changesetSpecAHolder |
|
1400 |
"return/create the 'changesetSpecAHolder' value holder (automatically generated)" |
|
1401 |
||
1402 |
changesetSpecAHolder isNil ifTrue:[ |
|
1403 |
changesetSpecAHolder := ValueHolder new. |
|
1404 |
]. |
|
1405 |
^ changesetSpecAHolder |
|
1406 |
! |
|
1407 |
||
1408 |
changesetSpecAHolder:something |
|
1409 |
"set the 'changesetSpecAHolder' value holder (automatically generated)" |
|
1410 |
||
1411 |
changesetSpecAHolder := something. |
|
1412 |
! |
|
1413 |
||
1414 |
changesetSpecBHolder |
|
1415 |
"return/create the 'changesetSpecBHolder' value holder (automatically generated)" |
|
1416 |
||
1417 |
changesetSpecBHolder isNil ifTrue:[ |
|
1418 |
changesetSpecBHolder := ValueHolder new. |
|
1419 |
]. |
|
1420 |
^ changesetSpecBHolder |
|
1421 |
! |
|
1422 |
||
1423 |
changesetSpecBHolder:something |
|
1424 |
"set the 'changesetSpecBHolder' value holder (automatically generated)" |
|
1425 |
||
1426 |
changesetSpecBHolder := something. |
|
1427 |
! |
|
1428 |
||
1429 |
doAcceptEnabled |
|
1430 |
<resource: #uiAspect> |
|
1431 |
||
1432 |
^BlockValue |
|
1433 |
with:[:a :b|a value notNil and:[b value notNil]] |
|
1434 |
argument:self changesetSpecAHolder |
|
1435 |
argument:self changesetSpecAHolder. |
|
1436 |
||
1437 |
"Modified: / 06-07-2011 / 11:26:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1438 |
! ! |
|
1439 |
||
1440 |
!ChangeSetDiffTool::OpenDialog methodsFor:'events'! |
|
1441 |
||
1442 |
closeAccept |
|
1443 |
||
1444 |
^super closeAccept |
|
1445 |
||
1446 |
"Created: / 06-07-2011 / 12:09:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1447 |
! ! |
|
1448 |
||
1449 |
!ChangeSetDiffTool class methodsFor:'documentation'! |
|
1450 |
||
1451 |
version_CVS |
|
10741
e4645cbb0958
Fix package def libbasic3->libtool
Stefan Vogel <sv@exept.de>
parents:
10194
diff
changeset
|
1452 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffTool.st,v 1.2 2011-10-02 19:52:17 stefan Exp $' |
10194 | 1453 |
! |
1454 |
||
1455 |
version_SVN |
|
1456 |
^ '§Id: SVN__DiffBrowser.st 346 2011-06-29 06:40:53Z vranyj1 §' |
|
1457 |
! ! |