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