author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 15:33:37 +0000 | |
branch | jv |
changeset 12125 | 0c49a3b13e43 |
parent 12123 | 4bde08cebd48 |
child 12128 | a7ff7d66ee85 |
permissions | -rw-r--r-- |
10028 | 1 |
" |
10065 | 2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
12125 | 3 |
All Rights Reserved |
10028 | 4 |
|
10065 | 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. |
|
10028 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
ToolApplicationModel subclass:#ChangeSetBrowser2 |
|
11198 | 31 |
instanceVariableNames:'changesetHolder titleHolder allowOpenHolder changesetFile |
32 |
navigatorChangesetHolder navigatorSpecHolder list1 list1Holder |
|
33 |
selection1Holder list2 list2Holder selection2Holder classHolder |
|
12125 | 34 |
languageHolder codeAspectHolder showRemovedAspect showSameAspect |
35 |
sourceView changeSourceHolder imageSourceHolder targetPackage |
|
36 |
targetNamespace updateChangefileHolder allowRemoveHolder |
|
37 |
allowAcceptHolder' |
|
11198 | 38 |
classVariableNames:'ShowRemoved LastSelectionConditionString' |
39 |
poolDictionaries:'' |
|
40 |
category:'Interface-Browsers-ChangeSet' |
|
10028 | 41 |
! |
42 |
||
12125 | 43 |
ApplicationModel subclass:#ChangeEditor |
44 |
instanceVariableNames:'changeHolder readonlyHolder showdiffHolder sourceChangeHolder |
|
45 |
sourceImageHolder' |
|
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
privateIn:ChangeSetBrowser2 |
|
49 |
! |
|
50 |
||
10028 | 51 |
!ChangeSetBrowser2 class methodsFor:'documentation'! |
52 |
||
53 |
copyright |
|
54 |
" |
|
10065 | 55 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
12125 | 56 |
All Rights Reserved |
10065 | 57 |
|
58 |
Permission is hereby granted, free of charge, to any person |
|
59 |
obtaining a copy of this software and associated documentation |
|
60 |
files (the 'Software'), to deal in the Software without |
|
61 |
restriction, including without limitation the rights to use, |
|
62 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
63 |
copies of the Software, and to permit persons to whom the |
|
64 |
Software is furnished to do so, subject to the following |
|
65 |
conditions: |
|
10028 | 66 |
|
10065 | 67 |
The above copyright notice and this permission notice shall be |
68 |
included in all copies or substantial portions of the Software. |
|
69 |
||
70 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
71 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
72 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
73 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
74 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
75 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
76 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
77 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10028 | 78 |
" |
79 |
! ! |
|
80 |
||
81 |
!ChangeSetBrowser2 class methodsFor:'instance creation'! |
|
82 |
||
83 |
on: aChangeSet |
|
84 |
||
85 |
^self on: aChangeSet label: aChangeSet name |
|
86 |
||
87 |
"Modified: / 26-10-2010 / 22:51:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 |
! |
|
89 |
||
90 |
on: aChangeSet label: aString |
|
91 |
||
92 |
^self on: aChangeSet label: aString setupWith: [:browser] |
|
93 |
||
94 |
"Created: / 26-10-2010 / 22:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
95 |
! |
|
96 |
||
97 |
on: aChangeSet label: label setupWith: aBlock |
|
98 |
||
99 |
| browser | |
|
100 |
||
101 |
browser := self new. |
|
102 |
browser |
|
12125 | 103 |
changeset: aChangeSet; |
104 |
title: label. |
|
10028 | 105 |
aBlock value: browser. |
106 |
^browser |
|
107 |
||
108 |
"Created: / 26-10-2010 / 22:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
109 |
! ! |
|
110 |
||
111 |
!ChangeSetBrowser2 class methodsFor:'accessing'! |
|
112 |
||
113 |
showRemoved |
|
114 |
||
115 |
^ShowRemoved == true |
|
116 |
! |
|
117 |
||
118 |
showRemoved: aBoolean |
|
119 |
||
120 |
ShowRemoved := aBoolean |
|
121 |
! ! |
|
122 |
||
123 |
!ChangeSetBrowser2 class methodsFor:'help specs'! |
|
124 |
||
12125 | 125 |
flyByHelpSpec |
10028 | 126 |
"This resource specification was automatically generated |
127 |
by the UIHelpTool of ST/X." |
|
128 |
||
129 |
"Do not manually edit this!! If it is corrupted, |
|
130 |
the UIHelpTool may not be able to read the specification." |
|
131 |
||
132 |
" |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
133 |
UIHelpTool openOnClass:Tools::ChangeSetBrowser |
10028 | 134 |
" |
135 |
||
136 |
<resource: #help> |
|
137 |
||
12125 | 138 |
^ super flyByHelpSpec addPairsFrom:#( |
10028 | 139 |
|
140 |
#fileLoad |
|
12125 | 141 |
'Select a file and show its contained changeset' |
10028 | 142 |
|
143 |
#fileSave |
|
12125 | 144 |
'Save the changeset in a file' |
10028 | 145 |
|
146 |
) |
|
12125 | 147 |
|
148 |
"Created: / 27-12-2011 / 10:37:47 / cg" |
|
10028 | 149 |
! ! |
150 |
||
151 |
!ChangeSetBrowser2 class methodsFor:'interface opening'! |
|
152 |
||
153 |
confirmChanges: aChangeSet |
|
154 |
||
155 |
^self confirmChanges: aChangeSet label: 'Apply following changes?' |
|
156 |
||
157 |
"Modified: / 08-11-2010 / 18:01:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
158 |
! |
|
159 |
||
160 |
confirmChanges:aChangeSet label: aString |
|
161 |
"Hmm, DialogBox class layout options are quite limited :-((" |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
162 |
|
10028 | 163 |
|browser browserView dialog| |
164 |
||
10309 | 165 |
browser := self on: aChangeSet. |
12125 | 166 |
browser allowAccept: false. |
167 |
browser allowRemove: true. |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
168 |
browserView := ApplicationSubView new |
12125 | 169 |
client:browser |
170 |
spec:#windowSpecForEmbedding. |
|
10028 | 171 |
dialog := (Dialog new) |
12125 | 172 |
addComponent:browserView withHeight: 300; |
173 |
addAbortAndOkButtons; |
|
174 |
yourself. |
|
10028 | 175 |
dialog label: aString. |
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
176 |
dialog buttonPanel |
12125 | 177 |
layout:(LayoutFrame fractions:(0.0 @ 1.0 corner:1.0 @ 1.0) |
178 |
offsets:(0 @ -30 corner:0 @ 0)). |
|
10028 | 179 |
browserView layout:(LayoutFrame fractions:(0.0 @ 0.0 corner:1.0 @ 1.0) |
12125 | 180 |
offsets:(0 @ 0 corner:0 @ -30)). |
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
181 |
dialog |
12125 | 182 |
okAction: |
183 |
[^browser list1Holder value condenseChangesForRemoved]; |
|
184 |
abortAction: |
|
185 |
[^#()]. |
|
10345 | 186 |
dialog openWithExtent: 800@700. |
10028 | 187 |
^#() |
188 |
||
189 |
" |
|
12125 | 190 |
Tools::ChangeSetBrowser2 |
191 |
confirmChanges: |
|
192 |
(ChangeSet current copyFrom: ((ChangeSet current size - 10) max: 1) to: ChangeSet current size) |
|
193 |
label: 'Last 10 changes...' |
|
10028 | 194 |
" |
195 |
||
196 |
"Created: / 08-11-2010 / 17:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 197 |
"Modified: / 07-09-2011 / 20:19:44 / cg" |
198 |
"Modified: / 24-01-2012 / 20:00:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
199 |
! |
|
200 |
||
201 |
open |
|
202 |
"Open browser and load current changefile" |
|
203 |
||
204 |
super open application doOpenCurrent |
|
205 |
||
206 |
"Created: / 25-01-2012 / 17:16:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11198 | 207 |
! |
208 |
||
10028 | 209 |
openOn: aChangeSet |
210 |
^(self on: aChangeSet) open |
|
12125 | 211 |
|
212 |
" |
|
213 |
self openOn: ChangeSet current |
|
214 |
" |
|
215 |
||
216 |
"Modified (comment): / 24-01-2012 / 20:01:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 217 |
! |
218 |
||
219 |
openOn: aChangeSet label: aString |
|
220 |
||
221 |
^self openOn: aChangeSet label: aString setupWith: [:browser] |
|
222 |
||
223 |
"Created: / 26-10-2010 / 22:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
224 |
! |
|
225 |
||
226 |
openOn: aChangeSet label: aString setupWith: aBlock |
|
227 |
||
228 |
^(self on: aChangeSet label: aString setupWith: aBlock) open |
|
229 |
||
230 |
"Created: / 26-10-2010 / 23:07:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
231 |
! ! |
|
232 |
||
233 |
!ChangeSetBrowser2 class methodsFor:'interface specs'! |
|
234 |
||
235 |
hierarchicalNavigatorSpec |
|
236 |
"This resource specification was automatically generated |
|
237 |
by the UIPainter of ST/X." |
|
238 |
||
239 |
"Do not manually edit this!! If it is corrupted, |
|
240 |
the UIPainter may not be able to read the specification." |
|
241 |
||
242 |
" |
|
10448 | 243 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2 andSelector:#hierarchicalNavigatorSpec |
244 |
Tools::ChangeSetBrowser2 new openInterface:#hierarchicalNavigatorSpec |
|
10028 | 245 |
" |
246 |
||
247 |
<resource: #canvas> |
|
248 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
249 |
^ |
10028 | 250 |
#(FullSpec |
12125 | 251 |
name: hierarchicalNavigatorSpec |
252 |
window: |
|
10028 | 253 |
(WindowSpec |
12125 | 254 |
label: 'Hierarchical Navigator' |
255 |
name: 'Hierarchical Navigator' |
|
256 |
min: (Point 10 10) |
|
257 |
bounds: (Rectangle 0 0 300 300) |
|
258 |
) |
|
259 |
component: |
|
10028 | 260 |
(SpecCollection |
12125 | 261 |
collection: ( |
262 |
(SubCanvasSpec |
|
263 |
name: 'ChangeList' |
|
264 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
265 |
hasHorizontalScrollBar: false |
|
266 |
hasVerticalScrollBar: false |
|
267 |
majorKey: #'Tools::HierarchicalChangeList' |
|
268 |
subAspectHolders: |
|
269 |
(Array |
|
270 |
||
271 |
(SubChannelInfoSpec |
|
272 |
subAspect: allowAcceptHolder |
|
273 |
aspect: allowAcceptHolder |
|
274 |
) |
|
275 |
(SubChannelInfoSpec |
|
276 |
subAspect: allowRemoveHolder |
|
277 |
aspect: allowRemoveHolder |
|
278 |
) |
|
279 |
(SubChannelInfoSpec |
|
280 |
subAspect: inGeneratorHolder |
|
281 |
aspect: list1Holder |
|
282 |
) |
|
283 |
||
284 |
(SubChannelInfoSpec |
|
285 |
subAspect: menuHolder |
|
286 |
aspect: list1MenuHolder |
|
287 |
) |
|
288 |
(SubChannelInfoSpec |
|
289 |
subAspect: selectionHolder |
|
290 |
aspect: selection1Holder |
|
291 |
) |
|
292 |
||
293 |
(SubChannelInfoSpec |
|
294 |
subAspect: showRemovedHolder |
|
295 |
aspect: showRemovedAspect |
|
296 |
) |
|
297 |
(SubChannelInfoSpec |
|
298 |
subAspect: showSameHolder |
|
299 |
aspect: showSameAspect |
|
300 |
) |
|
301 |
||
302 |
) |
|
303 |
createNewApplication: true |
|
304 |
createNewBuilder: true |
|
305 |
postBuildCallback: list1View: |
|
306 |
) |
|
307 |
) |
|
308 |
||
309 |
) |
|
10028 | 310 |
) |
10448 | 311 |
|
12125 | 312 |
"Modified: / 24-01-2012 / 19:57:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 313 |
! |
314 |
||
315 |
oneColumnNavigatorSpec |
|
316 |
"This resource specification was automatically generated |
|
317 |
by the UIPainter of ST/X." |
|
318 |
||
319 |
"Do not manually edit this!! If it is corrupted, |
|
320 |
the UIPainter may not be able to read the specification." |
|
321 |
||
322 |
" |
|
10448 | 323 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2 andSelector:#oneColumnNavigatorSpec |
324 |
Tools::ChangeSetBrowser2 new openInterface:#oneColumnNavigatorSpec |
|
10028 | 325 |
" |
326 |
||
327 |
<resource: #canvas> |
|
328 |
||
12125 | 329 |
^ |
10028 | 330 |
#(FullSpec |
12125 | 331 |
name: oneColumnNavigatorSpec |
332 |
window: |
|
10028 | 333 |
(WindowSpec |
12125 | 334 |
label: 'One Column Navigator' |
335 |
name: 'One Column Navigator' |
|
336 |
min: (Point 10 10) |
|
337 |
bounds: (Rectangle 0 0 300 300) |
|
338 |
) |
|
339 |
component: |
|
10028 | 340 |
(SpecCollection |
12125 | 341 |
collection: ( |
342 |
(SubCanvasSpec |
|
343 |
name: 'ChangeList' |
|
344 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
345 |
hasHorizontalScrollBar: false |
|
346 |
hasVerticalScrollBar: false |
|
347 |
majorKey: #'Tools::ChangeList' |
|
348 |
subAspectHolders: |
|
349 |
(Array |
|
350 |
||
351 |
(SubChannelInfoSpec |
|
352 |
subAspect: allowAcceptHolder |
|
353 |
aspect: allowAcceptHolder |
|
354 |
) |
|
355 |
(SubChannelInfoSpec |
|
356 |
subAspect: allowRemoveHolder |
|
357 |
aspect: allowRemoveHolder |
|
358 |
) |
|
359 |
||
360 |
(SubChannelInfoSpec |
|
361 |
subAspect: inGeneratorHolder |
|
362 |
aspect: list1Holder |
|
363 |
) |
|
364 |
(SubChannelInfoSpec |
|
365 |
subAspect: menuHolder |
|
366 |
aspect: list1MenuHolder |
|
367 |
) |
|
368 |
||
369 |
(SubChannelInfoSpec |
|
370 |
subAspect: selectionHolder |
|
371 |
aspect: selection1Holder |
|
372 |
) |
|
373 |
(SubChannelInfoSpec |
|
374 |
subAspect: showRemovedHolder |
|
375 |
aspect: showRemovedAspect |
|
376 |
) |
|
377 |
||
378 |
(SubChannelInfoSpec |
|
379 |
subAspect: showSameHolder |
|
380 |
aspect: showSameAspect |
|
381 |
) |
|
382 |
) |
|
383 |
createNewApplication: true |
|
384 |
createNewBuilder: true |
|
385 |
postBuildCallback: list1View: |
|
386 |
) |
|
387 |
) |
|
388 |
||
389 |
) |
|
10028 | 390 |
) |
391 |
! |
|
392 |
||
393 |
twoColumnNavigatorSpec |
|
394 |
"This resource specification was automatically generated |
|
395 |
by the UIPainter of ST/X." |
|
396 |
||
397 |
"Do not manually edit this!! If it is corrupted, |
|
398 |
the UIPainter may not be able to read the specification." |
|
399 |
||
400 |
" |
|
10448 | 401 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2 andSelector:#twoColumnNavigatorSpec |
402 |
Tools::ChangeSetBrowser2 new openInterface:#twoColumnNavigatorSpec |
|
10028 | 403 |
" |
404 |
||
405 |
<resource: #canvas> |
|
406 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
407 |
^ |
10028 | 408 |
#(FullSpec |
12125 | 409 |
name: twoColumnNavigatorSpec |
410 |
window: |
|
10028 | 411 |
(WindowSpec |
12125 | 412 |
label: 'Two Column Navigator' |
413 |
name: 'Two Column Navigator' |
|
414 |
min: (Point 10 10) |
|
415 |
bounds: (Rectangle 0 0 300 300) |
|
416 |
) |
|
417 |
component: |
|
10028 | 418 |
(SpecCollection |
12125 | 419 |
collection: ( |
420 |
(VariableHorizontalPanelSpec |
|
421 |
name: 'Columns' |
|
422 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
423 |
component: |
|
424 |
(SpecCollection |
|
425 |
collection: ( |
|
426 |
(SubCanvasSpec |
|
427 |
name: 'FirstColumn' |
|
428 |
hasHorizontalScrollBar: false |
|
429 |
hasVerticalScrollBar: false |
|
430 |
majorKey: #'Tools::ChangeList' |
|
431 |
subAspectHolders: |
|
432 |
(Array |
|
433 |
||
434 |
(SubChannelInfoSpec |
|
435 |
subAspect: allowAcceptHolder |
|
436 |
aspect: allowAcceptHolder |
|
437 |
) |
|
438 |
(SubChannelInfoSpec |
|
439 |
subAspect: allowRemoveHolder |
|
440 |
aspect: allowRemoveHolder |
|
441 |
) |
|
442 |
(SubChannelInfoSpec |
|
443 |
subAspect: inGeneratorHolder |
|
444 |
aspect: list1Holder |
|
445 |
) |
|
446 |
||
447 |
(SubChannelInfoSpec |
|
448 |
subAspect: menuHolder |
|
449 |
aspect: list1MenuHolder |
|
450 |
) |
|
451 |
(SubChannelInfoSpec |
|
452 |
subAspect: outGeneratorHolder |
|
453 |
aspect: list2Holder |
|
454 |
) |
|
455 |
||
456 |
(SubChannelInfoSpec |
|
457 |
subAspect: selectionHolder |
|
458 |
aspect: selection1Holder |
|
459 |
) |
|
460 |
(SubChannelInfoSpec |
|
461 |
subAspect: showRemovedHolder |
|
462 |
aspect: showRemovedAspect |
|
463 |
) |
|
464 |
(SubChannelInfoSpec |
|
465 |
subAspect: showSameHolder |
|
466 |
aspect: showSameAspect |
|
467 |
) |
|
468 |
) |
|
469 |
createNewApplication: true |
|
470 |
createNewBuilder: true |
|
471 |
postBuildCallback: list1View: |
|
472 |
) |
|
473 |
(SubCanvasSpec |
|
474 |
name: 'SecondColumn' |
|
475 |
hasHorizontalScrollBar: false |
|
476 |
hasVerticalScrollBar: false |
|
477 |
majorKey: #'Tools::ChangeList' |
|
478 |
subAspectHolders: |
|
479 |
(Array |
|
480 |
||
481 |
(SubChannelInfoSpec |
|
482 |
subAspect: allowAcceptHolder |
|
483 |
aspect: allowAcceptHolder |
|
484 |
) |
|
485 |
(SubChannelInfoSpec |
|
486 |
subAspect: allowRemoveHolder |
|
487 |
aspect: allowRemoveHolder |
|
488 |
) |
|
489 |
(SubChannelInfoSpec |
|
490 |
subAspect: inGeneratorHolder |
|
491 |
aspect: list2Holder |
|
492 |
) |
|
493 |
||
494 |
(SubChannelInfoSpec |
|
495 |
subAspect: menuHolder |
|
496 |
aspect: list2MenuHolder |
|
497 |
) |
|
498 |
(SubChannelInfoSpec |
|
499 |
subAspect: selectionHolder |
|
500 |
aspect: selection2Holder |
|
501 |
) |
|
502 |
||
503 |
(SubChannelInfoSpec |
|
504 |
subAspect: showRemovedHolder |
|
505 |
aspect: showRemovedAspect |
|
506 |
) |
|
507 |
(SubChannelInfoSpec |
|
508 |
subAspect: showSameHolder |
|
509 |
aspect: showSameAspect |
|
510 |
) |
|
511 |
) |
|
512 |
createNewApplication: true |
|
513 |
createNewBuilder: true |
|
514 |
postBuildCallback: list2View: |
|
515 |
) |
|
516 |
) |
|
517 |
||
518 |
) |
|
519 |
handles: (Any 0.5 1.0) |
|
520 |
) |
|
521 |
) |
|
522 |
||
523 |
) |
|
10028 | 524 |
) |
10448 | 525 |
|
12125 | 526 |
"Modified: / 24-01-2012 / 19:57:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 527 |
! |
528 |
||
529 |
windowSpec |
|
530 |
"This resource specification was automatically generated |
|
531 |
by the UIPainter of ST/X." |
|
532 |
||
533 |
"Do not manually edit this!! If it is corrupted, |
|
534 |
the UIPainter may not be able to read the specification." |
|
535 |
||
536 |
" |
|
537 |
UIPainter new openOnClass:Tools::ChangeSetBrowser andSelector:#windowSpec |
|
538 |
Tools::ChangeSetBrowser new openInterface:#windowSpec |
|
539 |
Tools::ChangeSetBrowser open |
|
540 |
" |
|
541 |
||
542 |
<resource: #canvas> |
|
543 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
544 |
^ |
10028 | 545 |
#(FullSpec |
12125 | 546 |
name: windowSpec |
547 |
window: |
|
10028 | 548 |
(WindowSpec |
12125 | 549 |
label: 'ChangeSet browser' |
550 |
name: 'ChangeSet browser' |
|
551 |
labelChannel: titleHolder |
|
552 |
min: (Point 10 10) |
|
553 |
bounds: (Rectangle 0 0 653 488) |
|
554 |
menu: mainMenu |
|
555 |
) |
|
556 |
component: |
|
10028 | 557 |
(SpecCollection |
12125 | 558 |
collection: ( |
559 |
(MenuPanelSpec |
|
560 |
name: 'ToolBar' |
|
561 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
562 |
menu: toolbarMenu |
|
563 |
textDefault: true |
|
564 |
) |
|
565 |
(UISubSpecification |
|
566 |
name: 'Contents' |
|
567 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
568 |
minorKey: windowSpecWithoutToolbar |
|
569 |
) |
|
570 |
) |
|
571 |
||
572 |
) |
|
10028 | 573 |
) |
574 |
! |
|
575 |
||
576 |
windowSpecForEmbedding |
|
577 |
||
578 |
^self windowSpecWithoutToolbar |
|
579 |
! |
|
580 |
||
581 |
windowSpecWithoutToolbar |
|
582 |
"This resource specification was automatically generated |
|
583 |
by the UIPainter of ST/X." |
|
584 |
||
585 |
"Do not manually edit this!! If it is corrupted, |
|
586 |
the UIPainter may not be able to read the specification." |
|
587 |
||
588 |
" |
|
10333 | 589 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2 andSelector:#windowSpecWithoutToolbar |
590 |
Tools::ChangeSetBrowser2 new openInterface:#windowSpecWithoutToolbar |
|
10028 | 591 |
" |
592 |
||
593 |
<resource: #canvas> |
|
594 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
595 |
^ |
10028 | 596 |
#(FullSpec |
12125 | 597 |
name: windowSpecWithoutToolbar |
598 |
window: |
|
10028 | 599 |
(WindowSpec |
12125 | 600 |
label: 'ChangeSet browser' |
601 |
name: 'ChangeSet browser' |
|
602 |
min: (Point 10 10) |
|
603 |
bounds: (Rectangle 0 0 653 488) |
|
604 |
menu: mainMenu |
|
605 |
) |
|
606 |
component: |
|
10028 | 607 |
(SpecCollection |
12125 | 608 |
collection: ( |
609 |
(VariableVerticalPanelSpec |
|
610 |
name: 'VerticalPanel' |
|
611 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
612 |
component: |
|
613 |
(SpecCollection |
|
614 |
collection: ( |
|
615 |
(SubCanvasSpec |
|
616 |
name: 'NavigatorPanel' |
|
617 |
hasHorizontalScrollBar: false |
|
618 |
hasVerticalScrollBar: false |
|
619 |
specHolder: navigatorSpecHolder |
|
620 |
createNewBuilder: false |
|
621 |
) |
|
622 |
(SubCanvasSpec |
|
623 |
name: 'TextDiffTool' |
|
624 |
hasHorizontalScrollBar: false |
|
625 |
hasVerticalScrollBar: false |
|
626 |
majorKey: #'Tools::TextDiffTool' |
|
627 |
minorKey: windowSpecForEmbedding |
|
628 |
subAspectHolders: |
|
629 |
(Array |
|
630 |
||
631 |
(SubChannelInfoSpec |
|
632 |
subAspect: classHolder |
|
633 |
aspect: classHolder |
|
634 |
) |
|
635 |
(SubChannelInfoSpec |
|
636 |
subAspect: languageHolder |
|
637 |
aspect: languageHolder |
|
638 |
) |
|
639 |
(SubChannelInfoSpec |
|
640 |
subAspect: codeAspectHolder |
|
641 |
aspect: codeAspectHolder |
|
642 |
) |
|
643 |
||
644 |
(SubChannelInfoSpec |
|
645 |
subAspect: labelAHolder |
|
646 |
aspect: labelAHolder |
|
647 |
) |
|
648 |
(SubChannelInfoSpec |
|
649 |
subAspect: labelBHolder |
|
650 |
aspect: labelBHolder |
|
651 |
) |
|
652 |
||
653 |
(SubChannelInfoSpec |
|
654 |
subAspect: textAHolder |
|
655 |
aspect: changeSourceHolder |
|
656 |
) |
|
657 |
(SubChannelInfoSpec |
|
658 |
subAspect: textBHolder |
|
659 |
aspect: imageSourceHolder |
|
660 |
) |
|
661 |
) |
|
662 |
createNewApplication: true |
|
663 |
createNewBuilder: true |
|
664 |
) |
|
665 |
) |
|
666 |
||
667 |
) |
|
668 |
handles: (Any 0.5 1.0) |
|
669 |
) |
|
670 |
) |
|
671 |
||
672 |
) |
|
10028 | 673 |
) |
12125 | 674 |
|
675 |
"Modified: / 03-12-2011 / 10:36:40 / cg" |
|
10028 | 676 |
! ! |
677 |
||
678 |
!ChangeSetBrowser2 class methodsFor:'menu specs'! |
|
679 |
||
680 |
changeMenu |
|
681 |
"This resource specification was automatically generated |
|
682 |
by the MenuEditor of ST/X." |
|
683 |
||
684 |
"Do not manually edit this!! If it is corrupted, |
|
685 |
the MenuEditor may not be able to read the specification." |
|
686 |
||
12125 | 687 |
|
10028 | 688 |
" |
10448 | 689 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#changeMenu |
690 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 changeMenu)) startUp |
|
10028 | 691 |
" |
692 |
||
693 |
<resource: #menu> |
|
694 |
||
12125 | 695 |
^ |
696 |
#(Menu |
|
697 |
( |
|
698 |
(MenuItem |
|
699 |
enabled: hasChangeSelectedAndNotRemoved: |
|
700 |
label: 'Apply' |
|
701 |
itemValue: changeMenuApplySelection: |
|
702 |
translateLabel: true |
|
703 |
isVisible: allowAcceptHolder |
|
704 |
shortcutKey: Accept |
|
705 |
auxValue: 100 |
|
706 |
) |
|
707 |
(MenuItem |
|
708 |
label: 'Apply all' |
|
709 |
itemValue: changeMenuApply: |
|
710 |
translateLabel: true |
|
711 |
isVisible: allowAcceptHolder |
|
712 |
) |
|
713 |
(MenuItem |
|
714 |
label: '-' |
|
715 |
isVisible: allowAcceptHolder |
|
716 |
) |
|
717 |
(MenuItem |
|
718 |
label: 'Delete' |
|
719 |
itemValue: changeMenuDeleteSelection: |
|
720 |
nameKey: Delete |
|
721 |
translateLabel: true |
|
722 |
isVisible: allowRemoveHolder |
|
723 |
shortcutKey: Delete |
|
724 |
) |
|
725 |
(MenuItem |
|
726 |
label: 'Undelete' |
|
727 |
itemValue: changeMenuUndeleteSelection: |
|
728 |
nameKey: Undelete |
|
729 |
translateLabel: true |
|
730 |
isVisible: allowRemoveHolder |
|
731 |
) |
|
732 |
(MenuItem |
|
733 |
label: '-' |
|
734 |
isVisible: allowRemoveHolder |
|
735 |
) |
|
736 |
(MenuItem |
|
737 |
label: 'Select...' |
|
738 |
translateLabel: true |
|
739 |
submenu: |
|
740 |
(Menu |
|
741 |
( |
|
742 |
(MenuItem |
|
743 |
label: 'Select same' |
|
744 |
itemValue: changeMenuSelectSame: |
|
745 |
translateLabel: true |
|
746 |
) |
|
747 |
(MenuItem |
|
748 |
label: 'Select additions (new classes/methods)' |
|
749 |
itemValue: changeMenuSelectAdditions: |
|
750 |
translateLabel: true |
|
751 |
) |
|
752 |
(MenuItem |
|
753 |
label: 'Select removals' |
|
754 |
itemValue: changeMenuSelectRemovals: |
|
755 |
translateLabel: true |
|
756 |
) |
|
757 |
(MenuItem |
|
758 |
label: 'Select differences' |
|
759 |
itemValue: changeMenuSelectDifferences: |
|
760 |
translateLabel: true |
|
761 |
) |
|
762 |
(MenuItem |
|
763 |
label: '-' |
|
764 |
) |
|
765 |
(MenuItem |
|
766 |
label: 'Select all' |
|
767 |
itemValue: changeMenuSelectAll: |
|
768 |
translateLabel: true |
|
769 |
) |
|
770 |
(MenuItem |
|
771 |
label: 'Select none' |
|
772 |
itemValue: changeMenuSelectNone: |
|
773 |
translateLabel: true |
|
774 |
) |
|
775 |
(MenuItem |
|
776 |
label: '-' |
|
777 |
) |
|
778 |
(MenuItem |
|
779 |
label: 'Select using block' |
|
780 |
itemValue: changeMenuSelectUsingBlock: |
|
781 |
translateLabel: true |
|
782 |
) |
|
783 |
) |
|
784 |
nil |
|
785 |
nil |
|
786 |
) |
|
787 |
) |
|
788 |
(MenuItem |
|
789 |
label: '-' |
|
790 |
) |
|
791 |
(MenuItem |
|
792 |
label: 'Show Deleted' |
|
793 |
translateLabel: true |
|
794 |
isVisible: allowRemoveHolder |
|
795 |
indication: showRemovedAspect |
|
796 |
) |
|
797 |
(MenuItem |
|
798 |
label: 'Show Same' |
|
799 |
translateLabel: true |
|
800 |
indication: showSameAspect |
|
801 |
) |
|
802 |
(MenuItem |
|
803 |
label: '-' |
|
804 |
) |
|
805 |
(MenuItem |
|
806 |
label: 'Inspect change' |
|
807 |
itemValue: changeMenuInspect: |
|
808 |
translateLabel: true |
|
809 |
) |
|
810 |
(MenuItem |
|
811 |
enabled: hasSingleChangeSelectedAndCanBrowse: |
|
812 |
label: 'Browse Method(s)' |
|
813 |
itemValue: changeMenuBrowse: |
|
814 |
translateLabel: true |
|
815 |
) |
|
816 |
) |
|
817 |
nil |
|
818 |
nil |
|
819 |
) |
|
820 |
! |
|
821 |
||
822 |
changeMenu1 |
|
823 |
"This resource specification was automatically generated |
|
824 |
by the MenuEditor of ST/X." |
|
825 |
||
826 |
"Do not manually edit this!! If it is corrupted, |
|
827 |
the MenuEditor may not be able to read the specification." |
|
828 |
||
829 |
||
830 |
" |
|
831 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#changeMenu1 |
|
832 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 changeMenu1)) startUp |
|
833 |
" |
|
834 |
||
835 |
<resource: #menu> |
|
836 |
||
837 |
^ |
|
10666 | 838 |
#(Menu |
12125 | 839 |
( |
840 |
(MenuItem |
|
841 |
enabled: hasChangeSelectedAndNotRemoved: |
|
842 |
label: 'Apply' |
|
843 |
itemValue: changeMenuApplySelection: |
|
844 |
translateLabel: true |
|
845 |
isVisible: allowAcceptHolder |
|
846 |
shortcutKey: Accept |
|
847 |
auxValue: 100 |
|
848 |
) |
|
849 |
(MenuItem |
|
850 |
label: 'Apply All' |
|
851 |
itemValue: changeMenuApply: |
|
852 |
translateLabel: true |
|
853 |
isVisible: allowAcceptHolder |
|
854 |
) |
|
855 |
(MenuItem |
|
856 |
label: '-' |
|
857 |
isVisible: allowAcceptHolder |
|
858 |
) |
|
859 |
(MenuItem |
|
860 |
label: 'Delete' |
|
861 |
itemValue: changeMenuDeleteSelection: |
|
862 |
nameKey: Delete |
|
863 |
translateLabel: true |
|
864 |
isVisible: allowRemoveHolder |
|
865 |
shortcutKey: Delete |
|
866 |
) |
|
867 |
(MenuItem |
|
868 |
label: 'Undelete' |
|
869 |
itemValue: changeMenuUndeleteSelection: |
|
870 |
nameKey: Undelete |
|
871 |
translateLabel: true |
|
872 |
isVisible: allowRemoveHolder |
|
873 |
) |
|
874 |
(MenuItem |
|
875 |
label: '-' |
|
876 |
isVisible: allowRemoveHolder |
|
877 |
) |
|
878 |
(MenuItem |
|
879 |
label: 'Select...' |
|
880 |
translateLabel: true |
|
881 |
submenu: |
|
882 |
(Menu |
|
883 |
( |
|
884 |
(MenuItem |
|
885 |
label: 'Select Same' |
|
886 |
itemValue: changeMenuSelectSame: |
|
887 |
translateLabel: true |
|
888 |
) |
|
889 |
(MenuItem |
|
890 |
label: 'Select Additions (new Classes/Methods)' |
|
891 |
itemValue: changeMenuSelectAdditions: |
|
892 |
translateLabel: true |
|
893 |
) |
|
894 |
(MenuItem |
|
895 |
label: 'Select Removals' |
|
896 |
itemValue: changeMenuSelectRemovals: |
|
897 |
translateLabel: true |
|
898 |
) |
|
899 |
(MenuItem |
|
900 |
label: 'Select Differences' |
|
901 |
itemValue: changeMenuSelectDifferences: |
|
902 |
translateLabel: true |
|
903 |
) |
|
904 |
(MenuItem |
|
905 |
label: '-' |
|
906 |
) |
|
907 |
(MenuItem |
|
908 |
label: 'Select All' |
|
909 |
itemValue: changeMenuSelectAll: |
|
910 |
translateLabel: true |
|
911 |
) |
|
912 |
(MenuItem |
|
913 |
label: 'Select None' |
|
914 |
itemValue: changeMenuSelectNone: |
|
915 |
translateLabel: true |
|
916 |
) |
|
917 |
(MenuItem |
|
918 |
label: '-' |
|
919 |
) |
|
920 |
(MenuItem |
|
921 |
label: 'Select using Block' |
|
922 |
itemValue: changeMenuSelectUsingBlock: |
|
923 |
translateLabel: true |
|
924 |
) |
|
925 |
) |
|
926 |
nil |
|
927 |
nil |
|
928 |
) |
|
929 |
) |
|
930 |
(MenuItem |
|
931 |
label: '-' |
|
932 |
) |
|
933 |
(MenuItem |
|
934 |
label: 'Show Deleted' |
|
935 |
translateLabel: true |
|
936 |
isVisible: allowRemoveHolder |
|
937 |
indication: showRemovedAspect |
|
938 |
) |
|
939 |
(MenuItem |
|
940 |
label: 'Show Same' |
|
941 |
translateLabel: true |
|
942 |
indication: showSameAspect |
|
943 |
) |
|
944 |
(MenuItem |
|
945 |
label: '-' |
|
946 |
) |
|
947 |
(MenuItem |
|
948 |
label: 'Inspect Change' |
|
949 |
itemValue: changeMenuInspect: |
|
950 |
translateLabel: true |
|
951 |
) |
|
952 |
(MenuItem |
|
953 |
enabled: hasSingleChangeSelectedAndCanBrowse: |
|
954 |
label: 'Browse Method(s)' |
|
955 |
itemValue: changeMenuBrowse: |
|
956 |
translateLabel: true |
|
957 |
) |
|
958 |
(MenuItem |
|
959 |
enabled: hasSingleChangeSelectedAndCanBrowse: |
|
960 |
label: 'Browse Class(s)' |
|
961 |
itemValue: changeMenuBrowseClass: |
|
962 |
translateLabel: true |
|
963 |
) |
|
964 |
(MenuItem |
|
965 |
label: '-' |
|
966 |
) |
|
967 |
(MenuItem |
|
968 |
enabled: hasSingleChangeSelectedAndCanBrowse: |
|
969 |
label: 'Compare Class Against...' |
|
970 |
itemValue: changeMenuCompareClass: |
|
971 |
translateLabel: true |
|
972 |
) |
|
973 |
) |
|
974 |
nil |
|
975 |
nil |
|
976 |
) |
|
977 |
! |
|
978 |
||
979 |
changeMenu2 |
|
980 |
"This resource specification was automatically generated |
|
981 |
by the MenuEditor of ST/X." |
|
982 |
||
983 |
"Do not manually edit this!! If it is corrupted, |
|
984 |
the MenuEditor may not be able to read the specification." |
|
985 |
||
986 |
||
987 |
" |
|
988 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#changeMenu2 |
|
989 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 changeMenu2)) startUp |
|
990 |
" |
|
991 |
||
992 |
<resource: #menu> |
|
993 |
||
994 |
^ |
|
995 |
#(Menu |
|
996 |
( |
|
997 |
(MenuItem |
|
998 |
enabled: hasChangeSelectedAndNotRemoved: |
|
999 |
label: 'Apply' |
|
1000 |
itemValue: changeMenuApplySelection: |
|
1001 |
translateLabel: true |
|
1002 |
isVisible: allowAcceptHolder |
|
1003 |
shortcutKey: Accept |
|
1004 |
auxValue: 100 |
|
1005 |
) |
|
1006 |
(MenuItem |
|
1007 |
label: 'Apply to End' |
|
1008 |
itemValue: changeMenuApplyToEnd: |
|
1009 |
translateLabel: true |
|
1010 |
isVisible: allowAcceptHolder |
|
1011 |
) |
|
1012 |
(MenuItem |
|
1013 |
label: '-' |
|
1014 |
isVisible: allowAcceptHolder |
|
1015 |
) |
|
1016 |
(MenuItem |
|
1017 |
label: 'Delete' |
|
1018 |
itemValue: changeMenuDeleteSelection: |
|
1019 |
nameKey: Delete |
|
1020 |
translateLabel: true |
|
1021 |
isVisible: allowRemoveHolder |
|
1022 |
shortcutKey: Delete |
|
1023 |
) |
|
1024 |
(MenuItem |
|
1025 |
label: 'Undelete' |
|
1026 |
itemValue: changeMenuUndeleteSelection: |
|
1027 |
nameKey: Undelete |
|
1028 |
translateLabel: true |
|
1029 |
isVisible: allowRemoveHolder |
|
1030 |
) |
|
1031 |
(MenuItem |
|
1032 |
label: '-' |
|
1033 |
isVisible: allowRemoveHolder |
|
1034 |
) |
|
1035 |
(MenuItem |
|
1036 |
label: 'Select...' |
|
1037 |
translateLabel: true |
|
1038 |
submenu: |
|
1039 |
(Menu |
|
1040 |
( |
|
1041 |
(MenuItem |
|
1042 |
label: 'Select Same' |
|
1043 |
itemValue: changeMenuSelectSame: |
|
1044 |
translateLabel: true |
|
1045 |
) |
|
1046 |
(MenuItem |
|
1047 |
label: 'Select Additions (new Classes/Methods)' |
|
1048 |
itemValue: changeMenuSelectAdditions: |
|
1049 |
translateLabel: true |
|
1050 |
) |
|
1051 |
(MenuItem |
|
1052 |
label: 'Select Removals' |
|
1053 |
itemValue: changeMenuSelectRemovals: |
|
1054 |
translateLabel: true |
|
1055 |
) |
|
1056 |
(MenuItem |
|
1057 |
label: 'Select Differences' |
|
1058 |
itemValue: changeMenuSelectDifferences: |
|
1059 |
translateLabel: true |
|
1060 |
) |
|
1061 |
(MenuItem |
|
1062 |
label: '-' |
|
1063 |
) |
|
1064 |
(MenuItem |
|
1065 |
label: 'Select All' |
|
1066 |
itemValue: changeMenuSelectAll: |
|
1067 |
translateLabel: true |
|
1068 |
) |
|
1069 |
(MenuItem |
|
1070 |
label: 'Select None' |
|
1071 |
itemValue: changeMenuSelectNone: |
|
1072 |
translateLabel: true |
|
1073 |
) |
|
1074 |
(MenuItem |
|
1075 |
label: '-' |
|
1076 |
) |
|
1077 |
(MenuItem |
|
1078 |
label: 'Select using Block' |
|
1079 |
itemValue: changeMenuSelectUsingBlock: |
|
1080 |
translateLabel: true |
|
1081 |
) |
|
1082 |
) |
|
1083 |
nil |
|
1084 |
nil |
|
1085 |
) |
|
1086 |
) |
|
1087 |
(MenuItem |
|
1088 |
label: '-' |
|
1089 |
) |
|
1090 |
(MenuItem |
|
1091 |
label: 'Show Deleted' |
|
1092 |
translateLabel: true |
|
1093 |
isVisible: allowRemoveHolder |
|
1094 |
indication: showRemovedAspect |
|
1095 |
) |
|
1096 |
(MenuItem |
|
1097 |
label: 'Show Same' |
|
1098 |
translateLabel: true |
|
1099 |
indication: showSameAspect |
|
1100 |
) |
|
1101 |
(MenuItem |
|
1102 |
label: '-' |
|
1103 |
) |
|
1104 |
(MenuItem |
|
1105 |
label: 'Inspect Change' |
|
1106 |
itemValue: changeMenuInspect: |
|
1107 |
translateLabel: true |
|
1108 |
) |
|
1109 |
(MenuItem |
|
1110 |
enabled: hasSingleChangeSelectedAndCanBrowse: |
|
1111 |
label: 'Browse Method(s)' |
|
1112 |
itemValue: changeMenuBrowse: |
|
1113 |
translateLabel: true |
|
1114 |
) |
|
1115 |
) |
|
1116 |
nil |
|
1117 |
nil |
|
10666 | 1118 |
) |
1119 |
! |
|
1120 |
||
10028 | 1121 |
mainMenu |
1122 |
"This resource specification was automatically generated |
|
1123 |
by the MenuEditor of ST/X." |
|
1124 |
||
1125 |
"Do not manually edit this!! If it is corrupted, |
|
1126 |
the MenuEditor may not be able to read the specification." |
|
1127 |
||
12125 | 1128 |
|
10028 | 1129 |
" |
10448 | 1130 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#mainMenu |
1131 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 mainMenu)) startUp |
|
10028 | 1132 |
" |
1133 |
||
1134 |
<resource: #menu> |
|
1135 |
||
12125 | 1136 |
^ |
10028 | 1137 |
#(Menu |
12125 | 1138 |
( |
1139 |
(MenuItem |
|
1140 |
label: 'File' |
|
1141 |
translateLabel: true |
|
1142 |
submenu: |
|
1143 |
(Menu |
|
1144 |
( |
|
1145 |
(MenuItem |
|
1146 |
label: 'Open...' |
|
1147 |
itemValue: doOpen |
|
1148 |
translateLabel: true |
|
1149 |
isVisible: allowOpenHolder |
|
1150 |
shortcutKey: Ctrlo |
|
1151 |
) |
|
1152 |
(MenuItem |
|
1153 |
label: 'Open Current' |
|
1154 |
itemValue: doOpenCurrent |
|
1155 |
translateLabel: true |
|
1156 |
isVisible: allowOpenHolder |
|
1157 |
) |
|
1158 |
(MenuItem |
|
1159 |
label: 'Save' |
|
1160 |
itemValue: doSave |
|
1161 |
translateLabel: true |
|
1162 |
) |
|
1163 |
(MenuItem |
|
1164 |
label: 'Save As...' |
|
1165 |
itemValue: doSaveAs |
|
1166 |
translateLabel: true |
|
1167 |
) |
|
1168 |
(MenuItem |
|
1169 |
label: '-' |
|
1170 |
) |
|
1171 |
(MenuItem |
|
1172 |
label: 'Exit' |
|
1173 |
itemValue: closeRequest |
|
1174 |
translateLabel: true |
|
1175 |
) |
|
1176 |
) |
|
1177 |
nil |
|
1178 |
nil |
|
1179 |
) |
|
1180 |
) |
|
1181 |
(MenuItem |
|
1182 |
label: 'View' |
|
1183 |
translateLabel: true |
|
1184 |
submenu: |
|
1185 |
(Menu |
|
1186 |
( |
|
1187 |
(MenuItem |
|
1188 |
label: 'List' |
|
1189 |
translateLabel: true |
|
1190 |
choice: navigatorSpecHolder |
|
1191 |
choiceValue: oneColumnNavigatorSpec |
|
1192 |
) |
|
1193 |
(MenuItem |
|
1194 |
label: 'Hierarchical List' |
|
1195 |
translateLabel: true |
|
1196 |
choice: navigatorSpecHolder |
|
1197 |
choiceValue: hierarchicalNavigatorSpec |
|
1198 |
) |
|
1199 |
(MenuItem |
|
1200 |
label: 'Browser Like' |
|
1201 |
translateLabel: true |
|
1202 |
choice: navigatorSpecHolder |
|
1203 |
choiceValue: twoColumnNavigatorSpec |
|
1204 |
) |
|
1205 |
(MenuItem |
|
1206 |
label: '-' |
|
1207 |
) |
|
1208 |
(MenuItem |
|
1209 |
label: 'Show Deleted' |
|
1210 |
translateLabel: true |
|
1211 |
indication: showRemovedAspect |
|
1212 |
) |
|
1213 |
(MenuItem |
|
1214 |
label: 'Show Same' |
|
1215 |
translateLabel: true |
|
1216 |
indication: showSameAspect |
|
1217 |
) |
|
1218 |
) |
|
1219 |
nil |
|
1220 |
nil |
|
1221 |
) |
|
1222 |
) |
|
1223 |
(MenuItem |
|
1224 |
label: 'Loading' |
|
1225 |
translateLabel: true |
|
1226 |
submenu: |
|
1227 |
(Menu |
|
1228 |
( |
|
1229 |
(MenuItem |
|
1230 |
label: 'Set Target Package...' |
|
1231 |
itemValue: setTargetPackage |
|
1232 |
translateLabel: true |
|
1233 |
) |
|
1234 |
(MenuItem |
|
1235 |
label: 'Set Target Namespace...' |
|
1236 |
itemValue: setTargetNamespace |
|
1237 |
translateLabel: true |
|
1238 |
) |
|
1239 |
(MenuItem |
|
1240 |
label: '-' |
|
1241 |
) |
|
1242 |
(MenuItem |
|
1243 |
label: 'Update Changefile' |
|
1244 |
translateLabel: true |
|
1245 |
indication: updateChangeFileHolder |
|
1246 |
) |
|
1247 |
) |
|
1248 |
nil |
|
1249 |
nil |
|
1250 |
) |
|
1251 |
) |
|
1252 |
) |
|
1253 |
nil |
|
1254 |
nil |
|
10028 | 1255 |
) |
12125 | 1256 |
|
1257 |
"Modified: / 27-12-2011 / 10:35:16 / cg" |
|
10028 | 1258 |
! |
1259 |
||
1260 |
toolbarMenu |
|
1261 |
"This resource specification was automatically generated |
|
1262 |
by the MenuEditor of ST/X." |
|
1263 |
||
1264 |
"Do not manually edit this!! If it is corrupted, |
|
1265 |
the MenuEditor may not be able to read the specification." |
|
1266 |
||
12125 | 1267 |
|
10028 | 1268 |
" |
12125 | 1269 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser2 andSelector:#toolbarMenu |
1270 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser2 toolbarMenu)) startUp |
|
10028 | 1271 |
" |
1272 |
||
1273 |
<resource: #menu> |
|
1274 |
||
12125 | 1275 |
^ |
10028 | 1276 |
#(Menu |
12125 | 1277 |
( |
1278 |
(MenuItem |
|
1279 |
activeHelpKey: fileLoad |
|
1280 |
label: 'Open' |
|
1281 |
itemValue: doOpen |
|
1282 |
translateLabel: true |
|
1283 |
isButton: true |
|
1284 |
isVisible: allowOpenHolder |
|
1285 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadFromFileIcon) |
|
1286 |
) |
|
1287 |
(MenuItem |
|
1288 |
activeHelpKey: fileSave |
|
1289 |
label: 'Save' |
|
1290 |
itemValue: doSave |
|
1291 |
translateLabel: true |
|
1292 |
isButton: true |
|
1293 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileAsIcon) |
|
1294 |
) |
|
1295 |
) |
|
1296 |
nil |
|
1297 |
nil |
|
10028 | 1298 |
) |
1299 |
! ! |
|
1300 |
||
1301 |
!ChangeSetBrowser2 class methodsFor:'plugIn spec'! |
|
1302 |
||
1303 |
aspectSelectors |
|
1304 |
"This resource specification was automatically generated |
|
1305 |
by the UIPainter of ST/X." |
|
1306 |
||
1307 |
"Do not manually edit this. If it is corrupted, |
|
1308 |
the UIPainter may not be able to read the specification." |
|
1309 |
||
1310 |
"Return a description of exported aspects; |
|
1311 |
these can be connected to aspects of an embedding application |
|
1312 |
(if this app is embedded in a subCanvas)." |
|
1313 |
||
1314 |
^ #( |
|
12125 | 1315 |
#changesetHolder |
10028 | 1316 |
). |
1317 |
||
1318 |
! ! |
|
1319 |
||
1320 |
!ChangeSetBrowser2 methodsFor:'accessing'! |
|
1321 |
||
12125 | 1322 |
allowAccept: aBoolean |
1323 |
||
1324 |
^self allowAcceptHolder value: aBoolean |
|
1325 |
||
1326 |
"Created: / 24-01-2012 / 19:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 1327 |
! |
1328 |
||
1329 |
allowOpen: aBoolean |
|
1330 |
||
1331 |
self allowOpenHolder value: aBoolean |
|
1332 |
||
1333 |
"Created: / 26-10-2010 / 23:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1334 |
! |
|
1335 |
||
12125 | 1336 |
allowRemove: aBoolean |
1337 |
||
1338 |
^self allowRemoveHolder value: aBoolean |
|
1339 |
||
1340 |
"Created: / 24-01-2012 / 20:00:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1341 |
! |
|
1342 |
||
10028 | 1343 |
beHierarchical |
1344 |
||
1345 |
^self navigatorSpecHolder value: #hierarchicalNavigatorSpec |
|
1346 |
||
1347 |
"Modified: / 14-10-2010 / 15:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1348 |
! |
|
1349 |
||
1350 |
beOneColumn |
|
1351 |
||
1352 |
^self navigatorSpecHolder value: #oneColumnNavigatorSpec |
|
1353 |
||
1354 |
"Modified: / 14-10-2010 / 15:52:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1355 |
! |
|
1356 |
||
1357 |
beTwoColumn |
|
1358 |
||
1359 |
^self navigatorSpecHolder value: #twoColumnNavigatorSpec |
|
1360 |
||
1361 |
"Modified: / 14-10-2010 / 15:51:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1362 |
! |
|
1363 |
||
1364 |
changeset |
|
1365 |
||
1366 |
^self changesetHolder value |
|
1367 |
! |
|
1368 |
||
1369 |
changeset: aChangeSet |
|
1370 |
||
1371 |
self changesetHolder value: aChangeSet |
|
1372 |
! |
|
1373 |
||
10448 | 1374 |
list1View: aSubApplicationView |
1375 |
||
1376 |
list1 := aSubApplicationView application |
|
1377 |
||
1378 |
"Created: / 04-08-2011 / 17:56:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1379 |
! |
|
1380 |
||
1381 |
list2View: aSubApplicationView |
|
1382 |
||
1383 |
list2 := aSubApplicationView application |
|
1384 |
||
1385 |
"Created: / 04-08-2011 / 17:57:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1386 |
! |
|
1387 |
||
10028 | 1388 |
readOnly: aBoolean |
1389 |
||
1390 |
"Created: / 20-07-2010 / 09:48:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1391 |
! |
|
1392 |
||
12125 | 1393 |
targetNamespace:something |
1394 |
targetNamespace := something. |
|
1395 |
! |
|
1396 |
||
1397 |
targetPackage:something |
|
1398 |
targetPackage := something. |
|
1399 |
! |
|
1400 |
||
10028 | 1401 |
theSingleSelectedChange |
1402 |
||
10448 | 1403 |
| change sel | |
10028 | 1404 |
change := nil. |
10448 | 1405 |
sel := selection2Holder value. |
1406 |
sel isNil ifTrue:[ |
|
12125 | 1407 |
sel := selection1Holder value. |
10448 | 1408 |
]. |
1409 |
sel do: |
|
12125 | 1410 |
[:each| |
1411 |
change ifNotNil:[nil]. |
|
1412 |
change ifNil:[change := each]]. |
|
10028 | 1413 |
^change |
10448 | 1414 |
|
1415 |
"Modified: / 04-08-2011 / 18:55:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 1416 |
! |
1417 |
||
1418 |
title: aString |
|
1419 |
||
1420 |
self titleHolder value: aString |
|
1421 |
||
1422 |
"Created: / 26-10-2010 / 23:01:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1423 |
! ! |
|
1424 |
||
1425 |
!ChangeSetBrowser2 methodsFor:'accessing - defaults'! |
|
1426 |
||
1427 |
defaultTitle |
|
1428 |
^ 'No changeset' |
|
1429 |
||
1430 |
"Modified: / 08-04-2011 / 10:10:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1431 |
! ! |
|
1432 |
||
1433 |
!ChangeSetBrowser2 methodsFor:'accessing - menus'! |
|
1434 |
||
10448 | 1435 |
list1MenuHolder |
12125 | 1436 |
^ [ |
1437 |
|menu| |
|
1438 |
||
1439 |
menu := builder menuFor:#changeMenu1. |
|
1440 |
menu allItemsDo:[:item | item argument:list1 ]. |
|
1441 |
menu |
|
10448 | 1442 |
] |
10028 | 1443 |
|
10448 | 1444 |
"Created: / 04-08-2011 / 18:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12125 | 1445 |
"Modified (format): / 05-09-2011 / 16:07:20 / cg" |
10448 | 1446 |
! |
1447 |
||
1448 |
list2MenuHolder |
|
12125 | 1449 |
^ [ |
1450 |
|menu| |
|
1451 |
||
1452 |
menu := builder menuFor:#changeMenu2. |
|
1453 |
menu allItemsDo:[:item | item argument:list2 ]. |
|
1454 |
menu |
|
10448 | 1455 |
] |
1456 |
||
1457 |
"Created: / 04-08-2011 / 18:13:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1458 |
"Modified (format): / 05-09-2011 / 16:07:34 / cg" |
10028 | 1459 |
! ! |
1460 |
||
1461 |
!ChangeSetBrowser2 methodsFor:'actions'! |
|
1462 |
||
1463 |
accept: source |
|
1464 |
||
12125 | 1465 |
| entry chg | |
1466 |
(entry := self theSingleSelectedChange) isNil ifTrue:[^self]. |
|
1467 |
chg := entry change. |
|
1468 |
chg isMethodCodeChange ifTrue: |
|
1469 |
[chg source: source asString] |
|
10028 | 1470 |
|
1471 |
"Modified: / 29-11-2010 / 22:40:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1472 |
"Modified: / 18-11-2011 / 14:56:53 / cg" |
10028 | 1473 |
! |
1474 |
||
1475 |
postBuildSourceView: aView |
|
1476 |
||
10309 | 1477 |
sourceView := aView. |
1478 |
||
10345 | 1479 |
"Modified: / 19-07-2011 / 19:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 1480 |
! ! |
1481 |
||
1482 |
!ChangeSetBrowser2 methodsFor:'aspects'! |
|
1483 |
||
12125 | 1484 |
allowAcceptHolder |
10028 | 1485 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
1486 |
||
12125 | 1487 |
allowAcceptHolder isNil ifTrue:[ |
1488 |
allowAcceptHolder := ValueHolder with: true. |
|
10028 | 1489 |
]. |
12125 | 1490 |
^ allowAcceptHolder |
10028 | 1491 |
|
1492 |
"Modified: / 24-10-2009 / 19:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1493 |
"Created: / 24-01-2012 / 19:50:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 1494 |
! |
1495 |
||
1496 |
allowOpenHolder |
|
1497 |
"return/create the 'allowOpenHolder' value holder (automatically generated)" |
|
1498 |
||
1499 |
allowOpenHolder isNil ifTrue:[ |
|
12125 | 1500 |
allowOpenHolder := ValueHolder with: true. |
10028 | 1501 |
]. |
1502 |
^ allowOpenHolder |
|
1503 |
||
1504 |
"Modified: / 17-03-2011 / 22:32:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1505 |
! |
|
1506 |
||
12125 | 1507 |
allowRemoveHolder |
1508 |
"return/create the 'allowRemoveHolder' value holder (automatically generated)" |
|
1509 |
||
1510 |
allowRemoveHolder isNil ifTrue:[ |
|
1511 |
allowRemoveHolder := ValueHolder with:false. |
|
1512 |
allowRemoveHolder addDependent:self. |
|
1513 |
]. |
|
1514 |
^ allowRemoveHolder |
|
1515 |
||
1516 |
"Modified: / 24-01-2012 / 19:59:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1517 |
! |
|
1518 |
||
1519 |
allowRemoveHolder:something |
|
1520 |
"set the 'showRemovedHolder' value holder (automatically generated)" |
|
1521 |
||
1522 |
|oldValue newValue| |
|
1523 |
||
1524 |
allowRemoveHolder notNil ifTrue:[ |
|
1525 |
oldValue := allowRemoveHolder value. |
|
1526 |
allowRemoveHolder removeDependent:self. |
|
1527 |
]. |
|
1528 |
allowRemoveHolder := something. |
|
1529 |
allowRemoveHolder notNil ifTrue:[ |
|
1530 |
allowRemoveHolder addDependent:self. |
|
1531 |
]. |
|
1532 |
newValue := allowRemoveHolder value. |
|
1533 |
oldValue ~~ newValue ifTrue:[ |
|
1534 |
self |
|
1535 |
update:#value |
|
1536 |
with:newValue |
|
1537 |
from:allowRemoveHolder. |
|
1538 |
]. |
|
1539 |
||
1540 |
"Modified (format): / 24-01-2012 / 19:48:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1541 |
! |
|
1542 |
||
10333 | 1543 |
changeSourceHolder |
1544 |
<resource: #uiAspect> |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1545 |
changeSourceHolder isNil ifTrue: [ |
12125 | 1546 |
changeSourceHolder := nil asValue. |
10333 | 1547 |
]. |
1548 |
^ changeSourceHolder. |
|
1549 |
||
1550 |
"Modified: / 19-07-2011 / 11:54:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1551 |
! |
|
1552 |
||
10028 | 1553 |
changesetHolder |
1554 |
"return/create the 'changesetHolder' value holder (automatically generated)" |
|
1555 |
||
1556 |
changesetHolder isNil ifTrue:[ |
|
12125 | 1557 |
changesetHolder := ValueHolder new. |
1558 |
changesetHolder addDependent:self. |
|
10028 | 1559 |
]. |
1560 |
^ changesetHolder |
|
1561 |
! |
|
1562 |
||
1563 |
changesetHolder:something |
|
1564 |
"set the 'changesetHolder' value holder (automatically generated)" |
|
1565 |
||
1566 |
|oldValue newValue| |
|
1567 |
||
1568 |
changesetHolder notNil ifTrue:[ |
|
12125 | 1569 |
oldValue := changesetHolder value. |
1570 |
changesetHolder removeDependent:self. |
|
10028 | 1571 |
]. |
1572 |
changesetHolder := something. |
|
1573 |
changesetHolder notNil ifTrue:[ |
|
12125 | 1574 |
changesetHolder addDependent:self. |
10028 | 1575 |
]. |
1576 |
newValue := changesetHolder value. |
|
1577 |
oldValue ~~ newValue ifTrue:[ |
|
12125 | 1578 |
self update:#value with:newValue from:changesetHolder. |
10028 | 1579 |
]. |
1580 |
! |
|
1581 |
||
1582 |
classHolder |
|
1583 |
"return/create the 'classHolder' value holder (automatically generated)" |
|
1584 |
||
1585 |
classHolder isNil ifTrue:[ |
|
12125 | 1586 |
classHolder := ValueHolder with:nil. |
10028 | 1587 |
]. |
1588 |
^ classHolder |
|
10345 | 1589 |
|
1590 |
"Modified: / 19-07-2011 / 19:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1591 |
! |
|
1592 |
||
1593 |
codeAspectHolder |
|
1594 |
"return/create the 'codeAspectHolder' value holder (automatically generated)" |
|
1595 |
||
1596 |
codeAspectHolder isNil ifTrue:[ |
|
12125 | 1597 |
codeAspectHolder := ValueHolder new. |
10345 | 1598 |
]. |
1599 |
^ codeAspectHolder |
|
10028 | 1600 |
! |
1601 |
||
10333 | 1602 |
imageSourceHolder |
1603 |
<resource: #uiAspect> |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1604 |
imageSourceHolder isNil ifTrue: [ |
12125 | 1605 |
imageSourceHolder := nil asValue. |
10333 | 1606 |
]. |
1607 |
^ imageSourceHolder. |
|
1608 |
||
1609 |
"Created: / 19-07-2011 / 11:54:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1610 |
! |
|
1611 |
||
1612 |
labelAHolder |
|
1613 |
||
1614 |
^'Change' asValue |
|
1615 |
||
1616 |
"Created: / 19-07-2011 / 11:46:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1617 |
! |
|
1618 |
||
1619 |
labelBHolder |
|
1620 |
||
1621 |
^'Image' asValue |
|
1622 |
||
1623 |
"Created: / 19-07-2011 / 11:46:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1624 |
! |
|
1625 |
||
12125 | 1626 |
languageHolder |
1627 |
languageHolder isNil ifTrue:[ |
|
1628 |
languageHolder := ValueHolder with:nil. |
|
1629 |
]. |
|
1630 |
^ languageHolder |
|
1631 |
||
1632 |
"Modified: / 19-07-2011 / 19:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1633 |
"Created: / 03-12-2011 / 10:37:39 / cg" |
|
1634 |
! |
|
1635 |
||
10448 | 1636 |
list1Holder |
1637 |
"return/create the 'list1Holder' value holder (automatically generated)" |
|
10028 | 1638 |
|
10448 | 1639 |
list1Holder isNil ifTrue:[ |
12125 | 1640 |
list1Holder := ValueHolder new. |
10028 | 1641 |
]. |
10448 | 1642 |
^ list1Holder |
10028 | 1643 |
! |
1644 |
||
10448 | 1645 |
list1Holder:something |
1646 |
"set the 'list1Holder' value holder (automatically generated)" |
|
10028 | 1647 |
|
10448 | 1648 |
list1Holder := something. |
10028 | 1649 |
! |
1650 |
||
10448 | 1651 |
list2Holder |
1652 |
"return/create the 'list2Holder' value holder (automatically generated)" |
|
10028 | 1653 |
|
10448 | 1654 |
list2Holder isNil ifTrue:[ |
12125 | 1655 |
list2Holder := ValueHolder new. |
10448 | 1656 |
]. |
1657 |
^ list2Holder |
|
1658 |
! |
|
10028 | 1659 |
|
10448 | 1660 |
list2Holder:something |
1661 |
"set the 'list2Holder' value holder (automatically generated)" |
|
1662 |
||
1663 |
list2Holder := something. |
|
10028 | 1664 |
! |
1665 |
||
1666 |
navigatorChangesetHolder |
|
1667 |
"return/create the 'navigatorChangesetHolder' value holder (automatically generated)" |
|
1668 |
||
1669 |
navigatorChangesetHolder isNil ifTrue:[ |
|
12125 | 1670 |
navigatorChangesetHolder := ValueHolder new. |
10028 | 1671 |
]. |
1672 |
^ navigatorChangesetHolder |
|
1673 |
! |
|
1674 |
||
1675 |
navigatorSpecHolder |
|
1676 |
<resource: #uiAspect> |
|
1677 |
||
1678 |
navigatorSpecHolder isNil ifTrue:[ |
|
12125 | 1679 |
navigatorSpecHolder := ValueHolder with: |
1680 |
"/#hierarchicalNavigatorSpec |
|
1681 |
"/#twoColumnNavigatorSpec |
|
1682 |
#oneColumnNavigatorSpec |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1683 |
|
10028 | 1684 |
]. |
1685 |
^ navigatorSpecHolder. |
|
1686 |
||
12125 | 1687 |
|
1688 |
"Modified: / 24-01-2012 / 17:13:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 1689 |
! |
1690 |
||
1691 |
selection1Holder |
|
1692 |
"return/create the 'selection1Holder' value holder (automatically generated)" |
|
1693 |
||
1694 |
selection1Holder isNil ifTrue:[ |
|
12125 | 1695 |
selection1Holder := ValueHolder new. |
1696 |
selection1Holder addDependent:self. |
|
10028 | 1697 |
]. |
1698 |
^ selection1Holder |
|
10448 | 1699 |
! |
10028 | 1700 |
|
10448 | 1701 |
selection1Holder:something |
1702 |
"set the 'selection1Holder' value holder (automatically generated)" |
|
1703 |
||
10450 | 1704 |
|oldValue newValue| |
1705 |
||
1706 |
selection1Holder notNil ifTrue:[ |
|
12125 | 1707 |
oldValue := selection1Holder value. |
1708 |
selection1Holder removeDependent:self. |
|
10450 | 1709 |
]. |
10448 | 1710 |
selection1Holder := something. |
10450 | 1711 |
selection1Holder notNil ifTrue:[ |
12125 | 1712 |
selection1Holder addDependent:self. |
10450 | 1713 |
]. |
1714 |
newValue := selection1Holder value. |
|
1715 |
oldValue ~~ newValue ifTrue:[ |
|
12125 | 1716 |
self update:#value with:newValue from:selection1Holder. |
10450 | 1717 |
]. |
10028 | 1718 |
! |
1719 |
||
10448 | 1720 |
selection2Holder |
1721 |
"return/create the 'selection2Holder' value holder (automatically generated)" |
|
10028 | 1722 |
|
10448 | 1723 |
selection2Holder isNil ifTrue:[ |
12125 | 1724 |
selection2Holder := ValueHolder new. |
1725 |
selection2Holder addDependent:self. |
|
10028 | 1726 |
]. |
10448 | 1727 |
^ selection2Holder |
1728 |
! |
|
10028 | 1729 |
|
10448 | 1730 |
selection2Holder:something |
1731 |
"set the 'selection2Holder' value holder (automatically generated)" |
|
1732 |
||
10450 | 1733 |
|oldValue newValue| |
1734 |
||
1735 |
selection2Holder notNil ifTrue:[ |
|
12125 | 1736 |
oldValue := selection2Holder value. |
1737 |
selection2Holder removeDependent:self. |
|
10450 | 1738 |
]. |
10448 | 1739 |
selection2Holder := something. |
10450 | 1740 |
selection2Holder notNil ifTrue:[ |
12125 | 1741 |
selection2Holder addDependent:self. |
10450 | 1742 |
]. |
1743 |
newValue := selection2Holder value. |
|
1744 |
oldValue ~~ newValue ifTrue:[ |
|
12125 | 1745 |
self update:#value with:newValue from:selection2Holder. |
10450 | 1746 |
]. |
10028 | 1747 |
! |
1748 |
||
1749 |
showRemovedAspect |
|
1750 |
"return/create the 'showDeletedAspect' value holder (automatically generated)" |
|
1751 |
||
1752 |
showRemovedAspect isNil ifTrue:[ |
|
12125 | 1753 |
showRemovedAspect := (AspectAdaptor forAspect:#showRemoved) |
1754 |
subject: self class. |
|
10028 | 1755 |
]. |
1756 |
^ showRemovedAspect |
|
1757 |
! |
|
1758 |
||
1759 |
showRemovedAspect:aValueHolder |
|
1760 |
showRemovedAspect := aValueHolder. |
|
1761 |
! |
|
1762 |
||
10448 | 1763 |
showSameAspect |
1764 |
"return/create the 'showSameAspect' value holder (automatically generated)" |
|
1765 |
||
1766 |
showSameAspect isNil ifTrue:[ |
|
12125 | 1767 |
showSameAspect := ValueHolder with: true. |
10448 | 1768 |
]. |
1769 |
^ showSameAspect |
|
1770 |
||
1771 |
"Modified: / 04-08-2011 / 18:42:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1772 |
! |
|
1773 |
||
1774 |
showSameAspect:something |
|
1775 |
"set the 'showSameAspect' value holder (automatically generated)" |
|
1776 |
||
1777 |
showSameAspect := something. |
|
1778 |
! |
|
1779 |
||
10028 | 1780 |
titleHolder |
1781 |
"return/create the 'titleHolder' value holder (automatically generated)" |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1782 |
|
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1783 |
titleHolder isNil |
12125 | 1784 |
ifTrue:[ titleHolder := ValueHolder with:self defaultTitle. ]. |
10028 | 1785 |
^ titleHolder |
1786 |
||
1787 |
"Modified: / 26-10-2010 / 22:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1788 |
! |
1789 |
||
1790 |
updateChangefileHolder |
|
1791 |
updateChangefileHolder isNil ifTrue:[ |
|
1792 |
updateChangefileHolder := false asValue. |
|
1793 |
]. |
|
1794 |
^ updateChangefileHolder |
|
1795 |
||
1796 |
"Created: / 07-09-2011 / 15:54:03 / cg" |
|
10028 | 1797 |
! ! |
1798 |
||
1799 |
!ChangeSetBrowser2 methodsFor:'change & update'! |
|
1800 |
||
1801 |
changesetChanged |
|
1802 |
||
1803 |
self titleHolder value: (self changeset name ? (self defaultTitle)). |
|
10448 | 1804 |
self list1Holder value: self getNavigatorChangeSet |
10028 | 1805 |
|
10448 | 1806 |
"Modified: / 04-08-2011 / 18:05:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 1807 |
! |
1808 |
||
1809 |
selectionChanged |
|
1810 |
| change | |
|
12125 | 1811 |
|
10028 | 1812 |
change := self theSingleSelectedChange. |
10345 | 1813 |
(change notNil and:[change change isCompositeChange not]) ifTrue:[ |
12125 | 1814 |
self classHolder value: change changeClass. |
1815 |
changeSourceHolder setValue: change changeSource; changed: #value. |
|
1816 |
imageSourceHolder setValue: change imageSource; changed: #value. |
|
1817 |
||
1818 |
codeAspectHolder value: |
|
1819 |
(change change isMethodCodeChange |
|
1820 |
ifTrue:[#method] |
|
1821 |
ifFalse:[#expression]). |
|
1822 |
self showSource: true |
|
10309 | 1823 |
] ifFalse:[ |
12125 | 1824 |
self showSource: false. |
1825 |
self classHolder value: nil. |
|
1826 |
changeSourceHolder setValue: nil; changed: #value. |
|
1827 |
imageSourceHolder setValue: nil; changed: #value. |
|
10309 | 1828 |
]. |
10028 | 1829 |
|
1830 |
"Created: / 24-10-2009 / 19:49:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1831 |
"Modified (format): / 03-12-2011 / 10:38:45 / cg" |
10028 | 1832 |
! |
1833 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1834 |
update: aspect with: param from: sender |
10028 | 1835 |
|
1836 |
sender == changesetHolder ifTrue: [ ^ self changesetChanged ]. |
|
10448 | 1837 |
sender == selection1Holder ifTrue: [ ^ self selectionChanged ]. |
1838 |
sender == selection2Holder ifTrue: [ ^ self selectionChanged ]. |
|
10028 | 1839 |
|
1840 |
"Created: / 24-10-2009 / 19:29:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1841 |
! ! |
|
1842 |
||
1843 |
!ChangeSetBrowser2 methodsFor:'menu actions'! |
|
1844 |
||
1845 |
doOpen |
|
1846 |
||
1847 |
| file changeset | |
|
12125 | 1848 |
file := Dialog requestFileName:'Select Changeset to Load' pattern:'*.chg;*.st'. |
1849 |
file isNil ifTrue:[^self]. |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1850 |
[changeset := ChangeSet fromFile: file] |
12125 | 1851 |
on: Error |
1852 |
do: [:ex|Dialog error: 'Error when loading changeset: ',ex description. ^self]. |
|
10028 | 1853 |
changesetFile := file. |
1854 |
self title: file asFilename baseName asString. |
|
1855 |
self doOpen: changeset |
|
1856 |
||
1857 |
"Modified: / 08-04-2011 / 10:11:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 1858 |
"Modified: / 27-12-2011 / 10:39:36 / cg" |
10028 | 1859 |
! |
1860 |
||
1861 |
doOpen: aChangeSet |
|
1862 |
||
1863 |
self changesetHolder value: aChangeSet |
|
1864 |
||
1865 |
"Created: / 05-12-2009 / 13:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1866 |
! |
|
1867 |
||
1868 |
doOpenCurrent |
|
1869 |
||
12125 | 1870 |
self doOpen: (ChangeSet fromFile: ObjectMemory nameForChanges) |
10028 | 1871 |
|
1872 |
"Created: / 05-12-2009 / 13:44:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1873 |
! |
|
1874 |
||
1875 |
doSave |
|
1876 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1877 |
changesetFile |
12125 | 1878 |
ifNil:[self doSaveAs] |
1879 |
ifNotNil:[self doSaveAs: changesetFile] |
|
10028 | 1880 |
|
1881 |
"Modified: / 24-10-2009 / 22:55:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1882 |
! |
|
1883 |
||
1884 |
doSaveAs |
|
1885 |
||
1886 |
| file | |
|
12125 | 1887 |
file := Dialog requestFileName:'Select File for Save' default: (changesetFile ? 'somechanges.chg') pattern:('*.chg'). |
1888 |
file isNil ifTrue:[^self]. |
|
10028 | 1889 |
self doSaveAs: file. |
12125 | 1890 |
|
1891 |
"Modified: / 27-12-2011 / 10:39:52 / cg" |
|
10028 | 1892 |
! |
1893 |
||
1894 |
doSaveAs: newFile |
|
1895 |
||
1896 |
[ |
|
12125 | 1897 |
| s | |
1898 |
s := newFile asFilename writeStream. |
|
1899 |
[self changeset fileOutOn: s] ensure:[s close]. |
|
1900 |
changesetFile := newFile. |
|
10028 | 1901 |
] on: Error do: |
12125 | 1902 |
[:ex|Dialog warn: 'Erorr saving changes: ' , ex description] |
1903 |
! |
|
1904 |
||
1905 |
setTargetNamespace |
|
1906 |
"specify an st/x namespace to be used as default" |
|
1907 |
||
1908 |
| nsName | |
|
1909 |
||
1910 |
nsName := Dialog |
|
1911 |
requestNameSpace:'Namepace to load code into:' |
|
1912 |
initialAnswer:targetNamespace. |
|
1913 |
nsName isEmptyOrNil ifTrue:[^self]. |
|
1914 |
||
1915 |
targetNamespace := nsName. |
|
1916 |
"/ self targetNamespaceNameHolder value:('Target-Namespace: ',targetNamespace). |
|
1917 |
||
1918 |
"Created: / 07-09-2011 / 12:49:42 / cg" |
|
1919 |
! |
|
1920 |
||
1921 |
setTargetPackage |
|
1922 |
"specify an st/x package identifier to be used as default" |
|
1923 |
||
1924 |
| package | |
|
1925 |
||
1926 |
package := Dialog |
|
1927 |
requestProject:'Default Smalltalk/X package to load code into:' |
|
1928 |
initialAnswer:targetPackage |
|
1929 |
suggestions:#(). |
|
1930 |
package isNil ifTrue:[^self]. |
|
1931 |
||
1932 |
targetPackage := "lastPackage := "package. |
|
1933 |
"/ self targetPackageHolder value:('Target-Package: ',targetPackage). |
|
1934 |
||
1935 |
"Created: / 07-09-2011 / 12:47:15 / cg" |
|
10028 | 1936 |
! ! |
1937 |
||
1938 |
!ChangeSetBrowser2 methodsFor:'menu actions - changes'! |
|
1939 |
||
10448 | 1940 |
changeMenuApply: changeList |
10028 | 1941 |
| changesToApply | |
12125 | 1942 |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
1943 |
changesToApply := OrderedCollection new. |
10028 | 1944 |
self changesDo:[:chg|chg removed ifFalse:[changesToApply add: chg]]. |
10448 | 1945 |
self changeMenuApplyChanges: changesToApply. |
12125 | 1946 |
list2 notNil ifTrue:[ |
1947 |
"/ to get the =-icons |
|
1948 |
list2 updateList |
|
1949 |
]. |
|
10028 | 1950 |
|
10448 | 1951 |
"Created: / 04-08-2011 / 17:26:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12125 | 1952 |
"Modified: / 28-12-2011 / 15:49:00 / cg" |
10028 | 1953 |
! |
1954 |
||
10448 | 1955 |
changeMenuApplySelection: changeList |
10028 | 1956 |
|
10450 | 1957 |
changeList selection do:[:change|self changeMenuApplyChange:change change]. |
12125 | 1958 |
list2 notNil ifTrue:[ |
1959 |
"/ to get the =-icons |
|
1960 |
list2 updateList |
|
1961 |
]. |
|
10028 | 1962 |
|
10448 | 1963 |
"Created: / 04-08-2011 / 17:27:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12125 | 1964 |
"Modified (format): / 28-12-2011 / 15:48:53 / cg" |
1965 |
! |
|
1966 |
||
1967 |
changeMenuApplyToEnd: changeList |
|
1968 |
|lastIdx| |
|
1969 |
||
1970 |
lastIdx := changeList selectionIndices max. |
|
1971 |
changeList list from:lastIdx do:[:change | self changeMenuApplyChange:change change]. |
|
1972 |
list2 notNil ifTrue:[ |
|
1973 |
"/ to get the =-icons |
|
1974 |
list2 updateList |
|
1975 |
]. |
|
1976 |
||
1977 |
"Created: / 04-08-2011 / 17:27:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1978 |
"Created: / 27-12-2011 / 10:53:00 / cg" |
|
10028 | 1979 |
! |
1980 |
||
10448 | 1981 |
changeMenuBrowse: changeList |
12125 | 1982 |
|changes methods classes| |
1983 |
||
1984 |
changeList == list1 ifTrue:[ |
|
1985 |
changes := selection1Holder value. |
|
1986 |
] ifFalse:[ |
|
1987 |
changes := selection2Holder value. |
|
1988 |
]. |
|
1989 |
changes := changes collect:[:c | c change]. |
|
1990 |
"/ changes := changeList listHolder value collect:[:c | c change]. |
|
1991 |
(changes conform:[:c | c isClassDefinitionChange]) ifTrue:[ |
|
1992 |
classes := (changes collect:[:c | c changeClass]). |
|
1993 |
UserPreferences current systemBrowserClass |
|
1994 |
browseClasses:classes title:'selected monticello classes'. |
|
1995 |
] ifFalse:[ |
|
1996 |
methods := OrderedCollection new. |
|
1997 |
changes do:[:each | |
|
1998 |
each isCompositeChange ifTrue:[ |
|
1999 |
each changes do:[:each2 | each2 isMethodChange ifTrue:[ methods add:each2 changeMethod ]] |
|
2000 |
] ifFalse:[ |
|
2001 |
each isMethodChange ifTrue:[ |
|
2002 |
methods add:(each changeMethod). |
|
2003 |
] |
|
2004 |
] |
|
2005 |
]. |
|
2006 |
(methods includes:nil) ifTrue:[ |
|
2007 |
Dialog warn:('%1 methods are not present in the image' bindWith:(methods occurrencesOf:nil)). |
|
2008 |
methods := methods reject:[:m | m isNil]. |
|
2009 |
methods isEmpty ifTrue:[^ self]. |
|
2010 |
]. |
|
2011 |
UserPreferences current systemBrowserClass |
|
2012 |
browseMethods:methods title:'selected monticello methods' sort:false. |
|
2013 |
]. |
|
2014 |
||
2015 |
"Created: / 04-08-2011 / 17:27:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2016 |
"Modified: / 05-09-2011 / 16:17:48 / cg" |
|
2017 |
! |
|
2018 |
||
2019 |
changeMenuBrowseClass: changeList |
|
2020 |
|changes classes addThemChanges cls| |
|
2021 |
||
2022 |
changeList == list1 ifTrue:[ |
|
2023 |
changes := selection1Holder value. |
|
2024 |
] ifFalse:[ |
|
2025 |
changes := selection2Holder value. |
|
2026 |
]. |
|
2027 |
changes := changes collect:[:eachListEntry | eachListEntry change]. |
|
2028 |
||
2029 |
classes := Set new. |
|
2030 |
addThemChanges := |
|
2031 |
[:c | |
|
2032 |
c isClassDefinitionChange ifTrue:[ |
|
2033 |
classes add:c changeClass theNonMetaclass |
|
2034 |
] ifFalse:[ |
|
2035 |
c isMethodChange ifTrue:[ |
|
2036 |
cls := c changeMethod isNil |
|
2037 |
ifTrue:[ c changeClass ] |
|
2038 |
ifFalse:[ c changeMethod mclass theNonMetaclass ]. |
|
2039 |
classes add:cls |
|
2040 |
] ifFalse:[ |
|
2041 |
c isCompositeChange ifTrue:[ |
|
2042 |
c changes do:addThemChanges |
|
2043 |
] |
|
2044 |
] |
|
2045 |
] |
|
2046 |
]. |
|
2047 |
changes do:addThemChanges. |
|
2048 |
||
2049 |
UserPreferences current systemBrowserClass |
|
2050 |
browseClasses:classes title:'selected monticello classes'. |
|
10666 | 2051 |
|
2052 |
"Created: / 04-08-2011 / 17:27:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 2053 |
"Created: / 05-09-2011 / 16:08:35 / cg" |
2054 |
! |
|
2055 |
||
2056 |
changeMenuCompareClass: changeList |
|
2057 |
|changes classNames classNameToClassMapping lastNameSpace |
|
2058 |
addClassName addThemChanges existingClasses |
|
2059 |
allChanges changeSet1 changeSet2 diffSet| |
|
2060 |
||
2061 |
changeList == list1 ifTrue:[ |
|
2062 |
changes := selection1Holder value. |
|
2063 |
] ifFalse:[ |
|
2064 |
changes := selection2Holder value. |
|
2065 |
]. |
|
2066 |
changes := changes collect:[:eachListEntry | eachListEntry change]. |
|
2067 |
||
2068 |
classNameToClassMapping := Dictionary new. |
|
2069 |
classNames := Set new. |
|
2070 |
allChanges := ChangeSet new. |
|
2071 |
existingClasses := Set new. |
|
2072 |
||
2073 |
addClassName := |
|
2074 |
[:nmArg | |
|
2075 |
|nm ns existingClass goodAnswer| |
|
2076 |
||
2077 |
nm := nmArg. |
|
2078 |
existingClass := Smalltalk classNamed:nm. |
|
2079 |
||
2080 |
existingClass notNil ifTrue:[ |
|
2081 |
goodAnswer := nm |
|
2082 |
] ifFalse:[ |
|
2083 |
ns := NameSpace allNameSpaces |
|
2084 |
detect:[:ns | (ns classNamed:nm) notNil ] |
|
2085 |
ifNone:nil. |
|
2086 |
ns notNil ifTrue:[ |
|
2087 |
goodAnswer := (ns classNamed:nm) name. |
|
2088 |
] ifFalse:[ |
|
2089 |
goodAnswer := nm. |
|
2090 |
(lastNameSpace notNil |
|
2091 |
and:[ lastNameSpace isNamespace |
|
2092 |
and:[(lastNameSpace classNamed:nm) notNil ]] |
|
2093 |
) ifTrue:[ |
|
2094 |
goodAnswer := (lastNameSpace classNamed:nm) name. |
|
2095 |
] ifFalse:[ |
|
2096 |
(lastNameSpace notNil |
|
2097 |
and:[ lastNameSpace isBehavior |
|
2098 |
and:[(lastNameSpace privateClassesAt:nm asSymbol) notNil ]] |
|
2099 |
) ifTrue:[ |
|
2100 |
goodAnswer := (lastNameSpace privateClassesAt:nm asSymbol) name. |
|
2101 |
] |
|
2102 |
]. |
|
2103 |
]. |
|
2104 |
]. |
|
2105 |
nm := Dialog |
|
2106 |
request:('Class to compare for "%1"?' bindWith:nmArg) |
|
2107 |
initialAnswer:goodAnswer. |
|
2108 |
nm isNil ifTrue:[^ self]. |
|
2109 |
nm notEmpty ifTrue:[ |
|
2110 |
existingClass := Smalltalk at:nm asSymbol. |
|
2111 |
]. |
|
2112 |
existingClass notNil ifTrue:[ |
|
2113 |
classNameToClassMapping at:nmArg put:existingClass. |
|
2114 |
existingClasses add:existingClass. |
|
2115 |
]. |
|
2116 |
classNames add:nmArg |
|
2117 |
]. |
|
2118 |
||
2119 |
addThemChanges := [:changes | |
|
2120 |
"/ collect classes and mappings |
|
2121 |
changes do:[:c | |
|
2122 |
c isClassDefinitionChange ifTrue:[ |
|
2123 |
addClassName value:(c className). |
|
2124 |
allChanges add:c. |
|
2125 |
]]. |
|
2126 |
||
2127 |
changes do:[:c | |
|
2128 |
c isMethodChange ifTrue:[ |
|
2129 |
(classNames includes:(c className)) ifFalse:[ |
|
2130 |
addClassName value:(c className). |
|
2131 |
]. |
|
2132 |
allChanges add:c. |
|
2133 |
]]. |
|
2134 |
||
2135 |
changes do:[:c | |
|
2136 |
c isCompositeChange ifTrue:[ |
|
2137 |
addThemChanges value:(c changes) |
|
2138 |
]. |
|
2139 |
]. |
|
2140 |
]. |
|
2141 |
||
2142 |
changes do:addThemChanges. |
|
2143 |
||
2144 |
"/ now, build a diffset and present it... |
|
2145 |
changeSet1 := allChanges. |
|
2146 |
changeSet2 := ChangeSet new. |
|
2147 |
existingClasses do:[:cls | |
|
2148 |
changeSet2 addAll:(ChangeSet forExistingClass:cls). |
|
2149 |
]. |
|
2150 |
diffSet := changeSet1 diffSetsAgainst:changeSet2. |
|
2151 |
||
2152 |
(UserPreferences versionDiffViewerClass) |
|
2153 |
openOnDiffSet:diffSet |
|
2154 |
labelA:'Monticello' |
|
2155 |
labelB:'Current (In Image)' |
|
2156 |
title:'Diffs' |
|
2157 |
ignoreExtensions:false. |
|
2158 |
||
2159 |
"Created: / 04-08-2011 / 17:27:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2160 |
"Created: / 01-12-2011 / 18:36:44 / cg" |
|
10943
39d815d28b9d
added: #changeMenuCompareClass:
Claus Gittinger <cg@exept.de>
parents:
10914
diff
changeset
|
2161 |
! |
39d815d28b9d
added: #changeMenuCompareClass:
Claus Gittinger <cg@exept.de>
parents:
10914
diff
changeset
|
2162 |
|
10448 | 2163 |
changeMenuDeleteSelection: changeList |
10028 | 2164 |
|
2165 |
self selectionDo:[:chg|chg removed: true] |
|
2166 |
||
2167 |
"Modified: / 29-10-2010 / 13:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10448 | 2168 |
"Created: / 04-08-2011 / 17:28:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2169 |
! |
2170 |
||
10448 | 2171 |
changeMenuInspect: changeList |
10028 | 2172 |
|
2173 |
| changes | |
|
2174 |
changes := OrderedCollection new: 1. |
|
2175 |
self selectionDo:[:chg|changes add: chg]. |
|
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2176 |
changes size = 1 |
12125 | 2177 |
ifTrue:[changes anyOne inspect] |
2178 |
ifFalse:[changes inspect]. |
|
10028 | 2179 |
|
10448 | 2180 |
"Created: / 04-08-2011 / 17:28:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2181 |
! |
2182 |
||
10448 | 2183 |
changeMenuInspectChangeset: changeList |
10028 | 2184 |
self changesetHolder value inspect. |
10448 | 2185 |
|
2186 |
"Created: / 04-08-2011 / 17:28:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 2187 |
! |
2188 |
||
10448 | 2189 |
changeMenuSelectAdditions: changeList |
10028 | 2190 |
|
10448 | 2191 |
self changeMenuSelectIn: changeList suchThat:[:change|change delta = #+] |
10028 | 2192 |
|
10448 | 2193 |
"Created: / 04-08-2011 / 17:29:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2194 |
! |
2195 |
||
10448 | 2196 |
changeMenuSelectAll: changeList |
10028 | 2197 |
|
10448 | 2198 |
self changeMenuSelectIn: changeList suchThat:[:change|true] |
10028 | 2199 |
|
10448 | 2200 |
"Created: / 04-08-2011 / 17:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2201 |
! |
2202 |
||
10448 | 2203 |
changeMenuSelectDifferences: changeList |
10028 | 2204 |
|
10448 | 2205 |
self changeMenuSelectIn: changeList suchThat:[:change|change delta = #~] |
10028 | 2206 |
|
10448 | 2207 |
"Created: / 04-08-2011 / 17:29:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2208 |
! |
2209 |
||
10448 | 2210 |
changeMenuSelectNone: changeList |
10028 | 2211 |
|
10448 | 2212 |
self changeMenuSelectIn: changeList suchThat:[:change|false] |
10028 | 2213 |
|
10448 | 2214 |
"Created: / 04-08-2011 / 17:30:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2215 |
! |
2216 |
||
10448 | 2217 |
changeMenuSelectRemovals: changeList |
10028 | 2218 |
|
10448 | 2219 |
self changeMenuSelectIn: changeList suchThat:[:change|change delta = #-] |
10028 | 2220 |
|
10448 | 2221 |
"Modified: / 29-10-2010 / 13:18:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2222 |
"Created: / 04-08-2011 / 17:35:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 2223 |
! |
2224 |
||
10448 | 2225 |
changeMenuSelectSame: changeList |
10028 | 2226 |
|
10448 | 2227 |
self changeMenuSelectIn: changeList suchThat:[:change|change delta = #=] |
10028 | 2228 |
|
10448 | 2229 |
"Modified: / 29-10-2010 / 13:18:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2230 |
"Created: / 04-08-2011 / 17:35:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 2231 |
! |
2232 |
||
10448 | 2233 |
changeMenuSelectUsingBlock: changeList |
10028 | 2234 |
|
2235 |
|conditionBlockString conditionBlock dialog textHolder template| |
|
2236 |
||
2237 |
template := |
|
2238 |
'[:change| |
|
2239 |
"/ Define condition for selection below: |
|
2240 |
"/ change is an instance of Change |
|
2241 |
"/ change will be selected if and only if block returns true |
|
2242 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2243 |
|
10028 | 2244 |
true"/always select the change |
2245 |
] |
|
2246 |
'. |
|
2247 |
||
2248 |
LastSelectionConditionString isNil ifTrue:[ |
|
12125 | 2249 |
LastSelectionConditionString := template. |
10028 | 2250 |
]. |
2251 |
||
2252 |
||
2253 |
textHolder := ValueHolder new. |
|
2254 |
dialog := Dialog |
|
12125 | 2255 |
forRequestText:(resources string:'Enter condition for selection') |
2256 |
lines:20 |
|
2257 |
columns:70 |
|
2258 |
initialAnswer:LastSelectionConditionString |
|
2259 |
model:textHolder. |
|
10028 | 2260 |
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]). |
2261 |
dialog open. |
|
2262 |
dialog accepted ifFalse:[^ self]. |
|
2263 |
||
2264 |
conditionBlockString := textHolder value. |
|
2265 |
LastSelectionConditionString := conditionBlockString. |
|
2266 |
||
2267 |
conditionBlock := Parser evaluate:conditionBlockString. |
|
2268 |
conditionBlock isBlock ifFalse:[ |
|
12125 | 2269 |
self error:'Bad selection block (syntax error?)'. |
2270 |
^ self |
|
10028 | 2271 |
]. |
2272 |
||
10448 | 2273 |
self changeMenuSelectIn: changeList suchThat: conditionBlock |
10028 | 2274 |
|
2275 |
"Modified: / 29-10-2010 / 13:05:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10448 | 2276 |
"Created: / 04-08-2011 / 17:42:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2277 |
! |
2278 |
||
10448 | 2279 |
changeMenuUndeleteSelection: changeList |
10028 | 2280 |
|
2281 |
self selectionDo:[:chg|chg removed: false] |
|
2282 |
||
2283 |
"Modified: / 29-10-2010 / 13:53:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10448 | 2284 |
"Created: / 04-08-2011 / 17:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2285 |
! ! |
|
2286 |
||
2287 |
!ChangeSetBrowser2 methodsFor:'menu actions - changes - helpers'! |
|
2288 |
||
2289 |
changeMenuApplyChange: aChange |
|
2290 |
||
12125 | 2291 |
"/ aChange isClassDefinitionChange ifTrue: |
2292 |
"/ [(Smalltalk at: aChange superClassName asSymbol) |
|
2293 |
"/ ifNil:[^self error: 'Nil superclass']]. |
|
2294 |
||
2295 |
self withWaitCursorDo:[ |
|
2296 |
(MCStXNamespaceQuery , Class nameSpaceQuerySignal) |
|
2297 |
answer:(NameSpace name:(targetNamespace ? 'Smalltalk')) |
|
2298 |
do: [ |
|
2299 |
(MCStXPackageQuery , Class packageQuerySignal) |
|
2300 |
answer: self targetPackage |
|
2301 |
do: [ |
|
2302 |
MCInteractiveLoadingQuery answer: true do:[ |
|
2303 |
updateChangefileHolder value ifTrue:[ |
|
2304 |
aChange apply |
|
2305 |
] ifFalse:[ |
|
2306 |
Class withoutUpdatingChangesDo:[ |
|
2307 |
aChange apply |
|
2308 |
] |
|
2309 |
]. |
|
2310 |
] |
|
2311 |
]. |
|
2312 |
]. |
|
2313 |
]. |
|
10448 | 2314 |
|
2315 |
"Modified: / 29-10-2010 / 14:57:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 2316 |
"Modified: / 07-09-2011 / 22:24:57 / cg" |
10448 | 2317 |
! |
2318 |
||
2319 |
changeMenuApplyChanges: changesToApply |
|
2320 |
||
2321 |
| changesThatFailToApply | |
|
2322 |
||
2323 |
changesThatFailToApply := ChangeSet new. |
|
2324 |
ProgressIndicator |
|
12125 | 2325 |
displayProgress:'Applying changes...' |
2326 |
at:(Screen default center) |
|
2327 |
from:200 to:400 |
|
2328 |
during:[:val | |
|
2329 |
1 to: changesToApply size do: |
|
2330 |
[:i| |
|
2331 |
val value:((100 / changesToApply size) * i) rounded. |
|
2332 |
[self changeMenuApplyChange: (changesToApply at: i)] |
|
2333 |
on: Error do:[changesThatFailToApply add: (changesToApply at: i)]]] |
|
10448 | 2334 |
|
2335 |
"Created: / 04-08-2011 / 17:26:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2336 |
! |
|
2337 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2338 |
changeMenuSelectIn: changeList suchThat:conditionBlock |
10448 | 2339 |
|
2340 |
| sel | |
|
2341 |
sel := OrderedCollection new. |
|
2342 |
changeList listHolder value do: [:chg|(conditionBlock value: chg) ifTrue:[sel add: chg]]. |
|
2343 |
changeList selectionHolder value: sel. |
|
2344 |
||
2345 |
"Created: / 04-08-2011 / 17:29:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10028 | 2346 |
! ! |
2347 |
||
2348 |
!ChangeSetBrowser2 methodsFor:'private'! |
|
2349 |
||
12125 | 2350 |
changesDo:aBlock |
2351 |
self changeset do:aBlock. |
|
2352 |
||
2353 |
"Created: / 30-08-2011 / 14:30:58 / cg" |
|
2354 |
! |
|
2355 |
||
10028 | 2356 |
getNavigatorChangeSet |
2357 |
||
2358 |
| changeset | |
|
2359 |
changeset := changesetHolder value deepCopy. |
|
2360 |
(changeset isKindOf: ChangeSet) ifFalse: |
|
12125 | 2361 |
[changeset := ChangeSet withAll: changeset]. |
10028 | 2362 |
|
2363 |
(self navigatorSpecHolder value ~= #oneColumnNavigatorSpec) |
|
12125 | 2364 |
ifTrue:[^changeset groupByClass]. |
10028 | 2365 |
|
2366 |
"Default" |
|
2367 |
^changeset |
|
2368 |
||
2369 |
"Created: / 24-10-2009 / 19:31:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2370 |
"Modified: / 20-07-2010 / 09:46:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2371 |
! |
|
2372 |
||
2373 |
redrawChangeListViews |
|
2374 |
||
10448 | 2375 |
list1 notNil ifTrue:[ |
12125 | 2376 |
list1 builder window allSubViewsDo: [:v|v redraw] |
10448 | 2377 |
]. |
2378 |
list2 notNil ifTrue:[ |
|
12125 | 2379 |
list2 builder window allSubViewsDo: [:v|v redraw] |
10448 | 2380 |
]. |
10028 | 2381 |
|
2382 |
"Created: / 16-03-2011 / 22:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2383 |
! |
|
2384 |
||
10453 | 2385 |
selectionDo: aBlock |
2386 |
||
10467
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2387 |
"/ | applyBlock | |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2388 |
"/ applyBlock := [:e|aBlock value: e change]. |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2389 |
"/ |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2390 |
"/ selectionHolder value isEmptyOrNil ifTrue:[ |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2391 |
"/ (self navigatorChangesetHolder value ? #()) do: aBlock |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2392 |
"/ ] ifFalse:[ |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2393 |
"/ selection1Holder value isEmptyOrNil not |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2394 |
"/ ifTrue:[selection1Holder value do: applyBlock] |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2395 |
"/ ifFalse:[selectionHolder value do: applyBlock]. |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2396 |
"/ ]. |
d6bd6c9c5a1b
oops - I messed it up, when resolving conflicts...
Claus Gittinger <cg@exept.de>
parents:
10453
diff
changeset
|
2397 |
"/ self redrawChangeListViews |
10453 | 2398 |
|
2399 |
"Created: / 29-10-2010 / 13:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2400 |
"Modified: / 08-04-2011 / 10:15:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2401 |
"Modified: / 04-08-2011 / 19:06:31 / cg" |
|
2402 |
! |
|
2403 |
||
10309 | 2404 |
showSource: aBoolean |
2405 |
||
2406 |
| panel | |
|
2407 |
||
2408 |
||
2409 |
"Not yet implemented" |
|
2410 |
||
2411 |
^self. |
|
2412 |
||
2413 |
sourceView ifNil:[^self]. |
|
2414 |
panel := builder componentAt: #VerticalPanel. |
|
2415 |
aBoolean ifTrue:[ |
|
12125 | 2416 |
(panel subViews includes: sourceView) ifTrue:[^self]. |
2417 |
panel addSubView: sourceView. |
|
10309 | 2418 |
] ifFalse:[ |
12125 | 2419 |
(panel subViews includes: sourceView) ifFalse:[^self]. |
2420 |
panel removeSubView: sourceView. |
|
2421 |
sourceView setId: nil. |
|
10309 | 2422 |
|
2423 |
] |
|
2424 |
||
2425 |
"Created: / 11-07-2011 / 16:06:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 2426 |
! |
2427 |
||
2428 |
targetPackage |
|
2429 |
^ targetPackage ? PackageId noProjectID |
|
2430 |
||
2431 |
"Created: / 07-09-2011 / 20:12:04 / cg" |
|
10028 | 2432 |
! ! |
2433 |
||
2434 |
!ChangeSetBrowser2 methodsFor:'queries'! |
|
2435 |
||
2436 |
canApplyChanges |
|
2437 |
||
2438 |
^true |
|
2439 |
||
2440 |
"Created: / 29-10-2010 / 13:07:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2441 |
! |
|
2442 |
||
2443 |
canDrop: somethign |
|
2444 |
||
12125 | 2445 |
self breakPoint:#jv. |
10028 | 2446 |
|
2447 |
"Created: / 20-03-2011 / 21:34:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
12125 | 2448 |
"Modified: / 07-09-2011 / 20:21:15 / cg" |
10028 | 2449 |
! |
2450 |
||
10448 | 2451 |
hasChangeSelectedAndNotRemoved: changeList |
10028 | 2452 |
|
10448 | 2453 |
| sel | |
2454 |
sel := changeList selection. |
|
2455 |
sel isEmptyOrNil ifTrue:[^false]. |
|
2456 |
^(sel anySatisfy:[:each|each removed]) not |
|
10028 | 2457 |
|
10380
f2a255ec6fc9
not ifTrue -> ifFalse (trying the rewrite tool ;-)
Claus Gittinger <cg@exept.de>
parents:
10370
diff
changeset
|
2458 |
"Modified: / 24-07-2011 / 06:52:28 / cg" |
10448 | 2459 |
"Created: / 04-08-2011 / 18:23:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2460 |
! |
2461 |
||
10448 | 2462 |
hasSingleChangeSelectedAndCanBrowse: changeList |
10028 | 2463 |
|
10448 | 2464 |
| sel | |
2465 |
sel := changeList selection. |
|
2466 |
sel isEmptyOrNil ifTrue:[^false]. |
|
2467 |
^true |
|
10028 | 2468 |
|
10448 | 2469 |
"Created: / 04-08-2011 / 18:25:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10028 | 2470 |
! ! |
2471 |
||
12125 | 2472 |
!ChangeSetBrowser2::ChangeEditor class methodsFor:'documentation'! |
2473 |
||
2474 |
documentation |
|
2475 |
" |
|
2476 |
A simple, embeddable window to show a single change. |
|
2477 |
If readonlyHolder's value is false, then user is |
|
2478 |
allowed to edit the change (i.e., modify the source code) |
|
2479 |
||
2480 |
[author:] |
|
2481 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
2482 |
||
2483 |
[instance variables:] |
|
2484 |
||
2485 |
[class variables:] |
|
2486 |
||
2487 |
[see also:] |
|
2488 |
||
2489 |
" |
|
2490 |
! |
|
2491 |
||
2492 |
examples |
|
2493 |
" |
|
2494 |
Starting the application: |
|
2495 |
[exBegin] |
|
2496 |
Tools::ChangeEditor open |
|
2497 |
||
2498 |
[exEnd] |
|
2499 |
||
2500 |
more examples to be added: |
|
2501 |
[exBegin] |
|
2502 |
... add code fragment for |
|
2503 |
... executable example here ... |
|
2504 |
[exEnd] |
|
2505 |
" |
|
2506 |
! ! |
|
2507 |
||
2508 |
!ChangeSetBrowser2::ChangeEditor class methodsFor:'interface specs'! |
|
2509 |
||
2510 |
windowSpec |
|
2511 |
"This resource specification was automatically generated |
|
2512 |
by the UIPainter of ST/X." |
|
2513 |
||
2514 |
"Do not manually edit this!! If it is corrupted, |
|
2515 |
the UIPainter may not be able to read the specification." |
|
2516 |
||
2517 |
" |
|
2518 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2::ChangeEditor andSelector:#windowSpec |
|
2519 |
Tools::ChangeSetBrowser2::ChangeEditor new openInterface:#windowSpec |
|
2520 |
Tools::ChangeSetBrowser2::ChangeEditor open |
|
2521 |
" |
|
2522 |
||
2523 |
<resource: #canvas> |
|
2524 |
||
2525 |
^ |
|
2526 |
#(FullSpec |
|
2527 |
name: windowSpec |
|
2528 |
window: |
|
2529 |
(WindowSpec |
|
2530 |
label: 'Change Editor' |
|
2531 |
name: 'Change Editor' |
|
2532 |
min: (Point 10 10) |
|
2533 |
bounds: (Rectangle 0 0 579 341) |
|
2534 |
) |
|
2535 |
component: |
|
2536 |
(SpecCollection |
|
2537 |
collection: ( |
|
2538 |
(SubCanvasSpec |
|
2539 |
name: 'TextDiffTool' |
|
2540 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
2541 |
hasHorizontalScrollBar: false |
|
2542 |
hasVerticalScrollBar: false |
|
2543 |
majorKey: #'Tools::TextDiffTool' |
|
2544 |
minorKey: windowSpecForEmbedding |
|
2545 |
subAspectHolders: |
|
2546 |
(Array |
|
2547 |
||
2548 |
(SubChannelInfoSpec |
|
2549 |
subAspect: classHolder |
|
2550 |
aspect: classAspect |
|
2551 |
) |
|
2552 |
(SubChannelInfoSpec |
|
2553 |
subAspect: codeAspectHolder |
|
2554 |
aspect: codeAspect |
|
2555 |
) |
|
2556 |
||
2557 |
(SubChannelInfoSpec |
|
2558 |
subAspect: labelAHolder |
|
2559 |
aspect: labelAHolder |
|
2560 |
) |
|
2561 |
(SubChannelInfoSpec |
|
2562 |
subAspect: labelBHolder |
|
2563 |
aspect: labelBHolder |
|
2564 |
) |
|
2565 |
||
2566 |
(SubChannelInfoSpec |
|
2567 |
subAspect: showDiffHolder |
|
2568 |
aspect: showdiffHolder |
|
2569 |
) |
|
2570 |
(SubChannelInfoSpec |
|
2571 |
subAspect: textAHolder |
|
2572 |
aspect: sourceChangeHolder |
|
2573 |
) |
|
2574 |
||
2575 |
(SubChannelInfoSpec |
|
2576 |
subAspect: textBHolder |
|
2577 |
aspect: sourceImageHolder |
|
2578 |
) |
|
2579 |
) |
|
2580 |
createNewApplication: true |
|
2581 |
createNewBuilder: true |
|
2582 |
) |
|
2583 |
) |
|
2584 |
||
2585 |
) |
|
2586 |
) |
|
2587 |
! ! |
|
2588 |
||
2589 |
!ChangeSetBrowser2::ChangeEditor methodsFor:'accessing'! |
|
2590 |
||
2591 |
sourceChangeHolder |
|
2592 |
^ sourceChangeHolder |
|
2593 |
! |
|
2594 |
||
2595 |
sourceChangeHolder:something |
|
2596 |
sourceChangeHolder := something. |
|
2597 |
! |
|
2598 |
||
2599 |
sourceImageHolder |
|
2600 |
^ sourceImageHolder |
|
2601 |
! |
|
2602 |
||
2603 |
sourceImageHolder:something |
|
2604 |
sourceImageHolder := something. |
|
2605 |
! ! |
|
2606 |
||
2607 |
!ChangeSetBrowser2::ChangeEditor methodsFor:'aspects'! |
|
2608 |
||
2609 |
changeHolder |
|
2610 |
"return/create the 'changeHolder' value holder (automatically generated)" |
|
2611 |
||
2612 |
changeHolder isNil ifTrue:[ |
|
2613 |
changeHolder := ValueHolder new. |
|
2614 |
changeHolder addDependent:self. |
|
2615 |
]. |
|
2616 |
^ changeHolder |
|
2617 |
! |
|
2618 |
||
2619 |
changeHolder:something |
|
2620 |
"set the 'changeHolder' value holder (automatically generated)" |
|
2621 |
||
2622 |
|oldValue newValue| |
|
2623 |
||
2624 |
changeHolder notNil ifTrue:[ |
|
2625 |
oldValue := changeHolder value. |
|
2626 |
changeHolder removeDependent:self. |
|
2627 |
]. |
|
2628 |
changeHolder := something. |
|
2629 |
changeHolder notNil ifTrue:[ |
|
2630 |
changeHolder addDependent:self. |
|
2631 |
]. |
|
2632 |
newValue := changeHolder value. |
|
2633 |
oldValue ~~ newValue ifTrue:[ |
|
2634 |
self update:#value with:newValue from:changeHolder. |
|
2635 |
]. |
|
2636 |
! |
|
2637 |
||
2638 |
classAspect |
|
2639 |
||
2640 |
^(AspectAdaptor forAspect: #changeClass) |
|
2641 |
subjectChannel: self changeHolder |
|
2642 |
||
2643 |
"Created: / 29-11-2011 / 11:21:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2644 |
! |
|
2645 |
||
2646 |
codeAspect |
|
2647 |
||
2648 |
^BlockValue |
|
2649 |
with: [:change| |
|
2650 |
change isMethodCodeChange |
|
2651 |
ifTrue:[#method] |
|
2652 |
ifFalse:[#expression] |
|
2653 |
] argument: self changeHolder |
|
2654 |
||
2655 |
"Created: / 29-11-2011 / 11:21:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2656 |
! |
|
2657 |
||
2658 |
labelAText |
|
2659 |
||
2660 |
^'Change' |
|
2661 |
||
2662 |
"Created: / 27-11-2011 / 14:59:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2663 |
! |
|
2664 |
||
2665 |
labelBText |
|
2666 |
||
2667 |
^'Current (in image)' |
|
2668 |
||
2669 |
"Created: / 27-11-2011 / 14:59:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2670 |
! |
|
2671 |
||
2672 |
readonlyHolder |
|
2673 |
"return/create the 'readonlyHolder' value holder (automatically generated)" |
|
2674 |
||
2675 |
readonlyHolder isNil ifTrue:[ |
|
2676 |
readonlyHolder := ValueHolder new. |
|
2677 |
readonlyHolder addDependent:self. |
|
2678 |
]. |
|
2679 |
^ readonlyHolder |
|
2680 |
! |
|
2681 |
||
2682 |
readonlyHolder:something |
|
2683 |
"set the 'readonlyHolder' value holder (automatically generated)" |
|
2684 |
||
2685 |
|oldValue newValue| |
|
2686 |
||
2687 |
readonlyHolder notNil ifTrue:[ |
|
2688 |
oldValue := readonlyHolder value. |
|
2689 |
readonlyHolder removeDependent:self. |
|
2690 |
]. |
|
2691 |
readonlyHolder := something. |
|
2692 |
readonlyHolder notNil ifTrue:[ |
|
2693 |
readonlyHolder addDependent:self. |
|
2694 |
]. |
|
2695 |
newValue := readonlyHolder value. |
|
2696 |
oldValue ~~ newValue ifTrue:[ |
|
2697 |
self update:#value with:newValue from:readonlyHolder. |
|
2698 |
]. |
|
2699 |
! |
|
2700 |
||
2701 |
showdiffHolder |
|
2702 |
"return/create the 'showdiffHolder' value holder (automatically generated)" |
|
2703 |
||
2704 |
showdiffHolder isNil ifTrue:[ |
|
2705 |
showdiffHolder := ValueHolder new. |
|
2706 |
]. |
|
2707 |
^ showdiffHolder |
|
2708 |
! |
|
2709 |
||
2710 |
showdiffHolder:something |
|
2711 |
"set the 'showdiffHolder' value holder (automatically generated)" |
|
2712 |
||
2713 |
showdiffHolder := something. |
|
2714 |
! ! |
|
2715 |
||
2716 |
!ChangeSetBrowser2::ChangeEditor methodsFor:'change & update'! |
|
2717 |
||
2718 |
changeChanged |
|
2719 |
||
2720 |
"changeHolder has changed, update sources etc..." |
|
2721 |
||
2722 |
| change | |
|
2723 |
change := changeHolder value. |
|
2724 |
||
2725 |
sourceChangeHolder value: change changeSource. |
|
2726 |
sourceImageHolder value: change imageSource. |
|
2727 |
||
2728 |
"Created: / 29-11-2011 / 11:15:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2729 |
! |
|
2730 |
||
2731 |
update:something with:aParameter from:changedObject |
|
2732 |
"Invoked when an object that I depend upon sends a change notification." |
|
2733 |
||
2734 |
||
2735 |
changedObject == changeHolder ifTrue:[ |
|
2736 |
self changeChanged. |
|
2737 |
^ self. |
|
2738 |
]. |
|
2739 |
super update:something with:aParameter from:changedObject |
|
2740 |
||
2741 |
"Modified: / 29-11-2011 / 11:15:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2742 |
! ! |
|
2743 |
||
10028 | 2744 |
!ChangeSetBrowser2 class methodsFor:'documentation'! |
2745 |
||
10450 | 2746 |
version |
12125 | 2747 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.31 2012/01/25 17:49:51 vrany Exp $' |
10450 | 2748 |
! |
2749 |
||
10028 | 2750 |
version_CVS |
12125 | 2751 |
^ '§Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.31 2012/01/25 17:49:51 vrany Exp §' |
10028 | 2752 |
! |
2753 |
||
2754 |
version_SVN |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11198
diff
changeset
|
2755 |
^ '$Id: Tools__ChangeSetBrowser.st 7486 2009-10-26 22:06:24Z vranyj1 $' |
12125 | 2756 |
! ! |