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