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