10028
|
1 |
"
|
10065
|
2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
|
|
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
|
|
31 |
instanceVariableNames:'changesetHolder titleHolder allowOpenHolder changesetFile
|
|
32 |
navigatorChangesetHolder navigatorSpecHolder selectionHolder
|
10345
|
33 |
classHolder codeAspectHolder selection1Holder
|
|
34 |
list1GeneratorHolder showRemovedAspect acceptEnabledHolder
|
|
35 |
changeListViews sourceView changeSourceHolder imageSourceHolder'
|
10028
|
36 |
classVariableNames:'ShowRemoved LastSelectionConditionString'
|
|
37 |
poolDictionaries:''
|
|
38 |
category:'Interface-Browsers-ChangeSet'
|
|
39 |
!
|
|
40 |
|
|
41 |
!ChangeSetBrowser2 class methodsFor:'documentation'!
|
|
42 |
|
|
43 |
copyright
|
|
44 |
"
|
10065
|
45 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
|
|
46 |
All Rights Reserved
|
|
47 |
|
|
48 |
Permission is hereby granted, free of charge, to any person
|
|
49 |
obtaining a copy of this software and associated documentation
|
|
50 |
files (the 'Software'), to deal in the Software without
|
|
51 |
restriction, including without limitation the rights to use,
|
|
52 |
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
53 |
copies of the Software, and to permit persons to whom the
|
|
54 |
Software is furnished to do so, subject to the following
|
|
55 |
conditions:
|
10028
|
56 |
|
10065
|
57 |
The above copyright notice and this permission notice shall be
|
|
58 |
included in all copies or substantial portions of the Software.
|
|
59 |
|
|
60 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
61 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
62 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
63 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
64 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
65 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
66 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
67 |
OTHER DEALINGS IN THE SOFTWARE.
|
10028
|
68 |
"
|
|
69 |
! !
|
|
70 |
|
|
71 |
!ChangeSetBrowser2 class methodsFor:'instance creation'!
|
|
72 |
|
|
73 |
on: aChangeSet
|
|
74 |
|
|
75 |
^self on: aChangeSet label: aChangeSet name
|
|
76 |
|
|
77 |
"Modified: / 26-10-2010 / 22:51:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
78 |
!
|
|
79 |
|
|
80 |
on: aChangeSet label: aString
|
|
81 |
|
|
82 |
^self on: aChangeSet label: aString setupWith: [:browser]
|
|
83 |
|
|
84 |
"Created: / 26-10-2010 / 22:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
85 |
!
|
|
86 |
|
|
87 |
on: aChangeSet label: label setupWith: aBlock
|
|
88 |
|
|
89 |
| browser |
|
|
90 |
|
|
91 |
browser := self new.
|
|
92 |
browser
|
|
93 |
changeset: aChangeSet;
|
|
94 |
title: label.
|
|
95 |
aBlock value: browser.
|
|
96 |
^browser
|
|
97 |
|
|
98 |
"Created: / 26-10-2010 / 22:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
99 |
! !
|
|
100 |
|
|
101 |
!ChangeSetBrowser2 class methodsFor:'accessing'!
|
|
102 |
|
|
103 |
showRemoved
|
|
104 |
|
|
105 |
^ShowRemoved == true
|
|
106 |
!
|
|
107 |
|
|
108 |
showRemoved: aBoolean
|
|
109 |
|
|
110 |
ShowRemoved := aBoolean
|
|
111 |
! !
|
|
112 |
|
|
113 |
!ChangeSetBrowser2 class methodsFor:'help specs'!
|
|
114 |
|
|
115 |
helpSpec
|
|
116 |
"This resource specification was automatically generated
|
|
117 |
by the UIHelpTool of ST/X."
|
|
118 |
|
|
119 |
"Do not manually edit this!! If it is corrupted,
|
|
120 |
the UIHelpTool may not be able to read the specification."
|
|
121 |
|
|
122 |
"
|
|
123 |
UIHelpTool openOnClass:Tools::ChangeSetBrowser
|
|
124 |
"
|
|
125 |
|
|
126 |
<resource: #help>
|
|
127 |
|
|
128 |
^ super helpSpec addPairsFrom:#(
|
|
129 |
|
|
130 |
#fileLoad
|
|
131 |
''
|
|
132 |
|
|
133 |
#fileSave
|
|
134 |
''
|
|
135 |
|
|
136 |
)
|
|
137 |
! !
|
|
138 |
|
|
139 |
!ChangeSetBrowser2 class methodsFor:'interface opening'!
|
|
140 |
|
|
141 |
confirmChanges: aChangeSet
|
|
142 |
|
|
143 |
^self confirmChanges: aChangeSet label: 'Apply following changes?'
|
|
144 |
|
|
145 |
"Modified: / 08-11-2010 / 18:01:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
146 |
!
|
|
147 |
|
|
148 |
confirmChanges:aChangeSet label: aString
|
|
149 |
"Hmm, DialogBox class layout options are quite limited :-(("
|
|
150 |
|
|
151 |
|browser browserView dialog|
|
|
152 |
|
10309
|
153 |
browser := self on: aChangeSet.
|
10028
|
154 |
browser acceptEnabled: false.
|
|
155 |
browser showRemovedAspect: (true asValue).
|
|
156 |
browserView := ApplicationSubView new
|
|
157 |
client:browser
|
10309
|
158 |
spec:#windowSpecForEmbedding.
|
10028
|
159 |
dialog := (Dialog new)
|
|
160 |
addComponent:browserView withHeight: 300;
|
|
161 |
addAbortAndOkButtons.
|
|
162 |
dialog label: aString.
|
|
163 |
dialog buttonPanel
|
|
164 |
layout:(LayoutFrame fractions:(0.0 @ 1.0 corner:1.0 @ 1.0)
|
|
165 |
offsets:(0 @ -30 corner:0 @ 0)).
|
|
166 |
browserView layout:(LayoutFrame fractions:(0.0 @ 0.0 corner:1.0 @ 1.0)
|
|
167 |
offsets:(0 @ 0 corner:0 @ -30)).
|
|
168 |
dialog
|
|
169 |
okAction:
|
|
170 |
[^browser navigatorChangesetHolder value condenseChangesForRemoved];
|
|
171 |
abortAction:
|
|
172 |
[^#()].
|
10345
|
173 |
dialog openWithExtent: 800@700.
|
10028
|
174 |
^#()
|
|
175 |
|
|
176 |
"
|
10333
|
177 |
Tools::ChangeSetBrowser2
|
10028
|
178 |
confirmChanges:
|
10333
|
179 |
(ChangeSet current copyFrom: ((ChangeSet current size - 10) max: 1) to: ChangeSet current size)
|
10028
|
180 |
label: 'Last 10 changes...'
|
|
181 |
"
|
|
182 |
|
|
183 |
"Created: / 08-11-2010 / 17:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
184 |
"Modified (format): / 01-07-2011 / 16:34:06 / cg"
|
10345
|
185 |
"Modified: / 19-07-2011 / 19:39:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10028
|
186 |
!
|
|
187 |
|
|
188 |
open
|
|
189 |
|
|
190 |
super open.
|
|
191 |
|
|
192 |
"Created: / 26-10-2010 / 23:18:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
193 |
!
|
|
194 |
|
|
195 |
openOn: aChangeSet
|
|
196 |
|
|
197 |
^(self on: aChangeSet) open
|
|
198 |
!
|
|
199 |
|
|
200 |
openOn: aChangeSet label: aString
|
|
201 |
|
|
202 |
^self openOn: aChangeSet label: aString setupWith: [:browser]
|
|
203 |
|
|
204 |
"Created: / 26-10-2010 / 22:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
205 |
!
|
|
206 |
|
|
207 |
openOn: aChangeSet label: aString setupWith: aBlock
|
|
208 |
|
|
209 |
^(self on: aChangeSet label: aString setupWith: aBlock) open
|
|
210 |
|
|
211 |
"Created: / 26-10-2010 / 23:07:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
212 |
! !
|
|
213 |
|
|
214 |
!ChangeSetBrowser2 class methodsFor:'interface specs'!
|
|
215 |
|
|
216 |
hierarchicalNavigatorSpec
|
|
217 |
"This resource specification was automatically generated
|
|
218 |
by the UIPainter of ST/X."
|
|
219 |
|
|
220 |
"Do not manually edit this!! If it is corrupted,
|
|
221 |
the UIPainter may not be able to read the specification."
|
|
222 |
|
|
223 |
"
|
|
224 |
UIPainter new openOnClass:Tools::ChangeSetBrowser andSelector:#hierarchicalNavigatorSpec
|
|
225 |
Tools::ChangeSetBrowser new openInterface:#hierarchicalNavigatorSpec
|
|
226 |
"
|
|
227 |
|
|
228 |
<resource: #canvas>
|
|
229 |
|
|
230 |
^
|
|
231 |
#(FullSpec
|
|
232 |
name: hierarchicalNavigatorSpec
|
|
233 |
window:
|
|
234 |
(WindowSpec
|
|
235 |
label: 'Hierarchical Navigator'
|
|
236 |
name: 'Hierarchical Navigator'
|
|
237 |
min: (Point 10 10)
|
|
238 |
bounds: (Rectangle 0 0 300 300)
|
|
239 |
)
|
|
240 |
component:
|
|
241 |
(SpecCollection
|
|
242 |
collection: (
|
|
243 |
(SubCanvasSpec
|
|
244 |
name: 'ChangeList'
|
|
245 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
246 |
hasHorizontalScrollBar: false
|
|
247 |
hasVerticalScrollBar: false
|
|
248 |
majorKey: #'Tools::HierarchicalChangeList'
|
|
249 |
subAspectHolders:
|
|
250 |
(Array
|
|
251 |
|
|
252 |
(SubChannelInfoSpec
|
|
253 |
subAspect: acceptEnabledHolder
|
|
254 |
aspect: acceptEnabledHolder
|
|
255 |
)
|
|
256 |
(SubChannelInfoSpec
|
|
257 |
subAspect: inGeneratorHolder
|
|
258 |
aspect: navigatorChangesetHolder
|
|
259 |
)
|
|
260 |
|
|
261 |
(SubChannelInfoSpec
|
|
262 |
subAspect: menuHolder
|
|
263 |
aspect: changeMenuHolder
|
|
264 |
)
|
|
265 |
(SubChannelInfoSpec
|
|
266 |
subAspect: selectionHolder
|
|
267 |
aspect: selectionHolder
|
|
268 |
)
|
|
269 |
|
|
270 |
(SubChannelInfoSpec
|
|
271 |
subAspect: showRemovedHolder
|
|
272 |
aspect: showRemovedAspect
|
|
273 |
)
|
|
274 |
)
|
|
275 |
createNewApplication: true
|
|
276 |
createNewBuilder: true
|
|
277 |
postBuildCallback: addChangeListView:
|
|
278 |
)
|
|
279 |
)
|
|
280 |
|
|
281 |
)
|
|
282 |
)
|
|
283 |
!
|
|
284 |
|
|
285 |
oneColumnNavigatorSpec
|
|
286 |
"This resource specification was automatically generated
|
|
287 |
by the UIPainter of ST/X."
|
|
288 |
|
|
289 |
"Do not manually edit this!! If it is corrupted,
|
|
290 |
the UIPainter may not be able to read the specification."
|
|
291 |
|
|
292 |
"
|
|
293 |
UIPainter new openOnClass:Tools::ChangeSetBrowser andSelector:#oneColumnNavigatorSpec
|
|
294 |
Tools::ChangeSetBrowser new openInterface:#oneColumnNavigatorSpec
|
|
295 |
"
|
|
296 |
|
|
297 |
<resource: #canvas>
|
|
298 |
|
|
299 |
^
|
|
300 |
#(FullSpec
|
|
301 |
name: oneColumnNavigatorSpec
|
|
302 |
window:
|
|
303 |
(WindowSpec
|
|
304 |
label: 'One Column Navigator'
|
|
305 |
name: 'One Column Navigator'
|
|
306 |
min: (Point 10 10)
|
|
307 |
bounds: (Rectangle 0 0 300 300)
|
|
308 |
)
|
|
309 |
component:
|
|
310 |
(SpecCollection
|
|
311 |
collection: (
|
|
312 |
(SubCanvasSpec
|
|
313 |
name: 'ChangeList'
|
|
314 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
315 |
hasHorizontalScrollBar: false
|
|
316 |
hasVerticalScrollBar: false
|
|
317 |
majorKey: #'Tools::ChangeList'
|
|
318 |
subAspectHolders:
|
|
319 |
(Array
|
|
320 |
|
|
321 |
(SubChannelInfoSpec
|
|
322 |
subAspect: acceptEnabledHolder
|
|
323 |
aspect: acceptEnabledHolder
|
|
324 |
)
|
|
325 |
(SubChannelInfoSpec
|
|
326 |
subAspect: inGeneratorHolder
|
|
327 |
aspect: changesetHolder
|
|
328 |
)
|
|
329 |
|
|
330 |
(SubChannelInfoSpec
|
|
331 |
subAspect: menuHolder
|
|
332 |
aspect: changeMenuHolder
|
|
333 |
)
|
|
334 |
(SubChannelInfoSpec
|
|
335 |
subAspect: selectionHolder
|
|
336 |
aspect: selectionHolder
|
|
337 |
)
|
|
338 |
|
|
339 |
(SubChannelInfoSpec
|
|
340 |
subAspect: showRemovedHolder
|
|
341 |
aspect: showRemovedAspect
|
|
342 |
)
|
|
343 |
)
|
|
344 |
createNewApplication: true
|
|
345 |
createNewBuilder: true
|
|
346 |
postBuildCallback: addChangeListView:
|
|
347 |
)
|
|
348 |
)
|
|
349 |
|
|
350 |
)
|
|
351 |
)
|
|
352 |
!
|
|
353 |
|
|
354 |
twoColumnNavigatorSpec
|
|
355 |
"This resource specification was automatically generated
|
|
356 |
by the UIPainter of ST/X."
|
|
357 |
|
|
358 |
"Do not manually edit this!! If it is corrupted,
|
|
359 |
the UIPainter may not be able to read the specification."
|
|
360 |
|
|
361 |
"
|
|
362 |
UIPainter new openOnClass:Tools::ChangeSetBrowser andSelector:#twoColumnNavigatorSpec
|
|
363 |
Tools::ChangeSetBrowser new openInterface:#twoColumnNavigatorSpec
|
|
364 |
"
|
|
365 |
|
|
366 |
<resource: #canvas>
|
|
367 |
|
|
368 |
^
|
|
369 |
#(FullSpec
|
|
370 |
name: twoColumnNavigatorSpec
|
|
371 |
window:
|
|
372 |
(WindowSpec
|
|
373 |
label: 'Two Column Navigator'
|
|
374 |
name: 'Two Column Navigator'
|
|
375 |
min: (Point 10 10)
|
|
376 |
bounds: (Rectangle 0 0 300 300)
|
|
377 |
)
|
|
378 |
component:
|
|
379 |
(SpecCollection
|
|
380 |
collection: (
|
|
381 |
(VariableHorizontalPanelSpec
|
|
382 |
name: 'Columns'
|
|
383 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
384 |
component:
|
|
385 |
(SpecCollection
|
|
386 |
collection: (
|
|
387 |
(SubCanvasSpec
|
|
388 |
name: 'FirstColumn'
|
|
389 |
hasHorizontalScrollBar: false
|
|
390 |
hasVerticalScrollBar: false
|
|
391 |
majorKey: #'Tools::ChangeList'
|
|
392 |
subAspectHolders:
|
|
393 |
(Array
|
|
394 |
|
|
395 |
(SubChannelInfoSpec
|
|
396 |
subAspect: acceptEnabledHolder
|
|
397 |
aspect: acceptEnabledHolder
|
|
398 |
)
|
|
399 |
(SubChannelInfoSpec
|
|
400 |
subAspect: inGeneratorHolder
|
|
401 |
aspect: navigatorChangesetHolder
|
|
402 |
)
|
|
403 |
|
|
404 |
(SubChannelInfoSpec
|
|
405 |
subAspect: menuHolder
|
|
406 |
aspect: changeMenuHolder
|
|
407 |
)
|
|
408 |
(SubChannelInfoSpec
|
|
409 |
subAspect: outGeneratorHolder
|
|
410 |
aspect: list1GeneratorHolder
|
|
411 |
)
|
|
412 |
|
|
413 |
(SubChannelInfoSpec
|
|
414 |
subAspect: selectionHolder
|
|
415 |
aspect: selection1Holder
|
|
416 |
)
|
|
417 |
(SubChannelInfoSpec
|
|
418 |
subAspect: showRemovedHolder
|
|
419 |
aspect: showRemovedAspect
|
|
420 |
)
|
|
421 |
)
|
|
422 |
createNewApplication: true
|
|
423 |
createNewBuilder: true
|
|
424 |
postBuildCallback: addChangeListView:
|
|
425 |
)
|
|
426 |
(SubCanvasSpec
|
|
427 |
name: 'SecondColumn'
|
|
428 |
hasHorizontalScrollBar: false
|
|
429 |
hasVerticalScrollBar: false
|
|
430 |
majorKey: #'Tools::ChangeList'
|
|
431 |
subAspectHolders:
|
|
432 |
(Array
|
|
433 |
|
|
434 |
(SubChannelInfoSpec
|
|
435 |
subAspect: acceptEnabledHolder
|
|
436 |
aspect: acceptEnabledHolder
|
|
437 |
)
|
|
438 |
(SubChannelInfoSpec
|
|
439 |
subAspect: inGeneratorHolder
|
|
440 |
aspect: list1GeneratorHolder
|
|
441 |
)
|
|
442 |
|
|
443 |
(SubChannelInfoSpec
|
|
444 |
subAspect: menuHolder
|
|
445 |
aspect: changeMenuHolder
|
|
446 |
)
|
|
447 |
(SubChannelInfoSpec
|
|
448 |
subAspect: selectionHolder
|
|
449 |
aspect: selectionHolder
|
|
450 |
)
|
|
451 |
|
|
452 |
(SubChannelInfoSpec
|
|
453 |
subAspect: showRemovedHolder
|
|
454 |
aspect: showRemovedAspect
|
|
455 |
)
|
|
456 |
)
|
|
457 |
createNewApplication: true
|
|
458 |
createNewBuilder: true
|
|
459 |
postBuildCallback: addChangeListView:
|
|
460 |
)
|
|
461 |
)
|
|
462 |
|
|
463 |
)
|
|
464 |
handles: (Any 0.5 1.0)
|
|
465 |
)
|
|
466 |
)
|
|
467 |
|
|
468 |
)
|
|
469 |
)
|
|
470 |
!
|
|
471 |
|
|
472 |
windowSpec
|
|
473 |
"This resource specification was automatically generated
|
|
474 |
by the UIPainter of ST/X."
|
|
475 |
|
|
476 |
"Do not manually edit this!! If it is corrupted,
|
|
477 |
the UIPainter may not be able to read the specification."
|
|
478 |
|
|
479 |
"
|
|
480 |
UIPainter new openOnClass:Tools::ChangeSetBrowser andSelector:#windowSpec
|
|
481 |
Tools::ChangeSetBrowser new openInterface:#windowSpec
|
|
482 |
Tools::ChangeSetBrowser open
|
|
483 |
"
|
|
484 |
|
|
485 |
<resource: #canvas>
|
|
486 |
|
|
487 |
^
|
|
488 |
#(FullSpec
|
|
489 |
name: windowSpec
|
|
490 |
window:
|
|
491 |
(WindowSpec
|
|
492 |
label: 'ChangeSet browser'
|
|
493 |
name: 'ChangeSet browser'
|
|
494 |
labelChannel: titleHolder
|
|
495 |
min: (Point 10 10)
|
|
496 |
bounds: (Rectangle 0 0 653 488)
|
|
497 |
menu: mainMenu
|
|
498 |
)
|
|
499 |
component:
|
|
500 |
(SpecCollection
|
|
501 |
collection: (
|
|
502 |
(MenuPanelSpec
|
|
503 |
name: 'ToolBar'
|
|
504 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
505 |
menu: toolbarMenu
|
|
506 |
textDefault: true
|
|
507 |
)
|
|
508 |
(UISubSpecification
|
|
509 |
name: 'Contents'
|
|
510 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
511 |
minorKey: windowSpecWithoutToolbar
|
|
512 |
)
|
|
513 |
)
|
|
514 |
|
|
515 |
)
|
|
516 |
)
|
|
517 |
!
|
|
518 |
|
|
519 |
windowSpecForEmbedding
|
|
520 |
|
|
521 |
^self windowSpecWithoutToolbar
|
|
522 |
!
|
|
523 |
|
|
524 |
windowSpecWithoutToolbar
|
|
525 |
"This resource specification was automatically generated
|
|
526 |
by the UIPainter of ST/X."
|
|
527 |
|
|
528 |
"Do not manually edit this!! If it is corrupted,
|
|
529 |
the UIPainter may not be able to read the specification."
|
|
530 |
|
|
531 |
"
|
10333
|
532 |
UIPainter new openOnClass:Tools::ChangeSetBrowser2 andSelector:#windowSpecWithoutToolbar
|
|
533 |
Tools::ChangeSetBrowser2 new openInterface:#windowSpecWithoutToolbar
|
10028
|
534 |
"
|
|
535 |
|
|
536 |
<resource: #canvas>
|
|
537 |
|
|
538 |
^
|
|
539 |
#(FullSpec
|
|
540 |
name: windowSpecWithoutToolbar
|
|
541 |
window:
|
|
542 |
(WindowSpec
|
|
543 |
label: 'ChangeSet browser'
|
|
544 |
name: 'ChangeSet browser'
|
|
545 |
min: (Point 10 10)
|
|
546 |
bounds: (Rectangle 0 0 653 488)
|
|
547 |
menu: mainMenu
|
|
548 |
)
|
|
549 |
component:
|
|
550 |
(SpecCollection
|
|
551 |
collection: (
|
|
552 |
(VariableVerticalPanelSpec
|
|
553 |
name: 'VerticalPanel'
|
|
554 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
555 |
component:
|
|
556 |
(SpecCollection
|
|
557 |
collection: (
|
|
558 |
(SubCanvasSpec
|
|
559 |
name: 'NavigatorPanel'
|
|
560 |
hasHorizontalScrollBar: false
|
|
561 |
hasVerticalScrollBar: false
|
|
562 |
specHolder: navigatorSpecHolder
|
|
563 |
createNewBuilder: false
|
|
564 |
)
|
10333
|
565 |
(SubCanvasSpec
|
|
566 |
name: 'TextDiffTool'
|
|
567 |
hasHorizontalScrollBar: false
|
|
568 |
hasVerticalScrollBar: false
|
|
569 |
majorKey: #'Tools::TextDiffTool'
|
|
570 |
minorKey: windowSpecForEmbedding
|
|
571 |
subAspectHolders:
|
|
572 |
(Array
|
|
573 |
|
|
574 |
(SubChannelInfoSpec
|
|
575 |
subAspect: classHolder
|
|
576 |
aspect: classHolder
|
|
577 |
)
|
|
578 |
(SubChannelInfoSpec
|
10345
|
579 |
subAspect: codeAspectHolder
|
|
580 |
aspect: codeAspectHolder
|
|
581 |
)
|
|
582 |
|
|
583 |
(SubChannelInfoSpec
|
10333
|
584 |
subAspect: labelAHolder
|
|
585 |
aspect: labelAHolder
|
10345
|
586 |
)
|
10333
|
587 |
(SubChannelInfoSpec
|
|
588 |
subAspect: labelBHolder
|
|
589 |
aspect: labelBHolder
|
10345
|
590 |
)
|
|
591 |
|
10333
|
592 |
(SubChannelInfoSpec
|
|
593 |
subAspect: textAHolder
|
|
594 |
aspect: changeSourceHolder
|
10345
|
595 |
)
|
10333
|
596 |
(SubChannelInfoSpec
|
|
597 |
subAspect: textBHolder
|
|
598 |
aspect: imageSourceHolder
|
|
599 |
)
|
|
600 |
)
|
|
601 |
createNewApplication: true
|
|
602 |
createNewBuilder: true
|
10028
|
603 |
)
|
|
604 |
)
|
|
605 |
|
|
606 |
)
|
|
607 |
handles: (Any 0.5 1.0)
|
|
608 |
)
|
|
609 |
)
|
|
610 |
|
|
611 |
)
|
|
612 |
)
|
|
613 |
! !
|
|
614 |
|
|
615 |
!ChangeSetBrowser2 class methodsFor:'menu specs'!
|
|
616 |
|
|
617 |
changeMenu
|
|
618 |
"This resource specification was automatically generated
|
|
619 |
by the MenuEditor of ST/X."
|
|
620 |
|
|
621 |
"Do not manually edit this!! If it is corrupted,
|
|
622 |
the MenuEditor may not be able to read the specification."
|
|
623 |
|
|
624 |
"
|
|
625 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser andSelector:#changeMenu
|
|
626 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser changeMenu)) startUp
|
|
627 |
"
|
|
628 |
|
|
629 |
<resource: #menu>
|
|
630 |
|
|
631 |
^
|
|
632 |
#(Menu
|
|
633 |
(
|
|
634 |
(MenuItem
|
|
635 |
enabled: hasChangeSelectedAndNotRemoved
|
|
636 |
label: 'Apply'
|
|
637 |
itemValue: changeMenuApplySelection
|
|
638 |
translateLabel: true
|
|
639 |
isVisible: acceptEnabledHolder
|
|
640 |
shortcutKey: Accept
|
|
641 |
)
|
|
642 |
(MenuItem
|
|
643 |
label: 'Apply all'
|
|
644 |
itemValue: changeMenuApply
|
|
645 |
translateLabel: true
|
|
646 |
isVisible: acceptEnabledHolder
|
|
647 |
)
|
|
648 |
(MenuItem
|
|
649 |
label: '-'
|
|
650 |
)
|
|
651 |
(MenuItem
|
|
652 |
label: 'Delete'
|
|
653 |
itemValue: changeMenuDeleteSelection
|
|
654 |
nameKey: Delete
|
|
655 |
translateLabel: true
|
|
656 |
shortcutKey: Delete
|
|
657 |
)
|
|
658 |
(MenuItem
|
|
659 |
label: 'Undelete'
|
|
660 |
itemValue: changeMenuUndeleteSelection
|
|
661 |
nameKey: Undelete
|
|
662 |
translateLabel: true
|
|
663 |
shortcutKey: Delete
|
|
664 |
)
|
|
665 |
(MenuItem
|
|
666 |
label: '-'
|
|
667 |
)
|
|
668 |
(MenuItem
|
|
669 |
label: 'Select...'
|
|
670 |
translateLabel: true
|
|
671 |
submenu:
|
|
672 |
(Menu
|
|
673 |
(
|
|
674 |
(MenuItem
|
|
675 |
label: 'Select same'
|
|
676 |
itemValue: changeMenuSelectSame
|
|
677 |
translateLabel: true
|
|
678 |
)
|
|
679 |
(MenuItem
|
|
680 |
label: 'Select additions (new classes/methods)'
|
|
681 |
itemValue: changeMenuSelectAdditions
|
|
682 |
translateLabel: true
|
|
683 |
)
|
|
684 |
(MenuItem
|
|
685 |
label: 'Select removals'
|
|
686 |
itemValue: changeMenuSelectRemovals
|
|
687 |
translateLabel: true
|
|
688 |
)
|
|
689 |
(MenuItem
|
|
690 |
label: 'Select differences'
|
|
691 |
itemValue: changeMenuSelectDifferences
|
|
692 |
translateLabel: true
|
|
693 |
)
|
|
694 |
(MenuItem
|
|
695 |
label: '-'
|
|
696 |
)
|
|
697 |
(MenuItem
|
|
698 |
label: 'Select all'
|
|
699 |
itemValue: changeMenuSelectAll
|
|
700 |
translateLabel: true
|
|
701 |
)
|
|
702 |
(MenuItem
|
|
703 |
label: 'Select none'
|
|
704 |
itemValue: changeMenuSelectNone
|
|
705 |
translateLabel: true
|
|
706 |
)
|
|
707 |
(MenuItem
|
|
708 |
label: '-'
|
|
709 |
)
|
|
710 |
(MenuItem
|
|
711 |
label: 'Select using block'
|
|
712 |
itemValue: changeMenuSelectUsingBlock
|
|
713 |
translateLabel: true
|
|
714 |
)
|
|
715 |
)
|
|
716 |
nil
|
|
717 |
nil
|
|
718 |
)
|
|
719 |
)
|
|
720 |
(MenuItem
|
|
721 |
label: '-'
|
|
722 |
)
|
|
723 |
(MenuItem
|
|
724 |
enabled: false
|
|
725 |
label: 'Show Deleted'
|
|
726 |
translateLabel: true
|
|
727 |
indication: showRemovedAspect
|
|
728 |
)
|
|
729 |
(MenuItem
|
|
730 |
label: 'Inspect change'
|
|
731 |
itemValue: changeMenuInspect
|
|
732 |
translateLabel: true
|
|
733 |
)
|
|
734 |
(MenuItem
|
|
735 |
enabled: hasSingleChangeSelectedAndCanBrowse
|
|
736 |
label: 'Browse'
|
|
737 |
itemValue: changeMenuBrowse
|
|
738 |
translateLabel: true
|
|
739 |
)
|
|
740 |
)
|
|
741 |
nil
|
|
742 |
nil
|
|
743 |
)
|
|
744 |
!
|
|
745 |
|
|
746 |
mainMenu
|
|
747 |
"This resource specification was automatically generated
|
|
748 |
by the MenuEditor of ST/X."
|
|
749 |
|
|
750 |
"Do not manually edit this!! If it is corrupted,
|
|
751 |
the MenuEditor may not be able to read the specification."
|
|
752 |
|
|
753 |
"
|
|
754 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser andSelector:#mainMenu
|
|
755 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser mainMenu)) startUp
|
|
756 |
"
|
|
757 |
|
|
758 |
<resource: #menu>
|
|
759 |
|
|
760 |
^
|
|
761 |
#(Menu
|
|
762 |
(
|
|
763 |
(MenuItem
|
|
764 |
label: 'File'
|
|
765 |
translateLabel: true
|
|
766 |
submenu:
|
|
767 |
(Menu
|
|
768 |
(
|
|
769 |
(MenuItem
|
|
770 |
label: 'Open'
|
|
771 |
itemValue: doOpen
|
|
772 |
translateLabel: true
|
|
773 |
isVisible: allowOpenHolder
|
|
774 |
shortcutKey: Ctrlo
|
|
775 |
)
|
|
776 |
(MenuItem
|
|
777 |
label: 'Open current'
|
|
778 |
itemValue: doOpenCurrent
|
|
779 |
translateLabel: true
|
|
780 |
isVisible: allowOpenHolder
|
|
781 |
)
|
|
782 |
(MenuItem
|
|
783 |
label: 'Save'
|
|
784 |
itemValue: doSave
|
|
785 |
translateLabel: true
|
|
786 |
)
|
|
787 |
(MenuItem
|
|
788 |
label: 'Save As...'
|
|
789 |
itemValue: doSaveAs
|
|
790 |
translateLabel: true
|
|
791 |
)
|
|
792 |
(MenuItem
|
|
793 |
label: '-'
|
|
794 |
)
|
|
795 |
(MenuItem
|
|
796 |
label: 'Exit'
|
|
797 |
itemValue: closeRequest
|
|
798 |
translateLabel: true
|
|
799 |
)
|
|
800 |
)
|
|
801 |
nil
|
|
802 |
nil
|
|
803 |
)
|
|
804 |
)
|
|
805 |
(MenuItem
|
|
806 |
label: 'Change'
|
|
807 |
translateLabel: true
|
|
808 |
submenuChannel: changeMenu
|
|
809 |
keepLinkedMenu: true
|
|
810 |
)
|
|
811 |
(MenuItem
|
|
812 |
label: 'View'
|
|
813 |
translateLabel: true
|
|
814 |
submenu:
|
|
815 |
(Menu
|
|
816 |
(
|
|
817 |
(MenuItem
|
|
818 |
label: 'List'
|
|
819 |
translateLabel: true
|
|
820 |
choice: navigatorSpecHolder
|
|
821 |
choiceValue: oneColumnNavigatorSpec
|
|
822 |
)
|
|
823 |
(MenuItem
|
|
824 |
label: 'Hierarchical List'
|
|
825 |
translateLabel: true
|
|
826 |
choice: navigatorSpecHolder
|
|
827 |
choiceValue: hierarchicalNavigatorSpec
|
|
828 |
)
|
|
829 |
(MenuItem
|
|
830 |
label: 'Browser Like'
|
|
831 |
translateLabel: true
|
|
832 |
choice: navigatorSpecHolder
|
|
833 |
choiceValue: twoColumnNavigatorSpec
|
|
834 |
)
|
|
835 |
)
|
|
836 |
nil
|
|
837 |
nil
|
|
838 |
)
|
|
839 |
)
|
|
840 |
)
|
|
841 |
nil
|
|
842 |
nil
|
|
843 |
)
|
|
844 |
!
|
|
845 |
|
|
846 |
toolbarMenu
|
|
847 |
"This resource specification was automatically generated
|
|
848 |
by the MenuEditor of ST/X."
|
|
849 |
|
|
850 |
"Do not manually edit this!! If it is corrupted,
|
|
851 |
the MenuEditor may not be able to read the specification."
|
|
852 |
|
|
853 |
"
|
|
854 |
MenuEditor new openOnClass:Tools::ChangeSetBrowser andSelector:#toolbarMenu
|
|
855 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeSetBrowser toolbarMenu)) startUp
|
|
856 |
"
|
|
857 |
|
|
858 |
<resource: #menu>
|
|
859 |
|
|
860 |
^
|
|
861 |
#(Menu
|
|
862 |
(
|
|
863 |
(MenuItem
|
|
864 |
activeHelpKey: fileLoad
|
|
865 |
label: 'Open'
|
|
866 |
itemValue: doOpen
|
|
867 |
translateLabel: true
|
|
868 |
isButton: true
|
|
869 |
isVisible: allowOpenHolder
|
|
870 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadFromFileIcon)
|
|
871 |
)
|
|
872 |
(MenuItem
|
|
873 |
activeHelpKey: fileSave
|
|
874 |
label: 'Save'
|
|
875 |
itemValue: doSave
|
|
876 |
translateLabel: true
|
|
877 |
isButton: true
|
|
878 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon)
|
|
879 |
)
|
|
880 |
)
|
|
881 |
nil
|
|
882 |
nil
|
|
883 |
)
|
|
884 |
! !
|
|
885 |
|
|
886 |
!ChangeSetBrowser2 class methodsFor:'plugIn spec'!
|
|
887 |
|
|
888 |
aspectSelectors
|
|
889 |
"This resource specification was automatically generated
|
|
890 |
by the UIPainter of ST/X."
|
|
891 |
|
|
892 |
"Do not manually edit this. If it is corrupted,
|
|
893 |
the UIPainter may not be able to read the specification."
|
|
894 |
|
|
895 |
"Return a description of exported aspects;
|
|
896 |
these can be connected to aspects of an embedding application
|
|
897 |
(if this app is embedded in a subCanvas)."
|
|
898 |
|
|
899 |
^ #(
|
|
900 |
#changesetHolder
|
|
901 |
).
|
|
902 |
|
|
903 |
! !
|
|
904 |
|
|
905 |
!ChangeSetBrowser2 methodsFor:'accessing'!
|
|
906 |
|
|
907 |
acceptEnabled: aBoolean
|
|
908 |
|
|
909 |
^self acceptEnabledHolder value: aBoolean
|
|
910 |
!
|
|
911 |
|
|
912 |
allowOpen: aBoolean
|
|
913 |
|
|
914 |
self allowOpenHolder value: aBoolean
|
|
915 |
|
|
916 |
"Created: / 26-10-2010 / 23:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
917 |
!
|
|
918 |
|
|
919 |
beHierarchical
|
|
920 |
|
|
921 |
^self navigatorSpecHolder value: #hierarchicalNavigatorSpec
|
|
922 |
|
|
923 |
"Modified: / 14-10-2010 / 15:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
924 |
!
|
|
925 |
|
|
926 |
beOneColumn
|
|
927 |
|
|
928 |
^self navigatorSpecHolder value: #oneColumnNavigatorSpec
|
|
929 |
|
|
930 |
"Modified: / 14-10-2010 / 15:52:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
931 |
!
|
|
932 |
|
|
933 |
beTwoColumn
|
|
934 |
|
|
935 |
^self navigatorSpecHolder value: #twoColumnNavigatorSpec
|
|
936 |
|
|
937 |
"Modified: / 14-10-2010 / 15:51:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
938 |
!
|
|
939 |
|
|
940 |
changeset
|
|
941 |
|
|
942 |
^self changesetHolder value
|
|
943 |
!
|
|
944 |
|
|
945 |
changeset: aChangeSet
|
|
946 |
|
|
947 |
self changesetHolder value: aChangeSet
|
|
948 |
!
|
|
949 |
|
|
950 |
readOnly: aBoolean
|
|
951 |
|
|
952 |
"Created: / 20-07-2010 / 09:48:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
953 |
!
|
|
954 |
|
|
955 |
theSingleSelectedChange
|
|
956 |
|
|
957 |
| change |
|
|
958 |
change := nil.
|
|
959 |
selectionHolder value do:
|
|
960 |
[:each|
|
|
961 |
change ifNotNil:[nil].
|
|
962 |
change ifNil:[change := each]].
|
|
963 |
^change
|
|
964 |
!
|
|
965 |
|
|
966 |
title: aString
|
|
967 |
|
|
968 |
self titleHolder value: aString
|
|
969 |
|
|
970 |
"Created: / 26-10-2010 / 23:01:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
971 |
! !
|
|
972 |
|
|
973 |
!ChangeSetBrowser2 methodsFor:'accessing - defaults'!
|
|
974 |
|
|
975 |
defaultTitle
|
|
976 |
^ 'No changeset'
|
|
977 |
|
|
978 |
"Modified: / 08-04-2011 / 10:10:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
979 |
! !
|
|
980 |
|
|
981 |
!ChangeSetBrowser2 methodsFor:'accessing - menus'!
|
|
982 |
|
|
983 |
changeMenuHolder
|
|
984 |
|
|
985 |
^[self menuFor: #changeMenu]
|
|
986 |
|
|
987 |
"Created: / 29-10-2010 / 13:23:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
988 |
! !
|
|
989 |
|
|
990 |
!ChangeSetBrowser2 methodsFor:'actions'!
|
|
991 |
|
|
992 |
accept: source
|
|
993 |
|
|
994 |
| entry |
|
|
995 |
(entry := self theSingleSelectedChange) ifNil:[^self].
|
|
996 |
entry change isMethodCodeChange ifTrue:
|
|
997 |
[entry change source: source asString]
|
|
998 |
|
|
999 |
"Modified: / 29-11-2010 / 22:40:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1000 |
!
|
|
1001 |
|
|
1002 |
postBuildSourceView: aView
|
|
1003 |
|
10309
|
1004 |
sourceView := aView.
|
|
1005 |
|
10345
|
1006 |
"Modified: / 19-07-2011 / 19:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10028
|
1007 |
! !
|
|
1008 |
|
|
1009 |
!ChangeSetBrowser2 methodsFor:'aspects'!
|
|
1010 |
|
|
1011 |
acceptEnabledHolder
|
|
1012 |
"return/create the 'selectionHolder' value holder (automatically generated)"
|
|
1013 |
|
|
1014 |
acceptEnabledHolder isNil ifTrue:[
|
|
1015 |
acceptEnabledHolder := ValueHolder with: true.
|
|
1016 |
].
|
|
1017 |
^ acceptEnabledHolder
|
|
1018 |
|
|
1019 |
"Modified: / 24-10-2009 / 19:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1020 |
!
|
|
1021 |
|
|
1022 |
allowOpenHolder
|
|
1023 |
"return/create the 'allowOpenHolder' value holder (automatically generated)"
|
|
1024 |
|
|
1025 |
allowOpenHolder isNil ifTrue:[
|
|
1026 |
allowOpenHolder := ValueHolder with: true.
|
|
1027 |
].
|
|
1028 |
^ allowOpenHolder
|
|
1029 |
|
|
1030 |
"Modified: / 17-03-2011 / 22:32:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1031 |
!
|
|
1032 |
|
10333
|
1033 |
changeSourceHolder
|
|
1034 |
<resource: #uiAspect>
|
|
1035 |
changeSourceHolder isNil ifTrue: [
|
|
1036 |
changeSourceHolder := nil asValue.
|
|
1037 |
].
|
|
1038 |
^ changeSourceHolder.
|
|
1039 |
|
|
1040 |
"Modified: / 19-07-2011 / 11:54:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1041 |
!
|
|
1042 |
|
10028
|
1043 |
changesetHolder
|
|
1044 |
"return/create the 'changesetHolder' value holder (automatically generated)"
|
|
1045 |
|
|
1046 |
changesetHolder isNil ifTrue:[
|
|
1047 |
changesetHolder := ValueHolder new.
|
|
1048 |
changesetHolder addDependent:self.
|
|
1049 |
].
|
|
1050 |
^ changesetHolder
|
|
1051 |
!
|
|
1052 |
|
|
1053 |
changesetHolder:something
|
|
1054 |
"set the 'changesetHolder' value holder (automatically generated)"
|
|
1055 |
|
|
1056 |
|oldValue newValue|
|
|
1057 |
|
|
1058 |
changesetHolder notNil ifTrue:[
|
|
1059 |
oldValue := changesetHolder value.
|
|
1060 |
changesetHolder removeDependent:self.
|
|
1061 |
].
|
|
1062 |
changesetHolder := something.
|
|
1063 |
changesetHolder notNil ifTrue:[
|
|
1064 |
changesetHolder addDependent:self.
|
|
1065 |
].
|
|
1066 |
newValue := changesetHolder value.
|
|
1067 |
oldValue ~~ newValue ifTrue:[
|
|
1068 |
self update:#value with:newValue from:changesetHolder.
|
|
1069 |
].
|
|
1070 |
!
|
|
1071 |
|
|
1072 |
classHolder
|
|
1073 |
"return/create the 'classHolder' value holder (automatically generated)"
|
|
1074 |
|
|
1075 |
classHolder isNil ifTrue:[
|
|
1076 |
classHolder := ValueHolder with:nil.
|
|
1077 |
].
|
|
1078 |
^ classHolder
|
10345
|
1079 |
|
|
1080 |
"Modified: / 19-07-2011 / 19:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1081 |
!
|
|
1082 |
|
|
1083 |
codeAspectHolder
|
|
1084 |
"return/create the 'codeAspectHolder' value holder (automatically generated)"
|
|
1085 |
|
|
1086 |
codeAspectHolder isNil ifTrue:[
|
|
1087 |
codeAspectHolder := ValueHolder new.
|
|
1088 |
].
|
|
1089 |
^ codeAspectHolder
|
10028
|
1090 |
!
|
|
1091 |
|
10333
|
1092 |
imageSourceHolder
|
|
1093 |
<resource: #uiAspect>
|
|
1094 |
imageSourceHolder isNil ifTrue: [
|
|
1095 |
imageSourceHolder := nil asValue.
|
|
1096 |
].
|
|
1097 |
^ imageSourceHolder.
|
|
1098 |
|
|
1099 |
"Created: / 19-07-2011 / 11:54:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1100 |
!
|
|
1101 |
|
|
1102 |
labelAHolder
|
|
1103 |
|
|
1104 |
^'Change' asValue
|
|
1105 |
|
|
1106 |
"Created: / 19-07-2011 / 11:46:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1107 |
!
|
|
1108 |
|
|
1109 |
labelBHolder
|
|
1110 |
|
|
1111 |
^'Image' asValue
|
|
1112 |
|
|
1113 |
"Created: / 19-07-2011 / 11:46:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1114 |
!
|
|
1115 |
|
10028
|
1116 |
list1GeneratorHolder
|
|
1117 |
"return/create the 'list1GeneratorHolder' value holder (automatically generated)"
|
|
1118 |
|
|
1119 |
list1GeneratorHolder isNil ifTrue:[
|
|
1120 |
list1GeneratorHolder := ValueHolder new.
|
|
1121 |
].
|
|
1122 |
^ list1GeneratorHolder
|
|
1123 |
!
|
|
1124 |
|
|
1125 |
list1GeneratorHolder:something
|
|
1126 |
"set the 'list1GeneratorHolder' value holder (automatically generated)"
|
|
1127 |
|
|
1128 |
list1GeneratorHolder := something.
|
|
1129 |
!
|
|
1130 |
|
|
1131 |
listHolder
|
|
1132 |
|
|
1133 |
^self navigatorSpecHolder value == #twoColumnNavigatorSpec
|
|
1134 |
ifTrue:[self list1GeneratorHolder]
|
|
1135 |
ifFalse:[self navigatorChangesetHolder]
|
|
1136 |
|
|
1137 |
"Created: / 20-03-2011 / 22:16:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1138 |
!
|
|
1139 |
|
|
1140 |
navigatorChangesetHolder
|
|
1141 |
"return/create the 'navigatorChangesetHolder' value holder (automatically generated)"
|
|
1142 |
|
|
1143 |
navigatorChangesetHolder isNil ifTrue:[
|
|
1144 |
navigatorChangesetHolder := ValueHolder new.
|
|
1145 |
].
|
|
1146 |
^ navigatorChangesetHolder
|
|
1147 |
!
|
|
1148 |
|
|
1149 |
navigatorSpecHolder
|
|
1150 |
<resource: #uiAspect>
|
|
1151 |
|
|
1152 |
navigatorSpecHolder isNil ifTrue:[
|
|
1153 |
navigatorSpecHolder := ValueHolder with:
|
|
1154 |
#hierarchicalNavigatorSpec
|
|
1155 |
"/#twoColumnNavigatorSpec
|
|
1156 |
"/#oneColumnNavigatorSpec
|
|
1157 |
|
|
1158 |
].
|
|
1159 |
^ navigatorSpecHolder.
|
|
1160 |
|
|
1161 |
"Modified: / 20-11-2009 / 20:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1162 |
!
|
|
1163 |
|
|
1164 |
selection1Holder
|
|
1165 |
"return/create the 'selection1Holder' value holder (automatically generated)"
|
|
1166 |
|
|
1167 |
selection1Holder isNil ifTrue:[
|
|
1168 |
selection1Holder := ValueHolder with:#().
|
|
1169 |
].
|
|
1170 |
^ selection1Holder
|
|
1171 |
|
|
1172 |
"Modified: / 24-10-2009 / 20:29:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1173 |
!
|
|
1174 |
|
|
1175 |
selectionHolder
|
|
1176 |
"return/create the 'selectionHolder' value holder (automatically generated)"
|
|
1177 |
|
|
1178 |
selectionHolder isNil ifTrue:[
|
|
1179 |
selectionHolder := ValueHolder new.
|
|
1180 |
selectionHolder addDependent: self.
|
|
1181 |
].
|
|
1182 |
^ selectionHolder
|
|
1183 |
|
|
1184 |
"Modified: / 24-10-2009 / 19:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1185 |
!
|
|
1186 |
|
|
1187 |
showRemovedAspect
|
|
1188 |
"return/create the 'showDeletedAspect' value holder (automatically generated)"
|
|
1189 |
|
|
1190 |
showRemovedAspect isNil ifTrue:[
|
|
1191 |
showRemovedAspect := (AspectAdaptor forAspect:#showRemoved)
|
|
1192 |
subject: self class.
|
|
1193 |
].
|
|
1194 |
^ showRemovedAspect
|
|
1195 |
!
|
|
1196 |
|
|
1197 |
showRemovedAspect:aValueHolder
|
|
1198 |
showRemovedAspect := aValueHolder.
|
|
1199 |
!
|
|
1200 |
|
|
1201 |
titleHolder
|
|
1202 |
"return/create the 'titleHolder' value holder (automatically generated)"
|
|
1203 |
|
|
1204 |
titleHolder isNil
|
|
1205 |
ifTrue:[ titleHolder := ValueHolder with:self defaultTitle. ].
|
|
1206 |
^ titleHolder
|
|
1207 |
|
|
1208 |
"Modified: / 26-10-2010 / 22:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1209 |
! !
|
|
1210 |
|
|
1211 |
!ChangeSetBrowser2 methodsFor:'change & update'!
|
|
1212 |
|
|
1213 |
changesetChanged
|
|
1214 |
|
|
1215 |
self titleHolder value: (self changeset name ? (self defaultTitle)).
|
|
1216 |
self navigatorChangesetHolder value: self getNavigatorChangeSet
|
|
1217 |
|
|
1218 |
"Modified: / 26-10-2010 / 22:57:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1219 |
!
|
|
1220 |
|
|
1221 |
selectionChanged
|
|
1222 |
|
|
1223 |
| change |
|
|
1224 |
change := self theSingleSelectedChange.
|
10345
|
1225 |
(change notNil and:[change change isCompositeChange not]) ifTrue:[
|
10333
|
1226 |
self classHolder value: change changeClass.
|
|
1227 |
changeSourceHolder value: change changeSource.
|
|
1228 |
imageSourceHolder value: change imageSource.
|
10345
|
1229 |
codeAspectHolder value:
|
|
1230 |
(change change isMethodCodeChange
|
|
1231 |
ifTrue:[#method]
|
|
1232 |
ifFalse:[#expression]).
|
10309
|
1233 |
self showSource: true
|
|
1234 |
] ifFalse:[
|
|
1235 |
self showSource: false.
|
10345
|
1236 |
self classHolder value: nil.
|
|
1237 |
changeSourceHolder value: nil.
|
|
1238 |
imageSourceHolder value: nil.
|
10309
|
1239 |
].
|
10028
|
1240 |
|
|
1241 |
"Created: / 24-10-2009 / 19:49:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1242 |
!
|
|
1243 |
|
|
1244 |
update: aspect with: param from: sender
|
|
1245 |
|
|
1246 |
sender == changesetHolder ifTrue: [ ^ self changesetChanged ].
|
|
1247 |
sender == selectionHolder ifTrue: [ ^ self selectionChanged ].
|
|
1248 |
|
|
1249 |
"Created: / 24-10-2009 / 19:29:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1250 |
! !
|
|
1251 |
|
|
1252 |
!ChangeSetBrowser2 methodsFor:'interface opening'!
|
|
1253 |
|
|
1254 |
open
|
|
1255 |
|
|
1256 |
super open.
|
|
1257 |
^self
|
|
1258 |
|
|
1259 |
"Created: / 20-07-2010 / 09:48:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1260 |
! !
|
|
1261 |
|
|
1262 |
!ChangeSetBrowser2 methodsFor:'menu actions'!
|
|
1263 |
|
|
1264 |
doOpen
|
|
1265 |
|
|
1266 |
| file changeset |
|
|
1267 |
file := Dialog requestFileName:'Select changeset' pattern:'*.chg;*.st'.
|
|
1268 |
file ifNil:[^self].
|
|
1269 |
[changeset := ChangeSet fromFile: file]
|
|
1270 |
on: Error
|
|
1271 |
do: [:ex|Dialog error: 'Error when loading changeset: ',ex description. ^self].
|
|
1272 |
changesetFile := file.
|
|
1273 |
self title: file asFilename baseName asString.
|
|
1274 |
self doOpen: changeset
|
|
1275 |
|
|
1276 |
"Modified: / 08-04-2011 / 10:11:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1277 |
!
|
|
1278 |
|
|
1279 |
doOpen: aChangeSet
|
|
1280 |
|
|
1281 |
self changesetHolder value: aChangeSet
|
|
1282 |
|
|
1283 |
"Created: / 05-12-2009 / 13:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1284 |
!
|
|
1285 |
|
|
1286 |
doOpenCurrent
|
|
1287 |
|
|
1288 |
self doOpen: ChangeSet current
|
|
1289 |
|
|
1290 |
"Created: / 05-12-2009 / 13:44:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1291 |
!
|
|
1292 |
|
|
1293 |
doSave
|
|
1294 |
|
|
1295 |
changesetFile
|
|
1296 |
ifNil:[self doSaveAs]
|
|
1297 |
ifNotNil:[self doSaveAs: changesetFile]
|
|
1298 |
|
|
1299 |
"Modified: / 24-10-2009 / 22:55:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1300 |
!
|
|
1301 |
|
|
1302 |
doSaveAs
|
|
1303 |
|
|
1304 |
| file |
|
|
1305 |
file := Dialog requestFileName:'Select file' default: (changesetFile ? 'somechanges.chg') pattern:('*.chg').
|
|
1306 |
file ifNil:[^self].
|
|
1307 |
self doSaveAs: file.
|
|
1308 |
!
|
|
1309 |
|
|
1310 |
doSaveAs: newFile
|
|
1311 |
|
|
1312 |
[
|
|
1313 |
| s |
|
|
1314 |
s := newFile asFilename writeStream.
|
|
1315 |
[self changeset fileOutOn: s] ensure:[s close].
|
|
1316 |
changesetFile := newFile.
|
|
1317 |
] on: Error do:
|
|
1318 |
[:ex|Dialog warn: 'Erorr saving changes: ' , ex description]
|
|
1319 |
! !
|
|
1320 |
|
|
1321 |
!ChangeSetBrowser2 methodsFor:'menu actions - changes'!
|
|
1322 |
|
|
1323 |
changeMenuApply
|
|
1324 |
|
|
1325 |
| changesToApply |
|
|
1326 |
changesToApply := OrderedCollection new.
|
|
1327 |
self changesDo:[:chg|chg removed ifFalse:[changesToApply add: chg]].
|
|
1328 |
self changeMenuApply: changesToApply.
|
|
1329 |
|
|
1330 |
"Created: / 29-10-2010 / 13:53:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1331 |
"Modified: / 16-03-2011 / 22:54:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1332 |
!
|
|
1333 |
|
|
1334 |
changeMenuApply: changesToApply
|
|
1335 |
|
|
1336 |
| changesThatFailToApply |
|
|
1337 |
|
|
1338 |
changesThatFailToApply := ChangeSet new.
|
|
1339 |
ProgressIndicator
|
|
1340 |
displayProgress:'Applying changes...'
|
|
1341 |
at:(Screen default center)
|
|
1342 |
from:200 to:400
|
|
1343 |
during:[:val |
|
|
1344 |
1 to: changesToApply size do:
|
|
1345 |
[:i|
|
|
1346 |
val value:((100 / changesToApply size) * i) rounded.
|
|
1347 |
[self changeMenuApplyChange: (changesToApply at: i)]
|
|
1348 |
on: Error do:[changesThatFailToApply add: (changesToApply at: i)]]]
|
|
1349 |
|
|
1350 |
"Created: / 29-10-2010 / 14:54:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1351 |
!
|
|
1352 |
|
|
1353 |
changeMenuApplyChange: aChange
|
|
1354 |
|
|
1355 |
aChange isClassDefinitionChange ifTrue:
|
|
1356 |
[(Smalltalk at: aChange superClassName asSymbol)
|
|
1357 |
ifNil:[^self error: 'Nil superclass']].
|
|
1358 |
aChange apply
|
|
1359 |
|
|
1360 |
"Modified: / 29-10-2010 / 14:57:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1361 |
!
|
|
1362 |
|
|
1363 |
changeMenuApplySelection
|
|
1364 |
|
|
1365 |
self selectionDo:[:change|self changeMenuApplyChange:change].
|
|
1366 |
|
|
1367 |
"Created: / 29-10-2010 / 13:53:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1368 |
"Modified: / 29-10-2010 / 14:55:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1369 |
!
|
|
1370 |
|
|
1371 |
changeMenuBrowse
|
|
1372 |
"automatically generated by UIEditor ..."
|
|
1373 |
|
|
1374 |
"*** the code below performs no action"
|
|
1375 |
"*** (except for some feedback on the Transcript)"
|
|
1376 |
"*** Please change as required and accept in the browser."
|
|
1377 |
"*** (and replace this comment by something more useful ;-)"
|
|
1378 |
|
|
1379 |
"action to be added ..."
|
|
1380 |
|
|
1381 |
Transcript showCR:self class name, ': action for #changeMenuBrowse ...'.
|
|
1382 |
!
|
|
1383 |
|
|
1384 |
changeMenuDeleteSelection
|
|
1385 |
|
|
1386 |
self selectionDo:[:chg|chg removed: true]
|
|
1387 |
|
|
1388 |
"Modified: / 29-10-2010 / 13:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1389 |
!
|
|
1390 |
|
|
1391 |
changeMenuInspect
|
|
1392 |
|
|
1393 |
| changes |
|
|
1394 |
changes := OrderedCollection new: 1.
|
|
1395 |
self selectionDo:[:chg|changes add: chg].
|
|
1396 |
changes size = 1
|
|
1397 |
ifTrue:[changes anyOne inspect]
|
|
1398 |
ifFalse:[changes inspect].
|
|
1399 |
|
|
1400 |
"Created: / 29-10-2010 / 14:16:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1401 |
!
|
|
1402 |
|
|
1403 |
changeMenuInspect:aValueHolder
|
|
1404 |
|
|
1405 |
aValueHolder value size = 1
|
|
1406 |
ifTrue:[aValueHolder value anyOne inspect]
|
|
1407 |
ifFalse:[aValueHolder value inspect]
|
|
1408 |
!
|
|
1409 |
|
|
1410 |
changeMenuInspectChangeset
|
|
1411 |
|
|
1412 |
self changesetHolder value inspect.
|
|
1413 |
!
|
|
1414 |
|
|
1415 |
changeMenuSelectAdditions
|
|
1416 |
|
|
1417 |
self changeMenuSelectAllSuchThat:[:change|change delta = #+]
|
|
1418 |
|
|
1419 |
"Modified: / 29-10-2010 / 13:16:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1420 |
!
|
|
1421 |
|
|
1422 |
changeMenuSelectAll
|
|
1423 |
|
|
1424 |
self changeMenuSelectAllSuchThat:[:change|true]
|
|
1425 |
|
|
1426 |
"Modified: / 29-10-2010 / 13:17:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1427 |
!
|
|
1428 |
|
|
1429 |
changeMenuSelectAllSuchThat:conditionBlock
|
|
1430 |
|
|
1431 |
| newSelection |
|
|
1432 |
newSelection := OrderedCollection new.
|
|
1433 |
self listDo: [:chg|(conditionBlock value: chg) ifTrue:[newSelection add: chg]].
|
|
1434 |
self selectionHolder value: newSelection.
|
|
1435 |
|
|
1436 |
"Created: / 29-10-2010 / 13:05:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1437 |
"Modified: / 20-03-2011 / 22:33:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1438 |
!
|
|
1439 |
|
|
1440 |
changeMenuSelectDifferences
|
|
1441 |
|
|
1442 |
self changeMenuSelectAllSuchThat:[:change|change delta = #~]
|
|
1443 |
|
|
1444 |
"Created: / 29-10-2010 / 14:07:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1445 |
!
|
|
1446 |
|
|
1447 |
changeMenuSelectNone
|
|
1448 |
|
|
1449 |
self changesDo:[:chg|chg removed: true].
|
|
1450 |
|
|
1451 |
"Modified: / 29-10-2010 / 14:23:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1452 |
!
|
|
1453 |
|
|
1454 |
changeMenuSelectRemovals
|
|
1455 |
|
|
1456 |
self changeMenuSelectAllSuchThat:[:change|change delta = #-]
|
|
1457 |
|
|
1458 |
"Modified: / 29-10-2010 / 13:18:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1459 |
!
|
|
1460 |
|
|
1461 |
changeMenuSelectSame
|
|
1462 |
|
|
1463 |
self changeMenuSelectAllSuchThat:[:change|change delta = #=]
|
|
1464 |
|
|
1465 |
"Modified: / 29-10-2010 / 13:18:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1466 |
!
|
|
1467 |
|
|
1468 |
changeMenuSelectUsingBlock
|
|
1469 |
|
|
1470 |
|conditionBlockString conditionBlock dialog textHolder template|
|
|
1471 |
|
|
1472 |
template :=
|
|
1473 |
'[:change|
|
|
1474 |
"/ Define condition for selection below:
|
|
1475 |
"/ change is an instance of Change
|
|
1476 |
"/ change will be selected if and only if block returns true
|
|
1477 |
|
|
1478 |
|
|
1479 |
true"/always select the change
|
|
1480 |
]
|
|
1481 |
'.
|
|
1482 |
|
|
1483 |
LastSelectionConditionString isNil ifTrue:[
|
|
1484 |
LastSelectionConditionString := template.
|
|
1485 |
].
|
|
1486 |
|
|
1487 |
|
|
1488 |
textHolder := ValueHolder new.
|
|
1489 |
dialog := Dialog
|
|
1490 |
forRequestText:(resources string:'Enter condition for selection')
|
|
1491 |
lines:20
|
|
1492 |
columns:70
|
|
1493 |
initialAnswer:LastSelectionConditionString
|
|
1494 |
model:textHolder.
|
|
1495 |
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]).
|
|
1496 |
dialog open.
|
|
1497 |
dialog accepted ifFalse:[^ self].
|
|
1498 |
|
|
1499 |
conditionBlockString := textHolder value.
|
|
1500 |
LastSelectionConditionString := conditionBlockString.
|
|
1501 |
|
|
1502 |
conditionBlock := Parser evaluate:conditionBlockString.
|
|
1503 |
conditionBlock isBlock ifFalse:[
|
|
1504 |
self error:'Bad selection block (syntax error?)'.
|
|
1505 |
^ self
|
|
1506 |
].
|
|
1507 |
|
|
1508 |
self changeMenuSelectAllSuchThat: conditionBlock
|
|
1509 |
|
|
1510 |
"Modified: / 29-10-2010 / 13:05:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1511 |
!
|
|
1512 |
|
|
1513 |
changeMenuUndeleteSelection
|
|
1514 |
|
|
1515 |
self selectionDo:[:chg|chg removed: false]
|
|
1516 |
|
|
1517 |
"Modified: / 29-10-2010 / 13:53:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1518 |
! !
|
|
1519 |
|
|
1520 |
!ChangeSetBrowser2 methodsFor:'private'!
|
|
1521 |
|
|
1522 |
addChangeListView: aView
|
|
1523 |
|
|
1524 |
changeListViews ifNil:[changeListViews := Set new].
|
|
1525 |
changeListViews add: aView
|
|
1526 |
|
|
1527 |
"Created: / 16-03-2011 / 22:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1528 |
!
|
|
1529 |
|
|
1530 |
changesDo: aBlock
|
|
1531 |
|
|
1532 |
self navigatorChangesetHolder value do:[:chg|chg do: aBlock].
|
|
1533 |
self redrawChangeListViews
|
|
1534 |
|
|
1535 |
"Created: / 29-10-2010 / 13:46:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1536 |
"Modified: / 16-03-2011 / 22:43:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1537 |
!
|
|
1538 |
|
|
1539 |
getNavigatorChangeSet
|
|
1540 |
|
|
1541 |
| changeset |
|
|
1542 |
changeset := changesetHolder value deepCopy.
|
|
1543 |
(changeset isKindOf: ChangeSet) ifFalse:
|
|
1544 |
[changeset := ChangeSet withAll: changeset].
|
|
1545 |
|
|
1546 |
(self navigatorSpecHolder value ~= #oneColumnNavigatorSpec)
|
|
1547 |
ifTrue:[^changeset groupByClass].
|
|
1548 |
|
|
1549 |
"Default"
|
|
1550 |
^changeset
|
|
1551 |
|
|
1552 |
"Created: / 24-10-2009 / 19:31:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1553 |
"Modified: / 20-07-2010 / 09:46:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1554 |
!
|
|
1555 |
|
|
1556 |
redrawChangeListViews
|
|
1557 |
|
|
1558 |
changeListViews ifNil:[^self].
|
|
1559 |
changeListViews do:[:v|
|
|
1560 |
v allSubViewsDo:
|
|
1561 |
[:sv|sv redraw]
|
|
1562 |
]
|
|
1563 |
|
|
1564 |
"Created: / 16-03-2011 / 22:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1565 |
!
|
|
1566 |
|
|
1567 |
selectionDo: aBlock
|
|
1568 |
|
|
1569 |
| applyBlock |
|
|
1570 |
applyBlock := [:e|aBlock value: e change].
|
|
1571 |
|
|
1572 |
selectionHolder value isNilOrEmptyCollection ifTrue:[
|
|
1573 |
(self navigatorChangesetHolder value ? #()) do: aBlock
|
|
1574 |
] ifFalse:[
|
|
1575 |
selection1Holder value isNilOrEmptyCollection not
|
|
1576 |
ifTrue:[selection1Holder value do: applyBlock]
|
|
1577 |
ifFalse:[selectionHolder value do: applyBlock].
|
|
1578 |
].
|
|
1579 |
self redrawChangeListViews
|
|
1580 |
|
|
1581 |
"Created: / 29-10-2010 / 13:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1582 |
"Modified: / 08-04-2011 / 10:15:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10309
|
1583 |
!
|
|
1584 |
|
|
1585 |
showSource: aBoolean
|
|
1586 |
|
|
1587 |
| panel |
|
|
1588 |
|
|
1589 |
|
|
1590 |
"Not yet implemented"
|
|
1591 |
|
|
1592 |
^self.
|
|
1593 |
|
|
1594 |
sourceView ifNil:[^self].
|
|
1595 |
panel := builder componentAt: #VerticalPanel.
|
|
1596 |
aBoolean ifTrue:[
|
|
1597 |
(panel subViews includes: sourceView) ifTrue:[^self].
|
|
1598 |
panel addSubView: sourceView.
|
|
1599 |
] ifFalse:[
|
|
1600 |
(panel subViews includes: sourceView) ifFalse:[^self].
|
|
1601 |
panel removeSubView: sourceView.
|
|
1602 |
sourceView setId: nil.
|
|
1603 |
|
|
1604 |
]
|
|
1605 |
|
|
1606 |
"Created: / 11-07-2011 / 16:06:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10028
|
1607 |
! !
|
|
1608 |
|
|
1609 |
!ChangeSetBrowser2 methodsFor:'private-enumerating'!
|
|
1610 |
|
|
1611 |
listDo: aBlock
|
|
1612 |
|
|
1613 |
self listHolder value ? #() do: aBlock
|
|
1614 |
|
|
1615 |
"Created: / 20-03-2011 / 22:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1616 |
! !
|
|
1617 |
|
|
1618 |
!ChangeSetBrowser2 methodsFor:'queries'!
|
|
1619 |
|
|
1620 |
canApplyChanges
|
|
1621 |
|
|
1622 |
^true
|
|
1623 |
|
|
1624 |
"Created: / 29-10-2010 / 13:07:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1625 |
!
|
|
1626 |
|
|
1627 |
canDrop: somethign
|
|
1628 |
|
|
1629 |
self halt.
|
|
1630 |
|
|
1631 |
"Created: / 20-03-2011 / 21:34:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1632 |
!
|
|
1633 |
|
|
1634 |
hasChangeSelectedAndNotRemoved
|
|
1635 |
|
|
1636 |
self selectionDo:[:e|e removed not ifTrue:[^true]].
|
|
1637 |
^false
|
|
1638 |
|
|
1639 |
"Created: / 18-03-2011 / 08:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1640 |
!
|
|
1641 |
|
|
1642 |
hasSingleChangeSelectedAndCanBrowse
|
|
1643 |
|
|
1644 |
^false
|
|
1645 |
|
|
1646 |
"Created: / 18-03-2011 / 08:02:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1647 |
! !
|
|
1648 |
|
|
1649 |
!ChangeSetBrowser2 class methodsFor:'documentation'!
|
|
1650 |
|
|
1651 |
version_CVS
|
10345
|
1652 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.5 2011-07-19 19:25:52 vrany Exp $'
|
10028
|
1653 |
!
|
|
1654 |
|
|
1655 |
version_SVN
|
|
1656 |
^ '§Id: Tools__ChangeSetBrowser.st 7486 2009-10-26 22:06:24Z vranyj1 §'
|
|
1657 |
! !
|