author | Claus Gittinger <cg@exept.de> |
Fri, 14 Feb 2014 01:24:33 +0100 | |
changeset 13937 | 92692b01ed8e |
parent 13929 | 7447bbfa1126 |
child 13970 | d280c182f218 |
permissions | -rw-r--r-- |
10009 | 1 |
" |
10064 | 2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
3 |
All Rights Reserved |
|
10009 | 4 |
|
10064 | 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. |
|
10009 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
10925 | 30 |
BrowserListWithFilter subclass:#ChangeList |
13835 | 31 |
instanceVariableNames:'listHolder showRemovedHolder showSameHolder showTimestampHolder |
32 |
allowRemoveHolder allowAcceptHolder scrollToBottom applyAction |
|
33 |
showConflictsOnlyHolder' |
|
10009 | 34 |
classVariableNames:'LastSelectionConditionString' |
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-Browsers-ChangeSet' |
|
37 |
! |
|
38 |
||
39 |
HierarchicalItem subclass:#ListEntry |
|
40 |
instanceVariableNames:'change application x' |
|
41 |
classVariableNames:'' |
|
42 |
poolDictionaries:'' |
|
43 |
privateIn:ChangeList |
|
44 |
! |
|
45 |
||
46 |
!ChangeList class methodsFor:'documentation'! |
|
47 |
||
48 |
copyright |
|
49 |
" |
|
10064 | 50 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
51 |
All Rights Reserved |
|
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: |
|
10009 | 61 |
|
10064 | 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. |
|
10009 | 73 |
" |
74 |
! ! |
|
75 |
||
76 |
!ChangeList class methodsFor:'image specs'! |
|
77 |
||
78 |
iconEqual |
|
10657 | 79 |
^ ToolbarIconLibrary iconEqual12x12 |
10009 | 80 |
|
10657 | 81 |
"Modified: / 31-08-2011 / 10:52:34 / cg" |
10009 | 82 |
! |
83 |
||
84 |
iconEqualGrayed |
|
10657 | 85 |
^ ToolbarIconLibrary iconEqualGray12x12 |
10009 | 86 |
|
10657 | 87 |
"Modified: / 31-08-2011 / 10:54:00 / cg" |
10009 | 88 |
! |
89 |
||
12666 | 90 |
iconExcla |
91 |
^ ToolbarIconLibrary iconExclaRed12x12 |
|
92 |
! |
|
93 |
||
10009 | 94 |
iconMinus |
11657 | 95 |
^ ToolbarIconLibrary iconMinusRed12x12 |
10009 | 96 |
|
11657 | 97 |
"Modified: / 24-07-2012 / 16:43:36 / cg" |
10009 | 98 |
! |
99 |
||
100 |
iconMinusGrayed |
|
10657 | 101 |
^ ToolbarIconLibrary iconMinusGray12x12 |
10009 | 102 |
|
10657 | 103 |
"Modified: / 31-08-2011 / 10:54:40 / cg" |
10009 | 104 |
! |
105 |
||
106 |
iconPlus |
|
11657 | 107 |
^ ToolbarIconLibrary iconPlusBlue12x12 |
10009 | 108 |
|
11657 | 109 |
"Modified: / 24-07-2012 / 16:43:31 / cg" |
10009 | 110 |
! |
111 |
||
112 |
iconPlusGrayed |
|
10657 | 113 |
^ ToolbarIconLibrary iconPlusGray12x12 |
10009 | 114 |
|
10657 | 115 |
"Modified: / 31-08-2011 / 10:54:46 / cg" |
10009 | 116 |
! ! |
117 |
||
118 |
!ChangeList class methodsFor:'interface specs'! |
|
119 |
||
120 |
windowSpec |
|
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::ChangeList andSelector:#windowSpec |
|
129 |
Tools::ChangeList new openInterface:#windowSpec |
|
130 |
Tools::ChangeList open |
|
131 |
" |
|
132 |
||
133 |
<resource: #canvas> |
|
134 |
||
13835 | 135 |
^ |
10009 | 136 |
#(FullSpec |
13835 | 137 |
name: windowSpec |
138 |
window: |
|
10009 | 139 |
(WindowSpec |
13835 | 140 |
label: 'Change List' |
141 |
name: 'Change List' |
|
142 |
min: (Point 10 10) |
|
143 |
bounds: (Rectangle 0 0 300 300) |
|
144 |
) |
|
145 |
component: |
|
10009 | 146 |
(SpecCollection |
13835 | 147 |
collection: ( |
148 |
(InputFieldSpec |
|
149 |
name: 'Filter' |
|
150 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
|
151 |
initiallyInvisible: true |
|
152 |
model: filterPatternHolder |
|
153 |
immediateAccept: true |
|
154 |
acceptOnLeave: false |
|
155 |
acceptOnReturn: false |
|
156 |
acceptOnTab: false |
|
157 |
acceptOnPointerLeave: false |
|
158 |
emptyFieldReplacementText: 'Search Filter...' |
|
159 |
postBuildCallback: postBuildFilterView: |
|
160 |
) |
|
161 |
(DataSetSpec |
|
162 |
name: 'List' |
|
163 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
164 |
model: selectionHolder |
|
165 |
menu: menuHolderWithShowFilter |
|
166 |
hasHorizontalScrollBar: true |
|
167 |
hasVerticalScrollBar: true |
|
168 |
dataList: listHolder |
|
169 |
useIndex: false |
|
170 |
doubleClickSelector: selectionDoubleclicked |
|
171 |
columnHolder: listColumns |
|
172 |
showLabels: false |
|
173 |
multipleSelectOk: true |
|
174 |
postBuildCallback: postBuildListView: |
|
175 |
properties: |
|
176 |
(PropertyListDictionary |
|
177 |
startDragSelector: nil |
|
178 |
dropObjectSelector: dragObjects: |
|
179 |
canDropSelector: canDrop: |
|
180 |
dropSelector: dropObjects: |
|
181 |
) |
|
182 |
) |
|
183 |
) |
|
184 |
||
185 |
) |
|
186 |
) |
|
187 |
! ! |
|
188 |
||
189 |
!ChangeList class methodsFor:'list specs'! |
|
190 |
||
191 |
listColumnSpec |
|
192 |
"This resource specification was automatically generated |
|
193 |
by the DataSetBuilder of ST/X." |
|
194 |
||
195 |
"Do not manually edit this!! If it is corrupted, |
|
196 |
the DataSetBuilder may not be able to read the specification." |
|
197 |
||
198 |
" |
|
199 |
DataSetBuilder new openOnClass:Tools::ChangeList andSelector:#listColumnSpec |
|
200 |
" |
|
201 |
||
202 |
<resource: #tableColumns> |
|
203 |
||
204 |
^#( |
|
205 |
(DataSetColumnSpec |
|
206 |
label: 'Removed' |
|
207 |
id: 'removed' |
|
208 |
labelButtonType: Button |
|
209 |
width: 20 |
|
210 |
minWidth: 20 |
|
211 |
editorType: CheckToggle |
|
212 |
rendererType: CheckToggle |
|
213 |
model: notRemoved |
|
214 |
menuFromApplication: false |
|
215 |
printSelector: notRemoved |
|
216 |
isResizeable: false |
|
217 |
showRowSeparator: false |
|
218 |
showSelectionHighLighted: false |
|
219 |
showColSeparator: false |
|
220 |
) |
|
221 |
(DataSetColumnSpec |
|
222 |
label: 'Delta' |
|
223 |
id: 'delta' |
|
224 |
labelButtonType: Button |
|
225 |
width: 20 |
|
226 |
minWidth: 20 |
|
227 |
menuFromApplication: false |
|
228 |
printSelector: iconDelta |
|
229 |
canSelect: false |
|
230 |
isResizeable: false |
|
231 |
showRowSeparator: false |
|
232 |
showSelectionHighLighted: false |
|
233 |
showColSeparator: false |
|
234 |
) |
|
235 |
(DataSetColumnSpec |
|
236 |
label: 'Change' |
|
237 |
id: change |
|
238 |
labelAlignment: left |
|
239 |
labelButtonType: Button |
|
240 |
menuFromApplication: false |
|
241 |
printSelector: label |
|
242 |
canSelect: false |
|
243 |
showRowSeparator: false |
|
244 |
showColSeparator: false |
|
245 |
) |
|
246 |
(DataSetColumnSpec |
|
247 |
label: 'Class' |
|
248 |
id: 'className' |
|
249 |
labelAlignment: left |
|
250 |
activeHelpKey: '' |
|
251 |
activeHelpKeyForLabel: '' |
|
252 |
labelButtonType: Button |
|
253 |
usePreferredWidth: true |
|
254 |
model: className |
|
255 |
menuFromApplication: false |
|
256 |
canSelect: false |
|
257 |
showRowSeparator: false |
|
258 |
showColSeparator: false |
|
259 |
) |
|
260 |
(DataSetColumnSpec |
|
261 |
label: 'Selector' |
|
262 |
id: 'selector' |
|
263 |
labelAlignment: left |
|
264 |
activeHelpKey: '' |
|
265 |
activeHelpKeyForLabel: '' |
|
266 |
labelButtonType: Button |
|
267 |
usePreferredWidth: true |
|
268 |
model: selector |
|
269 |
menuFromApplication: false |
|
270 |
canSelect: false |
|
271 |
showRowSeparator: false |
|
272 |
showColSeparator: false |
|
273 |
) |
|
274 |
(DataSetColumnSpec |
|
275 |
label: 'Category' |
|
276 |
id: category |
|
277 |
labelAlignment: left |
|
278 |
labelButtonType: Button |
|
279 |
usePreferredWidth: true |
|
280 |
model: category |
|
281 |
menuFromApplication: false |
|
282 |
canSelect: false |
|
283 |
showRowSeparator: false |
|
284 |
showColSeparator: false |
|
285 |
) |
|
286 |
(DataSetColumnSpec |
|
287 |
label: 'Time Stamp' |
|
288 |
id: timeStamp |
|
289 |
labelAlignment: left |
|
290 |
labelButtonType: Button |
|
291 |
usePreferredWidth: true |
|
292 |
model: timeStamp |
|
293 |
menuFromApplication: false |
|
294 |
canSelect: false |
|
295 |
showRowSeparator: false |
|
296 |
showColSeparator: false |
|
297 |
) |
|
10009 | 298 |
) |
10925 | 299 |
|
10009 | 300 |
! ! |
301 |
||
302 |
!ChangeList class methodsFor:'menu specs'! |
|
303 |
||
304 |
listMenu |
|
305 |
"This resource specification was automatically generated |
|
306 |
by the MenuEditor of ST/X." |
|
307 |
||
308 |
"Do not manually edit this!! If it is corrupted, |
|
309 |
the MenuEditor may not be able to read the specification." |
|
310 |
||
11194 | 311 |
|
10009 | 312 |
" |
313 |
MenuEditor new openOnClass:Tools::ChangeList andSelector:#listMenu |
|
314 |
(Menu new fromLiteralArrayEncoding:(Tools::ChangeList listMenu)) startUp |
|
315 |
" |
|
316 |
||
317 |
<resource: #menu> |
|
318 |
||
319 |
^ |
|
320 |
#(Menu |
|
321 |
( |
|
322 |
(MenuItem |
|
323 |
enabled: hasChangeSelectedAndNotRemoved |
|
324 |
label: 'Apply' |
|
325 |
itemValue: listMenuApply |
|
326 |
translateLabel: true |
|
11194 | 327 |
isVisible: allowAcceptHolder |
10009 | 328 |
shortcutKey: Accept |
329 |
) |
|
330 |
(MenuItem |
|
331 |
label: 'Apply all' |
|
332 |
itemValue: listMenuApplyAll |
|
333 |
translateLabel: true |
|
11194 | 334 |
isVisible: allowAcceptHolder |
10009 | 335 |
) |
336 |
(MenuItem |
|
337 |
enabled: hasSingleChangeSelectedAndCanBrowse |
|
338 |
label: 'Browse' |
|
339 |
itemValue: listMenuBrowse |
|
340 |
translateLabel: true |
|
341 |
) |
|
342 |
(MenuItem |
|
343 |
label: '-' |
|
344 |
) |
|
345 |
(MenuItem |
|
346 |
label: 'Delete' |
|
347 |
itemValue: listMenuDeleteSelection |
|
348 |
nameKey: Delete |
|
349 |
translateLabel: true |
|
11194 | 350 |
isVisible: allowRemoveHolder |
10009 | 351 |
shortcutKey: Delete |
352 |
) |
|
353 |
(MenuItem |
|
354 |
label: '-' |
|
11194 | 355 |
isVisible: allowRemoveHolder |
10009 | 356 |
) |
357 |
(MenuItem |
|
358 |
label: 'Select...' |
|
359 |
translateLabel: true |
|
360 |
submenu: |
|
361 |
(Menu |
|
362 |
( |
|
363 |
(MenuItem |
|
364 |
label: 'Select same' |
|
365 |
itemValue: listMenuSelectSame |
|
366 |
translateLabel: true |
|
367 |
) |
|
368 |
(MenuItem |
|
12577 | 369 |
label: 'Select conflicts (redefined classes/methods)' |
370 |
itemValue: listMenuSelectConflicts |
|
371 |
translateLabel: true |
|
372 |
) |
|
373 |
(MenuItem |
|
10009 | 374 |
label: 'Select additions (new classes/methods)' |
375 |
itemValue: listMenuSelectAdditions |
|
376 |
translateLabel: true |
|
377 |
) |
|
378 |
(MenuItem |
|
379 |
label: 'Select removals' |
|
380 |
itemValue: listMenuSelectRemovals |
|
381 |
translateLabel: true |
|
382 |
) |
|
383 |
(MenuItem |
|
384 |
label: '-' |
|
385 |
) |
|
386 |
(MenuItem |
|
387 |
label: 'Select all' |
|
388 |
itemValue: listMenuSelectAll |
|
389 |
translateLabel: true |
|
390 |
) |
|
391 |
(MenuItem |
|
392 |
label: 'Select none' |
|
393 |
itemValue: listMenuSelectNone |
|
394 |
translateLabel: true |
|
395 |
) |
|
396 |
(MenuItem |
|
397 |
label: '-' |
|
398 |
) |
|
399 |
(MenuItem |
|
400 |
label: 'Select using block' |
|
401 |
itemValue: listMenuSelectUsingBlock |
|
402 |
translateLabel: true |
|
403 |
) |
|
404 |
) |
|
405 |
nil |
|
406 |
nil |
|
407 |
) |
|
408 |
) |
|
409 |
(MenuItem |
|
410 |
label: '-' |
|
411 |
) |
|
412 |
(MenuItem |
|
413 |
label: 'Show Deleted' |
|
414 |
translateLabel: true |
|
11194 | 415 |
isVisible: allowRemoveHolder |
10009 | 416 |
indication: showRemovedHolder |
417 |
) |
|
418 |
(MenuItem |
|
419 |
label: 'Inspect change' |
|
420 |
itemValue: listMenuInspect |
|
421 |
translateLabel: true |
|
422 |
) |
|
423 |
) |
|
424 |
nil |
|
425 |
nil |
|
426 |
) |
|
427 |
! ! |
|
428 |
||
429 |
!ChangeList class methodsFor:'plugIn spec'! |
|
430 |
||
431 |
aspectSelectors |
|
432 |
"This resource specification was automatically generated |
|
433 |
by the UIPainter of ST/X." |
|
434 |
||
435 |
"Do not manually edit this. If it is corrupted, |
|
436 |
the UIPainter may not be able to read the specification." |
|
437 |
||
438 |
"Return a description of exported aspects; |
|
439 |
these can be connected to aspects of an embedding application |
|
440 |
(if this app is embedded in a subCanvas)." |
|
441 |
||
442 |
^ #( |
|
11194 | 443 |
#allowAcceptHolder |
444 |
#allowRemoveHolder |
|
10009 | 445 |
#inGeneratorHolder |
446 |
#menuHolder |
|
447 |
#outGeneratorHolder |
|
448 |
#selectionHolder |
|
13835 | 449 |
#showFilterHolder |
10009 | 450 |
#showRemovedHolder |
10449 | 451 |
#showSameHolder |
13835 | 452 |
#showTimestampHolder |
12657 | 453 |
#showConflictsOnlyHolder |
10009 | 454 |
). |
455 |
||
456 |
! ! |
|
457 |
||
458 |
!ChangeList methodsFor:'accessing'! |
|
459 |
||
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
460 |
acceptEnabled |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
461 |
^ self allowAccept |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
462 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
463 |
"Created: / 08-02-2012 / 14:45:12 / cg" |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
464 |
! |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
465 |
|
11194 | 466 |
allowAccept |
467 |
^ self allowAcceptHolder value |
|
10009 | 468 |
|
11194 | 469 |
"Created: / 24-01-2012 / 19:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 470 |
! |
471 |
||
11194 | 472 |
allowAccept: aBoolean |
473 |
^ self allowAcceptHolder value: aBoolean |
|
10009 | 474 |
|
11194 | 475 |
"Created: / 24-01-2012 / 19:52:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
476 |
! |
|
477 |
||
478 |
allowRemoved |
|
479 |
^ self allowRemoveHolder value ? true |
|
480 |
||
481 |
"Created: / 05-12-2009 / 14:28:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 482 |
! |
483 |
||
11795 | 484 |
applyAction:aBlock |
485 |
applyAction := aBlock. |
|
486 |
||
487 |
"Modified (format): / 10-09-2012 / 14:15:30 / cg" |
|
11794 | 488 |
! |
489 |
||
11035 | 490 |
list |
491 |
^ listHolder value |
|
492 |
||
493 |
"Created: / 05-12-2009 / 14:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
494 |
"Created: / 27-12-2011 / 14:18:25 / cg" |
|
495 |
! |
|
496 |
||
13835 | 497 |
scrollToBottom:aBoolean |
498 |
"If set to true, list will automaticallu scroll to bottom |
|
499 |
ehen the list is updated and clears this flag. |
|
500 |
||
501 |
This is required as the list is updated asynchronously" |
|
502 |
||
503 |
scrollToBottom := aBoolean. |
|
504 |
||
505 |
"Modified (comment): / 30-03-2012 / 17:05:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
506 |
! |
|
507 |
||
10009 | 508 |
selection |
509 |
||
13835 | 510 |
^(self selectionHolder value ? #()) reject:[:e|e isNil]. |
10009 | 511 |
|
512 |
"Created: / 05-12-2009 / 14:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
513 |
! |
|
514 |
||
13835 | 515 |
selection: selection |
516 |
||
517 |
self selectionHolder value: selection |
|
518 |
||
519 |
"Created: / 30-03-2012 / 12:29:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
520 |
! |
|
521 |
||
11035 | 522 |
selectionIndices |
523 |
|sel| |
|
524 |
||
525 |
(sel := self selectionHolder value) isEmptyOrNil ifTrue:[^ #()]. |
|
526 |
^ sel collect:[:each | self list identityIndexOf:each]. |
|
527 |
||
528 |
"Created: / 05-12-2009 / 14:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
529 |
"Created: / 27-12-2011 / 10:56:20 / cg" |
|
530 |
! |
|
531 |
||
10009 | 532 |
showRemoved |
533 |
||
534 |
^self showRemovedHolder value ? true |
|
535 |
||
536 |
"Created: / 05-12-2009 / 14:28:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
537 |
! ! |
|
538 |
||
539 |
!ChangeList methodsFor:'actions'! |
|
540 |
||
541 |
selectionDoubleclicked |
|
542 |
||
11194 | 543 |
self listMenuBrowse |
544 |
"/ | app | |
|
545 |
"/ |
|
546 |
"/ self selection do: |
|
547 |
"/ [:e|e removed: e removed not]. |
|
548 |
"/ ((app := self masterApplication) respondsTo: #redrawChangeListViews) |
|
549 |
"/ ifTrue:[app redrawChangeListViews]. |
|
10009 | 550 |
|
11194 | 551 |
"Modified: / 24-01-2012 / 22:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 552 |
! ! |
553 |
||
554 |
!ChangeList methodsFor:'aspects'! |
|
555 |
||
11194 | 556 |
allowAcceptHolder |
10009 | 557 |
"return/create the valueHolder 'acceptEnabledHolder'" |
558 |
||
11194 | 559 |
allowAcceptHolder isNil ifTrue:[ |
560 |
allowAcceptHolder := ValueHolder with:nil "defaultValue here". |
|
10009 | 561 |
]. |
11194 | 562 |
^ allowAcceptHolder |
563 |
||
564 |
"Created: / 24-01-2012 / 19:53:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
565 |
! |
|
566 |
||
567 |
allowAcceptHolder:something |
|
568 |
"set the 'allowAcceptHolder' value holder (automatically generated)" |
|
569 |
||
570 |
allowAcceptHolder := something. |
|
10009 | 571 |
! |
572 |
||
11194 | 573 |
allowRemoveHolder |
574 |
"return/create the 'allowRemoveHolder' value holder (automatically generated)" |
|
575 |
||
576 |
allowRemoveHolder isNil ifTrue:[ |
|
577 |
allowRemoveHolder := ValueHolder with:true. |
|
578 |
allowRemoveHolder addDependent:self. |
|
579 |
]. |
|
580 |
^ allowRemoveHolder |
|
581 |
||
582 |
"Modified (comment): / 24-01-2012 / 19:44:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
583 |
! |
|
584 |
||
585 |
allowRemoveHolder:something |
|
586 |
"set the 'showRemovedHolder' value holder (automatically generated)" |
|
587 |
||
588 |
|oldValue newValue| |
|
589 |
||
590 |
allowRemoveHolder notNil ifTrue:[ |
|
591 |
oldValue := allowRemoveHolder value. |
|
592 |
allowRemoveHolder removeDependent:self. |
|
593 |
]. |
|
594 |
allowRemoveHolder := something. |
|
595 |
allowRemoveHolder notNil ifTrue:[ |
|
596 |
allowRemoveHolder addDependent:self. |
|
597 |
]. |
|
598 |
newValue := allowRemoveHolder value. |
|
599 |
oldValue ~~ newValue ifTrue:[ |
|
600 |
self |
|
601 |
update:#value |
|
602 |
with:newValue |
|
603 |
from:allowRemoveHolder. |
|
604 |
]. |
|
10009 | 605 |
! |
606 |
||
13835 | 607 |
listColumns |
608 |
||
609 |
|holder| |
|
610 |
(holder := builder bindingAt:#listColumns) isNil ifTrue:[ |
|
611 |
builder aspectAt:#listColumns put:(holder := List new). |
|
612 |
self listColumnShow: #delta. |
|
613 |
self listColumnShow: #change. |
|
614 |
]. |
|
615 |
^ holder |
|
616 |
||
617 |
"Created: / 26-07-2012 / 18:03:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
618 |
! |
|
619 |
||
10009 | 620 |
listHolder |
621 |
listHolder isNil ifTrue:[ |
|
622 |
listHolder := ValueHolder new. |
|
623 |
]. |
|
624 |
^ listHolder |
|
625 |
! |
|
626 |
||
12657 | 627 |
showConflictsOnlyHolder |
628 |
"return/create the 'showConflictsOnlyHolder' value holder (automatically generated)" |
|
629 |
||
630 |
showConflictsOnlyHolder isNil ifTrue:[ |
|
631 |
showConflictsOnlyHolder := ValueHolder with: true. |
|
632 |
showConflictsOnlyHolder addDependent: self. |
|
633 |
]. |
|
634 |
^ showConflictsOnlyHolder |
|
635 |
! |
|
636 |
||
637 |
showConflictsOnlyHolder:something |
|
638 |
"set the 'showConflictsOnlyHolder' value holder (automatically generated)" |
|
639 |
||
640 |
|oldValue newValue| |
|
641 |
||
642 |
showConflictsOnlyHolder notNil ifTrue:[ |
|
643 |
oldValue := showConflictsOnlyHolder value. |
|
644 |
showConflictsOnlyHolder removeDependent:self. |
|
645 |
]. |
|
646 |
showConflictsOnlyHolder := something. |
|
647 |
showConflictsOnlyHolder notNil ifTrue:[ |
|
648 |
showConflictsOnlyHolder addDependent:self. |
|
649 |
]. |
|
650 |
newValue := showConflictsOnlyHolder value. |
|
651 |
oldValue ~~ newValue ifTrue:[ |
|
652 |
self update:#value with:newValue from:showConflictsOnlyHolder. |
|
653 |
]. |
|
654 |
! |
|
655 |
||
10009 | 656 |
showRemovedHolder |
657 |
"return/create the 'showRemovedHolder' value holder (automatically generated)" |
|
658 |
||
659 |
showRemovedHolder isNil ifTrue:[ |
|
660 |
showRemovedHolder := ValueHolder with: true. |
|
661 |
showRemovedHolder addDependent: self. |
|
662 |
]. |
|
663 |
^ showRemovedHolder |
|
664 |
! |
|
665 |
||
10449 | 666 |
showRemovedHolder:something |
10009 | 667 |
"set the 'showRemovedHolder' value holder (automatically generated)" |
668 |
||
10449 | 669 |
|oldValue newValue| |
670 |
||
671 |
showRemovedHolder notNil ifTrue:[ |
|
672 |
oldValue := showRemovedHolder value. |
|
673 |
showRemovedHolder removeDependent:self. |
|
674 |
]. |
|
675 |
showRemovedHolder := something. |
|
676 |
showRemovedHolder notNil ifTrue:[ |
|
677 |
showRemovedHolder addDependent:self. |
|
678 |
]. |
|
679 |
newValue := showRemovedHolder value. |
|
680 |
oldValue ~~ newValue ifTrue:[ |
|
681 |
self update:#value with:newValue from:showRemovedHolder. |
|
682 |
]. |
|
683 |
! |
|
684 |
||
685 |
showSameHolder |
|
686 |
"return/create the 'showSameHolder' value holder (automatically generated)" |
|
687 |
||
688 |
showSameHolder isNil ifTrue:[ |
|
689 |
showSameHolder := ValueHolder with: true. |
|
690 |
showSameHolder addDependent:self. |
|
691 |
]. |
|
692 |
^ showSameHolder |
|
693 |
||
694 |
"Modified: / 04-08-2011 / 18:39:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
695 |
! |
|
696 |
||
697 |
showSameHolder:something |
|
698 |
"set the 'showSameHolder' value holder (automatically generated)" |
|
699 |
||
700 |
|oldValue newValue| |
|
701 |
||
702 |
showSameHolder notNil ifTrue:[ |
|
703 |
oldValue := showSameHolder value. |
|
704 |
showSameHolder removeDependent:self. |
|
705 |
]. |
|
706 |
showSameHolder := something. |
|
707 |
showSameHolder notNil ifTrue:[ |
|
708 |
showSameHolder addDependent:self. |
|
709 |
]. |
|
710 |
newValue := showSameHolder value. |
|
711 |
oldValue ~~ newValue ifTrue:[ |
|
712 |
self update:#value with:newValue from:showSameHolder. |
|
713 |
]. |
|
13835 | 714 |
! |
715 |
||
716 |
showTimestampHolder |
|
717 |
"return/create the 'showTimestampHolder' value holder (automatically generated)" |
|
718 |
||
719 |
showTimestampHolder isNil ifTrue:[ |
|
720 |
showTimestampHolder := ValueHolder new. |
|
721 |
showTimestampHolder addDependent:self. |
|
722 |
]. |
|
723 |
^ showTimestampHolder |
|
724 |
! |
|
725 |
||
726 |
showTimestampHolder:something |
|
727 |
"set the 'showTimestampHolder' value holder (automatically generated)" |
|
728 |
||
729 |
|oldValue newValue| |
|
730 |
||
731 |
showTimestampHolder notNil ifTrue:[ |
|
732 |
oldValue := showTimestampHolder value. |
|
733 |
showTimestampHolder removeDependent:self. |
|
734 |
]. |
|
735 |
showTimestampHolder := something. |
|
736 |
showTimestampHolder notNil ifTrue:[ |
|
737 |
showTimestampHolder addDependent:self. |
|
738 |
]. |
|
739 |
newValue := showTimestampHolder value. |
|
740 |
oldValue ~~ newValue ifTrue:[ |
|
741 |
self update:#value with:newValue from:showTimestampHolder. |
|
742 |
]. |
|
10009 | 743 |
! ! |
744 |
||
745 |
!ChangeList methodsFor:'change & update'! |
|
746 |
||
12657 | 747 |
selectionChanged |
748 |
super selectionChanged |
|
749 |
! |
|
750 |
||
10009 | 751 |
update: aspect with: param from: sender |
752 |
||
13835 | 753 |
sender == allowRemoveHolder ifTrue:[ |
754 |
self listColumn: #removed visible: allowRemoveHolder value. |
|
755 |
^self. |
|
756 |
]. |
|
757 |
||
758 |
sender == showTimestampHolder ifTrue:[ |
|
759 |
self listColumn: #timeStamp visible: showTimestampHolder value. |
|
760 |
^self. |
|
761 |
]. |
|
762 |
||
763 |
||
10449 | 764 |
sender == selectionHolder ifTrue:[ |
765 |
self selectionChanged. |
|
12657 | 766 |
^ self |
10449 | 767 |
]. |
768 |
sender == showSameHolder ifTrue:[ |
|
13835 | 769 |
self updateList. |
770 |
^self. |
|
10449 | 771 |
]. |
772 |
sender == showRemovedHolder ifTrue:[ |
|
773 |
self updateList |
|
774 |
]. |
|
12657 | 775 |
sender == showConflictsOnlyHolder ifTrue:[ |
776 |
self updateList |
|
777 |
]. |
|
10449 | 778 |
|
10009 | 779 |
^super update: aspect with: param from: sender |
780 |
||
781 |
"Created: / 24-10-2009 / 19:47:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11036 | 782 |
"Modified (format): / 27-12-2011 / 14:20:30 / cg" |
13835 | 783 |
"Modified: / 26-07-2012 / 18:44:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
784 |
! ! |
|
785 |
||
786 |
!ChangeList methodsFor:'drag & drop'! |
|
787 |
||
788 |
canDrop: aDropContext |
|
789 |
||
790 |
^(self inGeneratorHolder value isKindOf: Iterator) not |
|
791 |
and:[aDropContext dropObjects allSatisfy:[:obj|(obj theObject isKindOf: Change)]]. |
|
792 |
||
793 |
"Created: / 01-08-2012 / 17:53:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
794 |
! |
|
795 |
||
796 |
dragObjects: aDropSource |
|
797 |
||
798 |
^self selection collect:[:item|(DropObject new: item change) displayObject: (item labelAndIcon)] |
|
799 |
||
800 |
"Created: / 01-08-2012 / 17:50:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
801 |
! |
|
802 |
||
803 |
dropObjects:aDropContext |
|
804 |
"drop manager wants to drop. |
|
805 |
This is ony sent, if #canDrop: returned true. |
|
806 |
Must be redefined in order for drop to work." |
|
807 |
||
808 |
| changes | |
|
809 |
||
810 |
changes := self inGeneratorHolder value. |
|
811 |
aDropContext dropObjects do:[:obj|changes add: obj theObject]. |
|
812 |
self inGeneratorHolder changed: #value |
|
813 |
||
814 |
"Modified: / 01-08-2012 / 18:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 815 |
! ! |
816 |
||
817 |
!ChangeList methodsFor:'event processing'! |
|
818 |
||
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
819 |
handlesKeyPress:key inView:aView |
12108 | 820 |
<resource: #keyboard (#Accept #Ctrls)> |
821 |
||
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
822 |
^(key == #Accept or:[ key == #Ctrls]) |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
823 |
and:[ listView scrolledView == aView ] |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
824 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
825 |
"Created: / 08-02-2012 / 14:43:11 / cg" |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
826 |
! |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
827 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
828 |
keyPress:key x:x y:y view:aView |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
829 |
(key == #Accept or:[ key == #Ctrls]) ifTrue:[ |
13835 | 830 |
self listMenuApply. |
831 |
^ self |
|
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
832 |
]. |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
833 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
834 |
"Created: / 08-02-2012 / 14:42:18 / cg" |
10009 | 835 |
! ! |
836 |
||
837 |
!ChangeList methodsFor:'generators'! |
|
838 |
||
839 |
makeGenerator |
|
840 |
"Superclass Tools::BrowserList says that I am responsible to implement this method" |
|
841 |
||
842 |
^Iterator on: |
|
843 |
[:whatToDo| |
|
12657 | 844 |
|
13937 | 845 |
(selectionHolder value ? #()) do: |
10009 | 846 |
[:changeListItem| | change | |
847 |
change := changeListItem change. |
|
848 |
change isCompositeChange ifTrue: |
|
849 |
[change changes do: whatToDo]]]. |
|
850 |
||
851 |
"Modified: / 24-07-2009 / 23:00:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
852 |
"Modified: / 24-10-2009 / 20:00:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
853 |
! ! |
|
854 |
||
855 |
!ChangeList methodsFor:'hooks'! |
|
856 |
||
10925 | 857 |
postBuildListView: aView |
10009 | 858 |
|
10925 | 859 |
super postBuildListView: aView. |
10957 | 860 |
listView scrolledView delegate: self. |
10009 | 861 |
|
10925 | 862 |
"Created: / 29-11-2011 / 14:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 863 |
! ! |
864 |
||
865 |
!ChangeList methodsFor:'initialization'! |
|
866 |
||
867 |
initialize |
|
13835 | 868 |
|
11794 | 869 |
super initialize. |
10009 | 870 |
menuHolder := [self menuFor: #listMenu]. |
13835 | 871 |
scrollToBottom := false. |
11794 | 872 |
applyAction isNil ifTrue:[ |
13835 | 873 |
applyAction := [:change | change apply ]. |
11794 | 874 |
]. |
10009 | 875 |
|
876 |
"Created: / 29-10-2010 / 12:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
877 |
! ! |
|
878 |
||
879 |
!ChangeList methodsFor:'menu actions'! |
|
880 |
||
881 |
listMenuApply |
|
12666 | 882 |
|sel list idx selectionHolder| |
10009 | 883 |
|
884 |
self acceptEnabled ifFalse:[^self]. |
|
12666 | 885 |
selectionHolder := self selectionHolder. |
10009 | 886 |
|
12666 | 887 |
(sel := selectionHolder value) do:[:e| applyAction value:e change]. |
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
888 |
sel size == 1 ifTrue:[ |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
889 |
list := self listHolder value. |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
890 |
idx := list indexOf:(sel first). |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
891 |
idx < list size ifTrue:[ |
12666 | 892 |
selectionHolder value:(Array with:(list at:idx+1)) |
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
893 |
] ifFalse:[ |
12666 | 894 |
selectionHolder value:#() |
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
895 |
]. |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
896 |
]. |
10009 | 897 |
|
898 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11794 | 899 |
"Modified: / 10-09-2012 / 13:57:46 / cg" |
10009 | 900 |
! |
901 |
||
902 |
listMenuApplyAll |
|
903 |
||
904 |
self acceptEnabled ifFalse:[^self]. |
|
905 |
||
906 |
self selection value do: |
|
11794 | 907 |
[:e|e removed ifFalse:[applyAction value:e change]]. |
10009 | 908 |
|
909 |
"Created: / 05-12-2009 / 14:53:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11794 | 910 |
"Modified: / 10-09-2012 / 13:57:58 / cg" |
10009 | 911 |
! |
912 |
||
913 |
listMenuBrowse |
|
914 |
||
11194 | 915 |
self listMenuBrowseChanges: |
916 |
((self selectionHolder value ? #()) collect:[:e|e change]) |
|
917 |
||
918 |
"Modified: / 24-01-2012 / 22:00:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
919 |
! |
|
920 |
||
921 |
listMenuBrowseChanges: changes |
|
12666 | 922 |
| classes methods methodsOnly browserClass| |
11194 | 923 |
|
10009 | 924 |
classes := Set new. |
925 |
methods := Set new. |
|
926 |
methodsOnly := true. |
|
12666 | 927 |
changes do: [:each | |
928 |
each isClassChange ifTrue:[ |
|
929 |
each changeClass ifNotNil:[ |
|
930 |
classes add: each changeClass. |
|
11194 | 931 |
each isMethodCodeChange |
10009 | 932 |
ifTrue: |
11194 | 933 |
[each changeMethod ifNotNil: |
934 |
[methods add:each changeMethod]] |
|
10009 | 935 |
ifFalse: |
12666 | 936 |
[methodsOnly := false] |
937 |
] |
|
938 |
] |
|
939 |
]. |
|
940 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12666
diff
changeset
|
941 |
browserClass := environment browserClass. |
10009 | 942 |
methodsOnly |
943 |
ifTrue: |
|
944 |
[methods size = 1 |
|
12666 | 945 |
ifTrue:[ browserClass openInMethod: methods anyOne] |
946 |
ifFalse:[ browserClass browseMethods: methods asArray title: 'Selected methods from changeset' sort: true]] |
|
10009 | 947 |
ifFalse: |
948 |
[classes size = 1 |
|
12666 | 949 |
ifTrue:[ browserClass browseClass: classes anyOne] |
950 |
ifFalse:[ browserClass browseClasses: classes]] |
|
10009 | 951 |
|
952 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11194 | 953 |
"Created: / 24-01-2012 / 22:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 954 |
! |
955 |
||
956 |
listMenuDeleteSelection |
|
957 |
||
958 |
self selectionHolder value do: |
|
959 |
[:each|each removed: true]. |
|
960 |
self updateList |
|
961 |
! |
|
962 |
||
963 |
listMenuInspect |
|
964 |
||
965 |
| selection | |
|
966 |
||
967 |
selection := self selectionHolder value collect:[:e|e change]. |
|
968 |
selection size = 1 |
|
969 |
ifTrue:[selection anyOne inspect] |
|
970 |
ifFalse:[selection inspect]. |
|
971 |
||
972 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
973 |
! |
|
974 |
||
975 |
listMenuSelectAdditions |
|
976 |
||
977 |
self listMenuSelectAllSuchThat:[:change|change delta = #+] |
|
978 |
! |
|
979 |
||
980 |
listMenuSelectAll |
|
981 |
||
982 |
self listMenuSelectAllSuchThat:[:change|true] |
|
983 |
! |
|
984 |
||
985 |
listMenuSelectAllSuchThat:conditionBlock |
|
986 |
|newSelection| |
|
987 |
||
988 |
newSelection := self listHolder value |
|
989 |
select:[:entry | conditionBlock value:entry change ]. |
|
990 |
self selectionHolder value:newSelection |
|
991 |
! |
|
992 |
||
993 |
listMenuSelectNone |
|
994 |
||
995 |
self listMenuSelectAllSuchThat:[:change|false] |
|
996 |
! |
|
997 |
||
998 |
listMenuSelectRemovals |
|
999 |
||
1000 |
self listMenuSelectAllSuchThat:[:change|change delta = #-] |
|
1001 |
! |
|
1002 |
||
1003 |
listMenuSelectSame |
|
1004 |
||
1005 |
self listMenuSelectAllSuchThat:[:change|change delta = #=] |
|
1006 |
! |
|
1007 |
||
1008 |
listMenuSelectUsingBlock |
|
1009 |
||
1010 |
|conditionBlockString conditionBlock dialog textHolder template| |
|
1011 |
||
1012 |
template := |
|
1013 |
'[:change| |
|
1014 |
"/ Define condition for selection below: |
|
1015 |
"/ change is an instance of Change |
|
1016 |
"/ change will be selected if and only if block returns true |
|
1017 |
||
1018 |
||
1019 |
true"/always select the change |
|
1020 |
] |
|
1021 |
'. |
|
1022 |
||
1023 |
LastSelectionConditionString isNil ifTrue:[ |
|
1024 |
LastSelectionConditionString := template. |
|
1025 |
]. |
|
1026 |
||
1027 |
||
1028 |
textHolder := ValueHolder new. |
|
1029 |
dialog := Dialog |
|
1030 |
forRequestText:(resources string:'Enter condition for selection') |
|
1031 |
lines:20 |
|
1032 |
columns:70 |
|
1033 |
initialAnswer:LastSelectionConditionString |
|
1034 |
model:textHolder. |
|
1035 |
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]). |
|
1036 |
dialog open. |
|
1037 |
dialog accepted ifFalse:[^ self]. |
|
1038 |
||
1039 |
conditionBlockString := textHolder value. |
|
1040 |
LastSelectionConditionString := conditionBlockString. |
|
1041 |
||
1042 |
conditionBlock := Parser evaluate:conditionBlockString. |
|
1043 |
conditionBlock isBlock ifFalse:[ |
|
1044 |
self error:'Bad selection block (syntax error?)'. |
|
1045 |
^ self |
|
1046 |
]. |
|
1047 |
||
1048 |
self listMenuSelectAllSuchThat: conditionBlock |
|
1049 |
! |
|
1050 |
||
1051 |
listMenuUndeleteSelection |
|
1052 |
||
1053 |
self selectionHolder value do: |
|
1054 |
[:each|each removed: false]. |
|
1055 |
self updateList |
|
1056 |
! ! |
|
1057 |
||
1058 |
!ChangeList methodsFor:'private'! |
|
1059 |
||
1060 |
application |
|
1061 |
||
1062 |
^self |
|
1063 |
||
1064 |
"Created: / 05-12-2009 / 14:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1065 |
! |
|
1066 |
||
1067 |
browserNameList |
|
1068 |
||
1069 |
^'Change list' |
|
1070 |
||
1071 |
"Modified: / 24-07-2009 / 22:06:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1072 |
! |
|
1073 |
||
12666 | 1074 |
iconSelectorForChange:change |
1075 |
| delta sym selectorOrNil | |
|
1076 |
||
1077 |
masterApplication notNil ifTrue:[ |
|
1078 |
selectorOrNil := masterApplication iconSelectorForChange:change. |
|
1079 |
selectorOrNil notNil ifTrue:[ ^ selectorOrNil ]. |
|
1080 |
]. |
|
1081 |
delta := change deltaDetail. |
|
1082 |
sym := delta shortDeltaSymbol. |
|
1083 |
sym = #+ ifTrue:[^#iconPlus]. |
|
1084 |
sym = #- ifTrue:[^#iconMinus]. |
|
1085 |
sym = #= ifTrue:[^#iconEqual]. |
|
1086 |
"/ different. |
|
1087 |
^ nil. |
|
1088 |
! |
|
1089 |
||
13835 | 1090 |
listColumn: columnId visible: visible |
1091 |
visible ifTrue:[ |
|
1092 |
self listColumnShow: columnId |
|
1093 |
] ifFalse:[ |
|
1094 |
self listColumnHide: columnId |
|
1095 |
] |
|
1096 |
||
1097 |
"Created: / 26-07-2012 / 18:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1098 |
! |
|
1099 |
||
1100 |
listColumnHide: columnId |
|
1101 |
self listColumns do:[:spec| |
|
1102 |
spec id = columnId ifTrue:[ |
|
1103 |
self listColumns remove: spec. |
|
1104 |
listView notNil ifTrue:[ |
|
1105 |
listView invalidate. |
|
1106 |
]. |
|
1107 |
^self |
|
1108 |
]. |
|
1109 |
] |
|
1110 |
||
1111 |
"Created: / 26-07-2012 / 18:19:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1112 |
! |
|
1113 |
||
1114 |
listColumnShow: columnId |
|
1115 |
||
1116 |
| columns | |
|
1117 |
columns := self listColumns. |
|
1118 |
||
1119 |
columns do:[:spec| |
|
1120 |
spec id = columnId ifTrue:[ |
|
1121 |
^self. |
|
1122 |
] |
|
1123 |
]. |
|
1124 |
||
1125 |
self class listColumnSpec do:[:specArray| |
|
1126 |
| spec | |
|
1127 |
||
1128 |
spec := specArray decodeAsLiteralArray. |
|
1129 |
spec id = columnId ifTrue:[ |
|
1130 |
columnId == #removed ifTrue:[ |
|
1131 |
columns addFirst: spec. |
|
1132 |
] ifFalse:[ |
|
1133 |
columns add: spec. |
|
1134 |
]. |
|
1135 |
listView notNil ifTrue:[ |
|
1136 |
listView invalidate. |
|
1137 |
]. |
|
1138 |
^self. |
|
1139 |
] |
|
1140 |
||
1141 |
]. |
|
1142 |
||
1143 |
"Created: / 26-07-2012 / 17:56:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1144 |
! |
|
1145 |
||
10009 | 1146 |
listEntryFor:chg |
1147 |
^ListEntry change:chg application: self |
|
1148 |
||
1149 |
"Modified: / 05-12-2009 / 14:39:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1150 |
! |
|
1151 |
||
1152 |
makeDependent |
|
1153 |
||
1154 |
"Modified: / 24-07-2009 / 22:06:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1155 |
! |
|
1156 |
||
1157 |
makeIndependent |
|
1158 |
||
1159 |
"Modified: / 24-07-2009 / 22:06:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1160 |
! |
|
1161 |
||
1162 |
parentOrModel |
|
1163 |
||
1164 |
^self |
|
1165 |
||
1166 |
"Created: / 05-12-2009 / 14:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1167 |
! |
|
1168 |
||
1169 |
updateList |
|
13835 | 1170 |
|inGenerator changeset firstLineShown oldSel newList newSel | |
12657 | 1171 |
self withWaitCursorDo:[ |
1172 |
inGenerator := self inGeneratorHolder value. |
|
13835 | 1173 |
listView notNil ifTrue:[ |
1174 |
((listView isKindOf: ScrollableView) not or:[listView scrolledView notNil]) ifTrue:[ |
|
1175 |
firstLineShown := listView firstLineShown |
|
1176 |
]. |
|
1177 |
]. |
|
1178 |
oldSel := self selection. |
|
10009 | 1179 |
|
13835 | 1180 |
changeset := inGenerator isNil ifTrue:[ #() ] ifFalse:[ inGenerator ]. |
13927 | 1181 |
self showConflictsOnlyHolder value ifTrue:[ |
1182 |
newList := changeset select: [:chg | chg isConflict ]. |
|
1183 |
] ifFalse:[ |
|
1184 |
| showRemoved showSame | |
|
1185 |
||
1186 |
showRemoved := self showRemovedHolder value. |
|
1187 |
showSame := self showSameHolder value. |
|
1188 |
||
1189 |
newList := changeset select: [:chg | |
|
1190 |
(showRemoved or:[ chg removed not ]) |
|
1191 |
and:[showSame or:[chg delta ~~ #=]] |
|
1192 |
]. |
|
1193 |
]. |
|
1194 |
"/ OLD CODE |
|
1195 |
"/ newList := changeset |
|
1196 |
"/ select: |
|
1197 |
"/ [:chg | |
|
1198 |
"/ (self showRemovedHolder value or:[ chg removed not ]) |
|
1199 |
"/ and:[self showSameHolder value or:[chg delta ~~ #=]] |
|
1200 |
"/ ]. |
|
12657 | 1201 |
newList := self filterList: newList. |
1202 |
newList := newList collect:[:chg | self listEntryFor:chg ]. |
|
1203 |
self listHolder value ~= newList ifTrue:[ |
|
1204 |
self listHolder value: newList. |
|
13835 | 1205 |
((newList size ~~ 0) and:[scrollToBottom]) ifTrue:[ |
1206 |
self selection: { newList last } |
|
1207 |
] ifFalse:[ |
|
1208 |
oldSel notEmptyOrNil ifTrue:[ |
|
1209 |
newSel := OrderedCollection new: oldSel size. |
|
1210 |
oldSel := oldSel reject:[:e|e isNil]. |
|
1211 |
oldSel := oldSel collect:[:e|e change]. |
|
1212 |
newList do:[:e|(oldSel includes:e change) ifTrue:[newSel add:e]]. |
|
1213 |
self selection: newSel. |
|
1214 |
]. |
|
1215 |
(listView notNil and:[firstLineShown notNil]) ifTrue:[ |
|
1216 |
listView scrollToLine: (newList size min: firstLineShown). |
|
1217 |
]. |
|
1218 |
]. |
|
1219 |
scrollToBottom := false. |
|
1220 |
||
12657 | 1221 |
] |
11039 | 1222 |
] |
13927 | 1223 |
|
11039 | 1224 |
"Modified: / 28-12-2011 / 15:46:15 / cg" |
13927 | 1225 |
"Modified: / 12-02-2014 / 17:15:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1226 |
! ! |
1227 |
||
1228 |
!ChangeList methodsFor:'queries'! |
|
1229 |
||
1230 |
hasChangeSelected |
|
1231 |
||
1232 |
^self selectionHolder value size > 0 |
|
1233 |
! |
|
1234 |
||
1235 |
hasChangeSelectedAndNotRemoved |
|
13513 | 1236 |
| selection | |
10009 | 1237 |
|
1238 |
selection := self selectionHolder value ? #(). |
|
13513 | 1239 |
^selection size > 0 and: [selection conform:[:e|e removed not]]. |
10009 | 1240 |
! |
1241 |
||
1242 |
hasSingleChangeSelected |
|
1243 |
||
1244 |
^self selectionHolder value size = 1 |
|
1245 |
! |
|
1246 |
||
1247 |
hasSingleChangeSelectedAndCanBrowse |
|
12666 | 1248 |
self selectionHolder value ? #() do: [:each | |
1249 |
|chg| |
|
10009 | 1250 |
|
12666 | 1251 |
chg := each change. |
1252 |
chg isClassChange ifTrue:[ |
|
1253 |
(chg isMethodChange not or:[chg isMethodCodeChange]) ifFalse:[^ false] |
|
1254 |
]. |
|
1255 |
]. |
|
1256 |
^ true |
|
13835 | 1257 |
! |
1258 |
||
1259 |
showColumn: columnSymbol |
|
1260 |
||
1261 |
^self showColumnSpecHolder value includes: columnSymbol. |
|
1262 |
||
1263 |
"Created: / 03-04-2012 / 11:28:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 1264 |
! ! |
1265 |
||
1266 |
!ChangeList::ListEntry class methodsFor:'instance creation'! |
|
1267 |
||
1268 |
change: aChange |
|
1269 |
||
1270 |
^self new change: aChange |
|
1271 |
||
1272 |
"Created: / 24-07-2009 / 22:43:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1273 |
! |
|
1274 |
||
1275 |
change: aChange application: anApplicationModel |
|
1276 |
||
1277 |
^self new change: aChange; application: anApplicationModel |
|
1278 |
||
1279 |
"Created: / 05-12-2009 / 14:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1280 |
! |
|
1281 |
||
1282 |
change: aChange parent: aChangeList |
|
1283 |
||
1284 |
^self new change: aChange; parent: aChangeList |
|
1285 |
||
1286 |
"Created: / 25-07-2009 / 23:33:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1287 |
! ! |
|
1288 |
||
1289 |
!ChangeList::ListEntry methodsFor:'accessing'! |
|
1290 |
||
1291 |
application |
|
1292 |
^ application ifNil:[super application] |
|
1293 |
||
1294 |
"Modified: / 05-12-2009 / 14:16:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1295 |
! |
|
1296 |
||
1297 |
application:anApplicationModel |
|
1298 |
application := anApplicationModel. |
|
1299 |
||
1300 |
"Modified: / 05-12-2009 / 14:15:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1301 |
! |
|
1302 |
||
1303 |
change |
|
1304 |
^ change |
|
1305 |
! |
|
1306 |
||
1307 |
change:aChange |
|
1308 |
self assert: ((aChange isKindOf: Change) or:[aChange isKindOf: RefactoryChange]). |
|
1309 |
change := aChange. |
|
1310 |
||
1311 |
"Modified: / 25-07-2009 / 23:40:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10957 | 1312 |
"Modified (format): / 04-12-2011 / 14:58:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1313 |
! |
1314 |
||
1315 |
changeClass |
|
1316 |
||
1317 |
^change changeClass |
|
1318 |
! |
|
1319 |
||
10334 | 1320 |
changeSource |
11662 | 1321 |
"the changes source" |
10334 | 1322 |
|
13835 | 1323 |
"/ Hack to make sure code is displayed in similar way |
1324 |
"/ (i.e., with no namespace pragma) |
|
1325 |
^ (change isClassDefinitionChange and:[change isPrivateClassDefinitionChange]) ifTrue:[ |
|
1326 |
change definitionStringInNamespace: nil. |
|
1327 |
] ifFalse:[ |
|
1328 |
change changeSource. |
|
1329 |
]. |
|
10334 | 1330 |
|
1331 |
"Created: / 19-07-2011 / 12:03:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11662 | 1332 |
"Modified (comment): / 25-07-2012 / 17:39:39 / cg" |
13835 | 1333 |
"Modified: / 14-11-2013 / 14:55:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10334 | 1334 |
! |
1335 |
||
10009 | 1336 |
children |
1337 |
||
10881
07359595b386
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
10657
diff
changeset
|
1338 |
children isNil ifTrue:[ |
10957 | 1339 |
change isCompositeChange ifTrue:[ |
1340 |
children := OrderedCollection new: change changes size. |
|
12657 | 1341 |
self application showConflictsOnlyHolder value ifTrue:[ |
1342 |
change changes do:[:chg| |
|
1343 |
(chg isConflict) ifTrue:[ |
|
1344 |
children add: ((self application listEntryFor: chg) parent: self) |
|
1345 |
] |
|
1346 |
]. |
|
1347 |
] ifFalse:[ |
|
1348 |
|showRemoved showSame| |
|
1349 |
||
1350 |
showRemoved := self application showRemovedHolder value. |
|
1351 |
showSame := self application showSameHolder value. |
|
1352 |
||
1353 |
change changes do:[:chg| |
|
1354 |
((showRemoved or:[ chg removed not ]) |
|
1355 |
and:[showSame or:[chg delta ~~ #=]]) |
|
1356 |
ifTrue:[ |
|
1357 |
children add: ((self application listEntryFor: chg) parent: self) |
|
1358 |
] |
|
1359 |
]. |
|
1360 |
] |
|
10957 | 1361 |
] ifFalse:[ |
1362 |
children := #() |
|
1363 |
] |
|
10881
07359595b386
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
10657
diff
changeset
|
1364 |
]. |
10009 | 1365 |
^children |
1366 |
||
1367 |
"Created: / 25-07-2009 / 23:32:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10881
07359595b386
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
10657
diff
changeset
|
1368 |
"Modified (format): / 18-11-2011 / 14:56:25 / cg" |
10957 | 1369 |
"Modified: / 04-12-2011 / 15:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1370 |
! |
1371 |
||
1372 |
delta |
|
10657 | 1373 |
"/ obsolete: please use deltaDetail |
10009 | 1374 |
|
1375 |
^change delta |
|
1376 |
||
1377 |
"Created: / 29-10-2010 / 14:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10657 | 1378 |
"Modified (comment): / 31-08-2011 / 10:30:02 / cg" |
1379 |
! |
|
1380 |
||
1381 |
deltaDetail |
|
1382 |
||
1383 |
^change deltaDetail |
|
1384 |
||
1385 |
"Created: / 29-10-2010 / 14:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1386 |
"Created: / 31-08-2011 / 10:29:21 / cg" |
|
10009 | 1387 |
! |
1388 |
||
10334 | 1389 |
imageSource |
11662 | 1390 |
"return the source for the in-image version of the change" |
10334 | 1391 |
|
11662 | 1392 |
^ change imageSource |
10334 | 1393 |
|
1394 |
"Created: / 19-07-2011 / 12:03:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11662 | 1395 |
"Modified (comment): / 25-07-2012 / 17:38:57 / cg" |
10334 | 1396 |
! |
1397 |
||
10009 | 1398 |
label |
11710 | 1399 |
| label | |
10009 | 1400 |
|
1401 |
label := change displayString. |
|
13835 | 1402 |
|
1403 |
"Hack: if the printString contains multiple lines, then |
|
1404 |
if there are just 2 lines, then merge them, otherwise add |
|
1405 |
... to the first line" |
|
1406 |
(label includes: Character cr) ifTrue:[ |
|
1407 |
| firstCR secondCR | |
|
1408 |
firstCR := label indexOf: Character cr. |
|
1409 |
firstCR ~~ label size ifTrue:[ |
|
1410 |
secondCR := label indexOf: Character cr startingAt: firstCR + 1. |
|
1411 |
]. |
|
1412 |
secondCR isNil ifTrue:[ |
|
1413 |
"/2 lines only |
|
1414 |
label := label copy at: firstCR put: Character space. |
|
1415 |
] ifFalse:[ |
|
1416 |
label := (label copyTo: firstCR - 1) , '...' |
|
1417 |
]. |
|
1418 |
]. |
|
10009 | 1419 |
self removed ifTrue:[label := label asText colorizeAllWith: Color gray]. |
1420 |
^label |
|
1421 |
||
1422 |
"Created: / 05-11-2008 / 08:20:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1423 |
"Modified: / 25-07-2009 / 23:43:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1424 |
"Modified: / 05-12-2009 / 14:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11710 | 1425 |
"Modified (format): / 27-07-2012 / 21:26:34 / cg" |
10009 | 1426 |
! |
1427 |
||
13835 | 1428 |
labelAndIcon |
1429 |
^(LabelAndIcon label: self label icon: self iconDelta) |
|
1430 |
||
1431 |
"Created: / 01-08-2012 / 18:14:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1432 |
! |
|
1433 |
||
1434 |
notRemoved |
|
1435 |
^ self removed not |
|
1436 |
||
1437 |
"Created: / 26-07-2012 / 18:31:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1438 |
! |
|
1439 |
||
1440 |
notRemoved: aBoolean |
|
1441 |
^ self removed: aBoolean not |
|
1442 |
||
1443 |
"Created: / 26-07-2012 / 18:31:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1444 |
! |
|
1445 |
||
10009 | 1446 |
removed |
13835 | 1447 |
^ change removed == true |
1448 |
||
1449 |
"Modified: / 26-07-2012 / 18:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 1450 |
! |
1451 |
||
1452 |
removed:aBoolean |
|
1453 |
change removed: aBoolean. |
|
1454 |
! |
|
1455 |
||
1456 |
source |
|
1457 |
||
1458 |
^change source |
|
1459 |
! |
|
1460 |
||
13835 | 1461 |
timeStamp |
1462 |
^change timeOfChangeIfKnown |
|
1463 |
||
1464 |
"Created: / 26-07-2012 / 18:38:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1465 |
! |
|
1466 |
||
10009 | 1467 |
x |
1468 |
^ x |
|
1469 |
! ! |
|
1470 |
||
1471 |
!ChangeList::ListEntry methodsFor:'displaying'! |
|
1472 |
||
13835 | 1473 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
13929 | 1474 |
| list cx icon | |
10009 | 1475 |
|
13835 | 1476 |
list := self application. |
10009 | 1477 |
cx := x := newX. |
13835 | 1478 |
(list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
13929 | 1479 |
(icon := self iconRemoved) notNil ifTrue:[ |
1480 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
|
1481 |
]. |
|
1482 |
cx := cx + 22."experimental value - this looks good" |
|
11710 | 1483 |
]. |
1484 |
(icon := self iconDelta) notNil ifTrue:[ |
|
13929 | 1485 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
11710 | 1486 |
]. |
13835 | 1487 |
cx := cx + 16."12 + 2px gap" |
1488 |
||
1489 |
super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h. |
|
10009 | 1490 |
|
13835 | 1491 |
"/ "Now, display additional columns..." |
1492 |
"/ (list showColumn: #timestamp) ifTrue:[ |
|
1493 |
"/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
|
1494 |
"/ colS := change timeOfChangeIfKnown notNil |
|
1495 |
"/ ifTrue:[change timeOfChangeIfKnown printString] |
|
1496 |
"/ ifFalse:['???']. |
|
1497 |
"/ [ (colW := colS widthOn: aGC) > (aGC width - cx - 5) ] whileTrue:[ |
|
1498 |
"/ colS = '...' ifTrue:[ ^ self ]. |
|
1499 |
"/ colS := '...' , (colS copyFrom: 6). |
|
1500 |
"/ ]. |
|
1501 |
"/ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h. |
|
1502 |
"/ ]. |
|
10009 | 1503 |
|
13835 | 1504 |
"Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12666 | 1505 |
! |
1506 |
||
1507 |
iconDelta |
|
1508 |
| iconSelector | |
|
1509 |
||
1510 |
iconSelector := self iconSelector. |
|
1511 |
iconSelector isNil ifTrue:[^nil]. |
|
1512 |
self removed ifTrue:[iconSelector := iconSelector , #Grayed]. |
|
1513 |
^self application class perform: iconSelector asSymbol. |
|
10009 | 1514 |
|
12666 | 1515 |
"Created: / 05-12-2009 / 14:11:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1516 |
"Modified: / 18-11-2011 / 14:56:33 / cg" |
|
1517 |
! |
|
1518 |
||
1519 |
iconRemoved |
|
1520 |
|appClass| |
|
1521 |
||
1522 |
appClass := self application class. |
|
1523 |
^self removed |
|
1524 |
ifTrue: [appClass uncheckedIcon ] |
|
1525 |
ifFalse:[appClass checkedIcon ] |
|
1526 |
||
1527 |
"Created: / 05-12-2009 / 14:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1528 |
! |
|
10009 | 1529 |
|
1530 |
iconSelector |
|
12666 | 1531 |
^ application iconSelectorForChange:change |
10009 | 1532 |
! ! |
1533 |
||
10957 | 1534 |
!ChangeList::ListEntry methodsFor:'protocol-queries'! |
1535 |
||
1536 |
hasChildren |
|
1537 |
^ change isCompositeChange and:[change changes notEmptyOrNil ]. |
|
1538 |
||
1539 |
"Created: / 04-12-2011 / 14:45:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11710 | 1540 |
"Modified (format): / 27-07-2012 / 21:25:34 / cg" |
10957 | 1541 |
! ! |
1542 |
||
10009 | 1543 |
!ChangeList class methodsFor:'documentation'! |
1544 |
||
10451 | 1545 |
version |
13937 | 1546 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.30 2014-02-14 00:24:33 cg Exp $' |
10451 | 1547 |
! |
1548 |
||
10009 | 1549 |
version_CVS |
13937 | 1550 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.30 2014-02-14 00:24:33 cg Exp $' |
10009 | 1551 |
! |
1552 |
||
1553 |
version_SVN |
|
13937 | 1554 |
^ '$Id: Tools__ChangeList.st,v 1.30 2014-02-14 00:24:33 cg Exp $' |
10009 | 1555 |
! ! |
12108 | 1556 |