author | Claus Gittinger <cg@exept.de> |
Mon, 15 Jul 2019 18:53:35 +0200 | |
changeset 18903 | b0d007a5e683 |
parent 18687 | af3bd821d132 |
child 19146 | 08d1031f5475 |
permissions | -rw-r--r-- |
18687 | 1 |
"{ Encoding: utf8 }" |
2 |
||
10011 | 3 |
" |
10109 | 4 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
5 |
Copyright (c) 2009-2010 eXept Software AG |
|
10011 | 6 |
|
10109 | 7 |
Permission is hereby granted, free of charge, to any person |
8 |
obtaining a copy of this software and associated documentation |
|
9 |
files (the 'Software'), to deal in the Software without |
|
10 |
restriction, including without limitation the rights to use, |
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12 |
copies of the Software, and to permit persons to whom the |
|
13 |
Software is furnished to do so, subject to the following |
|
14 |
conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall be |
|
17 |
included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
26 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10011 | 27 |
" |
28 |
"{ Package: 'stx:libtool' }" |
|
29 |
||
30 |
"{ NameSpace: Tools }" |
|
31 |
||
32 |
SimpleDialog subclass:#HierarchicalChangesetDialog |
|
33 |
instanceVariableNames:'changeSetHolder selectedChangeSetHolder codeView diffView' |
|
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-Dialogs' |
|
37 |
! |
|
38 |
||
39 |
HierarchicalItem subclass:#Change |
|
40 |
instanceVariableNames:'change label removed' |
|
41 |
classVariableNames:'' |
|
42 |
poolDictionaries:'' |
|
43 |
privateIn:HierarchicalChangesetDialog |
|
44 |
! |
|
45 |
||
46 |
!HierarchicalChangesetDialog class methodsFor:'documentation'! |
|
47 |
||
48 |
copyright |
|
49 |
" |
|
10109 | 50 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
51 |
Copyright (c) 2009-2010 eXept Software AG |
|
52 |
||
53 |
Permission is hereby granted, free of charge, to any person |
|
54 |
obtaining a copy of this software and associated documentation |
|
55 |
files (the 'Software'), to deal in the Software without |
|
56 |
restriction, including without limitation the rights to use, |
|
57 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
58 |
copies of the Software, and to permit persons to whom the |
|
59 |
Software is furnished to do so, subject to the following |
|
60 |
conditions: |
|
10011 | 61 |
|
10109 | 62 |
The above copyright notice and this permission notice shall be |
63 |
included in all copies or substantial portions of the Software. |
|
64 |
||
65 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
66 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
67 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
68 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
69 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
70 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
71 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
72 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10011 | 73 |
" |
74 |
! ! |
|
75 |
||
76 |
!HierarchicalChangesetDialog class methodsFor:'interface specs'! |
|
77 |
||
78 |
codeViewSpec |
|
79 |
"This resource specification was automatically generated |
|
80 |
by the UIPainter of ST/X." |
|
81 |
||
82 |
"Do not manually edit this!! If it is corrupted, |
|
83 |
the UIPainter may not be able to read the specification." |
|
84 |
||
85 |
" |
|
86 |
UIPainter new openOnClass:Tools::HierarchicalChangesetBrowser andSelector:#codeViewSpec |
|
87 |
Tools::HierarchicalChangesetBrowser new openInterface:#codeViewSpec |
|
88 |
" |
|
89 |
||
90 |
<resource: #canvas> |
|
91 |
||
92 |
^ |
|
93 |
#(FullSpec |
|
94 |
name: codeViewSpec |
|
95 |
window: |
|
96 |
(WindowSpec |
|
97 |
label: 'Code Pane' |
|
98 |
name: 'Code Pane' |
|
99 |
min: (Point 10 10) |
|
100 |
bounds: (Rectangle 0 0 300 300) |
|
101 |
) |
|
102 |
component: |
|
103 |
(SpecCollection |
|
104 |
collection: ( |
|
105 |
(NonScrollableArbitraryComponentSpec |
|
106 |
name: 'CodeView' |
|
107 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
108 |
component: codeView |
|
109 |
) |
|
110 |
(NonScrollableArbitraryComponentSpec |
|
111 |
name: 'DiffView' |
|
112 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
113 |
) |
|
114 |
) |
|
115 |
||
116 |
) |
|
117 |
) |
|
118 |
||
119 |
"Modified: / 06-11-2008 / 14:52:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
120 |
! |
|
121 |
||
122 |
dialogSpec |
|
123 |
"This resource specification was automatically generated |
|
124 |
by the UIPainter of ST/X." |
|
125 |
||
126 |
"Do not manually edit this!! If it is corrupted, |
|
127 |
the UIPainter may not be able to read the specification." |
|
128 |
||
129 |
" |
|
130 |
UIPainter new openOnClass:Tools::HierarchicalChangesetBrowser andSelector:#dialogSpec |
|
131 |
Tools::HierarchicalChangesetBrowser new openInterface:#dialogSpec |
|
132 |
" |
|
133 |
||
134 |
<resource: #canvas> |
|
135 |
||
136 |
^ |
|
137 |
#(FullSpec |
|
138 |
name: dialogSpec |
|
139 |
window: |
|
140 |
(WindowSpec |
|
141 |
label: 'DialogSpec' |
|
142 |
name: 'DialogSpec' |
|
143 |
min: (Point 10 10) |
|
144 |
bounds: (Rectangle 0 0 502 450) |
|
145 |
) |
|
146 |
component: |
|
147 |
(SpecCollection |
|
148 |
collection: ( |
|
149 |
(UISubSpecification |
|
150 |
name: 'WindowSpec' |
|
151 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
152 |
minorKey: windowSpec |
|
153 |
) |
|
154 |
(ActionButtonSpec |
|
155 |
label: 'Accept' |
|
156 |
name: 'AcceptButton' |
|
157 |
layout: (LayoutFrame 0 0.5 -30 1 0 1 0 1) |
|
158 |
translateLabel: true |
|
159 |
model: doAccept |
|
160 |
) |
|
161 |
(ActionButtonSpec |
|
162 |
label: 'Cancel' |
|
163 |
name: 'CancelButton' |
|
164 |
layout: (LayoutFrame 0 0 -30 1 0 0.5 0 1) |
|
165 |
translateLabel: true |
|
166 |
model: doCancel |
|
167 |
) |
|
168 |
) |
|
169 |
||
170 |
) |
|
171 |
) |
|
172 |
||
173 |
"Modified: / 26-11-2008 / 12:15:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
174 |
! |
|
175 |
||
176 |
windowSpec |
|
177 |
"This resource specification was automatically generated |
|
178 |
by the UIPainter of ST/X." |
|
179 |
||
180 |
"Do not manually edit this!! If it is corrupted, |
|
181 |
the UIPainter may not be able to read the specification." |
|
182 |
||
183 |
" |
|
184 |
UIPainter new openOnClass:Tools::HierarchicalChangesetBrowser andSelector:#windowSpec |
|
185 |
Tools::HierarchicalChangesetBrowser new openInterface:#windowSpec |
|
186 |
Tools::HierarchicalChangesetBrowser open |
|
187 |
" |
|
188 |
||
189 |
<resource: #canvas> |
|
190 |
||
191 |
^ |
|
192 |
#(FullSpec |
|
193 |
name: windowSpec |
|
194 |
window: |
|
195 |
(WindowSpec |
|
196 |
label: 'ChangeSet Browser' |
|
197 |
name: 'ChangeSet Browser' |
|
198 |
min: (Point 10 10) |
|
199 |
bounds: (Rectangle 0 0 601 423) |
|
200 |
) |
|
201 |
component: |
|
202 |
(SpecCollection |
|
203 |
collection: ( |
|
204 |
(VariableVerticalPanelSpec |
|
205 |
name: 'VariableVerticalPanel1' |
|
206 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
207 |
component: |
|
208 |
(SpecCollection |
|
209 |
collection: ( |
|
210 |
(HierarchicalListViewSpec |
|
211 |
name: 'ChangeTree' |
|
212 |
model: selectionHolder |
|
213 |
hasHorizontalScrollBar: true |
|
214 |
hasVerticalScrollBar: true |
|
215 |
listModel: changesHolder |
|
216 |
multipleSelectOk: true |
|
217 |
useIndex: false |
|
218 |
highlightMode: line |
|
219 |
doubleClickSelector: changeListToggleRemoved |
|
220 |
useDefaultIcons: false |
|
221 |
) |
|
222 |
(UISubSpecification |
|
223 |
name: 'SubSpecification1' |
|
224 |
minorKey: codeViewSpec |
|
225 |
) |
|
226 |
) |
|
227 |
||
228 |
) |
|
229 |
handles: (Any 0.5 1.0) |
|
230 |
) |
|
231 |
) |
|
232 |
||
233 |
) |
|
234 |
) |
|
235 |
||
236 |
"Modified: / 06-11-2008 / 17:51:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
237 |
! ! |
|
238 |
||
239 |
!HierarchicalChangesetDialog class methodsFor:'plugIn spec'! |
|
240 |
||
241 |
aspectSelectors |
|
242 |
"This resource specification was automatically generated |
|
243 |
by the UIPainter of ST/X." |
|
244 |
||
245 |
"Do not manually edit this. If it is corrupted, |
|
246 |
the UIPainter may not be able to read the specification." |
|
247 |
||
248 |
"Return a description of exported aspects; |
|
249 |
these can be connected to aspects of an embedding application |
|
250 |
(if this app is embedded in a subCanvas)." |
|
251 |
||
252 |
^ #( |
|
253 |
#changeSetHolder |
|
254 |
#selectedChangeSetHolder |
|
255 |
). |
|
256 |
||
257 |
"Created: / 02-04-2009 / 18:04:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
258 |
"Modified: / 03-04-2009 / 09:46:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
259 |
! ! |
|
260 |
||
261 |
!HierarchicalChangesetDialog methodsFor:'accessing'! |
|
262 |
||
263 |
changeSet |
|
264 |
||
265 |
^self changeSetHolder value |
|
266 |
||
267 |
"Created: / 02-04-2009 / 23:14:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
268 |
! |
|
269 |
||
270 |
changeSet: aChangeSet |
|
271 |
||
272 |
^self changeSetHolder value: aChangeSet |
|
273 |
||
274 |
"Created: / 02-04-2009 / 23:14:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
275 |
! |
|
276 |
||
277 |
refactoryChange: refactoryChange |
|
278 |
||
279 |
self refactoryChanges: (Array with: refactoryChange) |
|
280 |
||
281 |
"Created: / 26-11-2008 / 12:26:07 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
282 |
! |
|
283 |
||
284 |
refactoryChanges: refactoryChanges |
|
285 |
||
286 |
||
287 |
self changesHolder root |
|
288 |
children:(refactoryChanges collect:[:each|(Tools::HierarchicalChangesetDialog::Change forRefactoryChange: each) parent:self changesHolder root]); |
|
289 |
expand. |
|
290 |
||
291 |
"Created: / 26-11-2008 / 11:32:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
292 |
! |
|
293 |
||
294 |
selectedChange |
|
295 |
||
296 |
| selection | |
|
297 |
selection := self selection. |
|
298 |
^selection size = 1 |
|
299 |
ifTrue:[selection anyOne] |
|
300 |
ifFalse:[nil] |
|
301 |
||
302 |
"Created: / 02-04-2009 / 17:58:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
303 |
! |
|
304 |
||
305 |
selectedChangeSet |
|
306 |
||
307 |
| changeSet | |
|
308 |
changeSet := ChangeSet new. |
|
309 |
self changesHolder do: |
|
310 |
[:each|(each change notNil and:[each isRemoved not]) |
|
311 |
ifTrue:[changeSet add: each change]]. |
|
312 |
^changeSet |
|
313 |
||
314 |
"Created: / 02-04-2009 / 17:58:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
315 |
! |
|
316 |
||
317 |
selection |
|
318 |
||
319 |
^self selectionHolder value |
|
320 |
||
321 |
"Created: / 06-11-2008 / 15:02:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
322 |
! ! |
|
323 |
||
324 |
!HierarchicalChangesetDialog methodsFor:'actions'! |
|
325 |
||
326 |
changeListToggleRemoved |
|
327 |
self selection do:[:each | |
|
328 |
each removed:each isRemoved not |
|
329 |
]. |
|
330 |
self updateSelectedChangeSet |
|
331 |
||
332 |
"Created: / 06-11-2008 / 17:44:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
333 |
"Modified: / 03-04-2009 / 09:47:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
334 |
! |
|
335 |
||
336 |
updateSelectedChangeSet |
|
337 |
selectedChangeSetHolder |
|
338 |
ifNotNil:[ selectedChangeSetHolder value:self selectedChangeSet ] |
|
339 |
! ! |
|
340 |
||
341 |
!HierarchicalChangesetDialog methodsFor:'aspects'! |
|
342 |
||
343 |
changeSetHolder |
|
344 |
||
345 |
changeSetHolder isNil ifTrue:[ |
|
346 |
self changeSetHolder: ChangeSet new asValue. |
|
347 |
]. |
|
348 |
^ changeSetHolder |
|
349 |
||
350 |
"Modified: / 02-04-2009 / 18:01:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
351 |
! |
|
352 |
||
353 |
changeSetHolder:aValueHolder |
|
354 |
||
355 |
changeSetHolder := aValueHolder. |
|
356 |
changeSetHolder onChangeSend: #updateChangeSet to: self. |
|
357 |
self updateChangeSet |
|
358 |
||
359 |
"Modified: / 02-04-2009 / 23:14:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
360 |
! |
|
361 |
||
362 |
changesHolder |
|
363 |
||
364 |
|list| |
|
365 |
||
366 |
self createBuilder. |
|
367 |
(list := builder bindingAt:#changesHolder) isNil ifTrue:[ |
|
368 |
list := HierarchicalList new |
|
369 |
application: self; |
|
370 |
root: (HierarchicalChangesetDialog::Change new label:'Whole changeset'); |
|
371 |
showRoot: false. |
|
372 |
list root expand. |
|
373 |
builder aspectAt:#changesHolder put:list. |
|
374 |
]. |
|
375 |
^ list. |
|
376 |
||
377 |
"Created: / 05-11-2008 / 08:43:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
378 |
"Modified: / 26-11-2008 / 12:12:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
379 |
! |
|
380 |
||
381 |
codeView |
|
382 |
||
10876 | 383 |
codeView isNil ifTrue:[ |
384 |
codeView := HVScrollableView for: CodeView |
|
385 |
]. |
|
10011 | 386 |
^codeView |
387 |
||
388 |
"Created: / 06-11-2008 / 14:52:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10876 | 389 |
"Modified: / 18-11-2011 / 14:58:32 / cg" |
10011 | 390 |
! |
391 |
||
392 |
diffView |
|
393 |
||
10876 | 394 |
diffView isNil ifTrue:[ |
395 |
diffView := HVScrollableView for: DiffTextView |
|
396 |
]. |
|
10011 | 397 |
^diffView |
398 |
||
399 |
"Created: / 06-11-2008 / 15:01:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10876 | 400 |
"Modified: / 18-11-2011 / 14:58:41 / cg" |
10011 | 401 |
! |
402 |
||
403 |
selectedChangeSetHolder |
|
404 |
"return/create the 'selectedChangeSetHolder' value holder (automatically generated)" |
|
405 |
||
406 |
^ selectedChangeSetHolder |
|
407 |
||
408 |
"Modified: / 03-04-2009 / 09:47:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
409 |
! |
|
410 |
||
411 |
selectedChangeSetHolder:aValueHolder |
|
412 |
"set the 'selectedChangeSetHolder' value holder (automatically generated)" |
|
413 |
||
414 |
selectedChangeSetHolder := aValueHolder. |
|
415 |
self updateSelectedChangeSet |
|
416 |
||
417 |
"Modified: / 06-04-2009 / 17:43:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
418 |
! |
|
419 |
||
420 |
selectionHolder |
|
421 |
||
422 |
|holder| |
|
423 |
||
424 |
(holder := builder bindingAt:#selectionHolder) isNil ifTrue:[ |
|
425 |
holder := #() asValue. |
|
426 |
holder onChangeSend: #updateCode to: self. |
|
427 |
builder aspectAt:#selectionHolder put:holder. |
|
428 |
]. |
|
429 |
^ holder. |
|
430 |
||
431 |
"Created: / 05-11-2008 / 08:40:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
432 |
"Modified: / 06-11-2008 / 15:04:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
433 |
! ! |
|
434 |
||
435 |
!HierarchicalChangesetDialog methodsFor:'change & update'! |
|
436 |
||
437 |
updateChangeSet |
|
438 |
||
439 |
| condensedChangeset classNames classChanges otherChanges | |
|
440 |
condensedChangeset := self changeSet" copy condenseChanges". |
|
441 |
classNames := (condensedChangeset |
|
442 |
select:[:each|each isClassChange] |
|
443 |
thenCollect:[:each|each nonMetaClassName]) asSet asSortedCollection. |
|
444 |
classChanges := classNames collect: |
|
445 |
[:className| |
|
446 |
| classChange | |
|
18687 | 447 |
classChange := Change new label: className allBold. |
10011 | 448 |
classChange children: |
449 |
(condensedChangeset |
|
450 |
select:[:each|each isClassChange and:[each nonMetaClassName = className]] |
|
451 |
thenCollect:[:each|Change forChange: each]). |
|
452 |
classChange expand]. |
|
453 |
otherChanges := condensedChangeset |
|
454 |
select:[:each|each isClassChange not] |
|
455 |
thenCollect:[:each|Change forChange: each]. |
|
456 |
self changesHolder root |
|
457 |
children:(classChanges asOrderedCollection) , (otherChanges asOrderedCollection); |
|
458 |
expand. |
|
459 |
self updateSelectedChangeSet |
|
460 |
||
461 |
"Created: / 02-04-2009 / 17:56:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
462 |
"Modified: / 06-04-2009 / 17:43:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
18687 | 463 |
"Modified: / 13-03-2019 / 22:07:19 / Claus Gittinger" |
10011 | 464 |
! |
465 |
||
466 |
updateCode |
|
10876 | 467 |
| change scrolledCodeView | |
10011 | 468 |
|
469 |
change := self selectedChange. |
|
10876 | 470 |
change isNil ifTrue:[^self]. |
471 |
(scrolledCodeView := self codeView scrolledView) isNil ifTrue:[^self]. |
|
472 |
scrolledCodeView |
|
10011 | 473 |
contents: change source; |
474 |
raise. |
|
475 |
||
476 |
"Created: / 06-11-2008 / 15:01:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
477 |
"Modified: / 02-04-2009 / 17:59:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10876 | 478 |
"Modified (format): / 18-11-2011 / 14:59:31 / cg" |
10011 | 479 |
! ! |
480 |
||
481 |
!HierarchicalChangesetDialog methodsFor:'hooks'! |
|
482 |
||
483 |
commonPostOpen |
|
484 |
||
17312 | 485 |
super commonPostOpen. |
10011 | 486 |
self codeView raise |
487 |
||
488 |
"Created: / 06-11-2008 / 08:23:28 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
489 |
"Modified: / 06-11-2008 / 17:11:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
490 |
! ! |
|
491 |
||
492 |
!HierarchicalChangesetDialog::Change class methodsFor:'documentation'! |
|
493 |
||
494 |
version |
|
17312 | 495 |
^'$Header$' |
10011 | 496 |
! ! |
497 |
||
498 |
!HierarchicalChangesetDialog::Change class methodsFor:'image specs'! |
|
499 |
||
500 |
checkedIcon |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
501 |
<resource: #image> |
10011 | 502 |
"This resource specification was automatically generated |
503 |
by the ImageEditor of ST/X." |
|
504 |
"Do not manually edit this!! If it is corrupted, |
|
505 |
the ImageEditor may not be able to read the specification." |
|
506 |
" |
|
507 |
self checkedIcon inspect |
|
508 |
ImageEditor openOnClass:self andSelector:#checkedIcon |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
509 |
Icon flushCachedIcons" |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
510 |
|
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
511 |
^ Icon |
10011 | 512 |
constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkedIcon' |
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
513 |
ifAbsentPut:[ |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
514 |
(Depth1Image new) |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
515 |
width:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
516 |
height:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
517 |
photometric:(#palette); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
518 |
bitsPerSample:(#[ 1 ]); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
519 |
samplesPerPixel:(1); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
520 |
bits:(ByteArray |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
521 |
fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?07?C?<O?0??@@@@@@b'); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
522 |
colorMapFromArray:#[ 0 0 0 33 161 33 ]; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
523 |
mask:((ImageMask new) |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
524 |
width:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
525 |
height:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
526 |
bits:(ByteArray |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
527 |
fromPackedString:' |
10011 | 528 |
?????<@C0@O@D<@30GOH8<7C38OG@<HC0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
529 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
530 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
531 |
yourself); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
532 |
yourself |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
533 |
] |
10011 | 534 |
|
535 |
"Created: / 06-11-2008 / 16:32:46 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
536 |
! |
|
537 |
||
538 |
uncheckedIcon |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
539 |
<resource: #image> |
10011 | 540 |
"This resource specification was automatically generated |
541 |
by the ImageEditor of ST/X." |
|
542 |
"Do not manually edit this!! If it is corrupted, |
|
543 |
the ImageEditor may not be able to read the specification." |
|
544 |
" |
|
545 |
self checkFrameForm inspect |
|
546 |
ImageEditor openOnClass:self andSelector:#checkFrameForm |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
547 |
Icon flushCachedIcons" |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
548 |
|
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
549 |
^ Icon |
10011 | 550 |
constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkFrameForm' |
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
551 |
ifAbsentPut:[ |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
552 |
(Depth1Image new) |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
553 |
width:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
554 |
height:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
555 |
photometric:(#palette); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
556 |
bitsPerSample:(#[ 1 ]); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
557 |
samplesPerPixel:(1); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
558 |
bits:(ByteArray |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
559 |
fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?0??C?<O?0??@@@@@@b'); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
560 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
561 |
mask:((ImageMask new) |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
562 |
width:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
563 |
height:16; |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
564 |
bits:(ByteArray |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
565 |
fromPackedString:' |
10011 | 566 |
?????<@C0@O@@<@C0@O@@<@C0@O@@<@C0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
567 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
568 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
569 |
yourself); |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
570 |
yourself |
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
571 |
] |
10011 | 572 |
|
573 |
"Created: / 06-11-2008 / 16:32:46 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
574 |
! ! |
|
575 |
||
576 |
!HierarchicalChangesetDialog::Change class methodsFor:'instance creation'! |
|
577 |
||
578 |
forChange: aChange |
|
579 |
||
580 |
^self new change: aChange |
|
581 |
||
582 |
"Created: / 26-11-2008 / 11:31:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
583 |
! |
|
584 |
||
585 |
forRefactoryChange: aChange |
|
586 |
||
587 |
^self new refactoryChange: aChange |
|
588 |
||
589 |
"Created: / 26-11-2008 / 11:33:04 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
590 |
! ! |
|
591 |
||
592 |
!HierarchicalChangesetDialog::Change methodsFor:'accessing'! |
|
593 |
||
594 |
change |
|
595 |
^ change |
|
596 |
||
597 |
"Created: / 05-11-2008 / 22:57:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
598 |
! |
|
599 |
||
600 |
change:something |
|
601 |
change := something. |
|
602 |
||
603 |
"Created: / 05-11-2008 / 22:57:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
604 |
! |
|
605 |
||
606 |
children: aCollection |
|
607 |
||
608 |
aCollection do:[:each|each parent: self]. |
|
609 |
super children: aCollection |
|
610 |
||
611 |
"Created: / 06-11-2008 / 16:57:57 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
612 |
! |
|
613 |
||
614 |
icon |
|
615 |
||
616 |
^self isRemoved |
|
617 |
ifTrue:[self class uncheckedIcon] |
|
618 |
ifFalse:[self class checkedIcon] |
|
619 |
||
620 |
"Created: / 06-11-2008 / 16:30:34 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
621 |
! |
|
622 |
||
623 |
label |
|
624 |
||
10876 | 625 |
label isNil ifTrue:[ |
626 |
label := change |
|
10011 | 627 |
ifNil:['Composite change'] |
10876 | 628 |
ifNotNil:[change printString"displayStringForBrowser: self application"] |
629 |
]. |
|
10011 | 630 |
^label |
631 |
||
632 |
"Created: / 05-11-2008 / 08:20:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
633 |
"Modified: / 07-11-2008 / 08:25:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10876 | 634 |
"Modified: / 18-11-2011 / 14:59:53 / cg" |
10011 | 635 |
! |
636 |
||
637 |
label:something |
|
638 |
label := something. |
|
639 |
||
640 |
"Created: / 06-11-2008 / 17:11:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
641 |
! |
|
642 |
||
643 |
refactoryChange:refactoryChange |
|
644 |
||
645 |
refactoryChange isCompositeRefactoryChange |
|
646 |
ifTrue: |
|
647 |
[label := refactoryChange name. |
|
648 |
self children: (refactoryChange changes |
|
649 |
collect:[:each|(Tools::HierarchicalChangesetDialog::Change forRefactoryChange: each) |
|
650 |
parent: self]). |
|
651 |
self expand] |
|
652 |
ifFalse: |
|
653 |
[change := refactoryChange] |
|
654 |
||
655 |
"Created: / 26-11-2008 / 11:32:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
656 |
! |
|
657 |
||
658 |
removed:aBoolean |
|
659 |
self setRemoved: aBoolean. |
|
660 |
self children do:[:each|each removed: aBoolean]. |
|
661 |
self parent ifNotNil: |
|
662 |
[self parent updateRemoved]. |
|
663 |
||
664 |
"Created: / 05-11-2008 / 08:21:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
665 |
"Modified: / 06-11-2008 / 17:50:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
666 |
! |
|
667 |
||
668 |
source |
|
669 |
||
670 |
^change |
|
671 |
ifNotNil:[change source] |
|
672 |
ifNil:[''] |
|
673 |
||
674 |
"Created: / 06-11-2008 / 15:03:04 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
675 |
"Modified: / 06-11-2008 / 16:31:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
676 |
! ! |
|
677 |
||
678 |
!HierarchicalChangesetDialog::Change methodsFor:'change & update'! |
|
679 |
||
680 |
updateRemoved |
|
681 |
||
682 |
change ifNotNil:[^self]. |
|
11742
1d85e2ea8875
use #conform: instead of #inject:into:
Stefan Vogel <sv@exept.de>
parents:
10876
diff
changeset
|
683 |
self setRemoved: (children conform:[:each| each isRemoved]) |
10011 | 684 |
|
685 |
"Created: / 06-11-2008 / 17:36:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
686 |
! ! |
|
687 |
||
688 |
!HierarchicalChangesetDialog::Change methodsFor:'private'! |
|
689 |
||
690 |
setRemoved: aBoolean |
|
691 |
||
692 |
removed ~~ aBoolean ifTrue: |
|
693 |
[removed := aBoolean. |
|
694 |
self changed: #removed] |
|
695 |
||
696 |
"Created: / 06-11-2008 / 17:49:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
697 |
! ! |
|
698 |
||
699 |
!HierarchicalChangesetDialog::Change methodsFor:'testing'! |
|
700 |
||
701 |
isCompositeChange |
|
702 |
||
703 |
^self isLeafChange not |
|
704 |
||
705 |
"Created: / 06-11-2008 / 17:31:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
706 |
! |
|
707 |
||
708 |
isLeafChange |
|
709 |
||
710 |
^change notNil |
|
711 |
||
712 |
"Created: / 06-11-2008 / 17:31:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
713 |
! |
|
714 |
||
715 |
isRemoved |
|
716 |
||
10876 | 717 |
removed isNil ifTrue:[removed := false]. |
10011 | 718 |
^removed |
719 |
||
720 |
"Created: / 05-11-2008 / 08:21:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10876 | 721 |
"Modified: / 18-11-2011 / 14:59:39 / cg" |
10011 | 722 |
! ! |
723 |
||
724 |
!HierarchicalChangesetDialog class methodsFor:'documentation'! |
|
725 |
||
726 |
version_CVS |
|
17312 | 727 |
^ '$Header$' |
10011 | 728 |
! |
729 |
||
730 |
version_SVN |
|
17312 | 731 |
^ '$Id$' |
10011 | 732 |
! ! |
14407
418e55e55d9a
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
11742
diff
changeset
|
733 |