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