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