author | Claus Gittinger <cg@exept.de> |
Mon, 20 Jan 2020 21:02:47 +0100 | |
changeset 19422 | c6ca1c3e0fd7 |
parent 19143 | c26354f7caab |
permissions | -rw-r--r-- |
19082 | 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 |
||
818 |
update: aspect with: param from: sender |
|
819 |
||
13835 | 820 |
sender == allowRemoveHolder ifTrue:[ |
821 |
self listColumn: #removed visible: allowRemoveHolder value. |
|
822 |
^self. |
|
823 |
]. |
|
824 |
||
825 |
sender == showTimestampHolder ifTrue:[ |
|
826 |
self listColumn: #timeStamp visible: showTimestampHolder value. |
|
827 |
^self. |
|
828 |
]. |
|
829 |
||
830 |
||
10449 | 831 |
sender == selectionHolder ifTrue:[ |
832 |
self selectionChanged. |
|
12657 | 833 |
^ self |
10449 | 834 |
]. |
835 |
sender == showSameHolder ifTrue:[ |
|
13835 | 836 |
self updateList. |
837 |
^self. |
|
10449 | 838 |
]. |
839 |
sender == showRemovedHolder ifTrue:[ |
|
840 |
self updateList |
|
841 |
]. |
|
12657 | 842 |
sender == showConflictsOnlyHolder ifTrue:[ |
843 |
self updateList |
|
844 |
]. |
|
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
845 |
sender == showDefinitionsOnlyHolder ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
846 |
self updateList |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
847 |
]. |
10449 | 848 |
|
10009 | 849 |
^super update: aspect with: param from: sender |
850 |
||
851 |
"Created: / 24-10-2009 / 19:47:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11036 | 852 |
"Modified (format): / 27-12-2011 / 14:20:30 / cg" |
13835 | 853 |
"Modified: / 26-07-2012 / 18:44:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
854 |
! ! |
|
855 |
||
856 |
!ChangeList methodsFor:'drag & drop'! |
|
857 |
||
858 |
canDrop: aDropContext |
|
859 |
||
860 |
^(self inGeneratorHolder value isKindOf: Iterator) not |
|
861 |
and:[aDropContext dropObjects allSatisfy:[:obj|(obj theObject isKindOf: Change)]]. |
|
862 |
||
863 |
"Created: / 01-08-2012 / 17:53:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
864 |
! |
|
865 |
||
866 |
dragObjects: aDropSource |
|
867 |
||
868 |
^self selection collect:[:item|(DropObject new: item change) displayObject: (item labelAndIcon)] |
|
869 |
||
870 |
"Created: / 01-08-2012 / 17:50:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
871 |
! |
|
872 |
||
873 |
dropObjects:aDropContext |
|
874 |
"drop manager wants to drop. |
|
875 |
This is ony sent, if #canDrop: returned true. |
|
876 |
Must be redefined in order for drop to work." |
|
877 |
||
878 |
| changes | |
|
879 |
||
880 |
changes := self inGeneratorHolder value. |
|
881 |
aDropContext dropObjects do:[:obj|changes add: obj theObject]. |
|
882 |
self inGeneratorHolder changed: #value |
|
883 |
||
884 |
"Modified: / 01-08-2012 / 18:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 885 |
! ! |
886 |
||
887 |
!ChangeList methodsFor:'event processing'! |
|
888 |
||
11245
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
889 |
handlesKeyPress:key inView:aView |
12108 | 890 |
<resource: #keyboard (#Accept #Ctrls)> |
891 |
||
14197
0ffe853febbc
Fixed deleting/undeleting items by clicking to check box.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14032
diff
changeset
|
892 |
(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
|
893 |
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
|
894 |
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
|
895 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
896 |
"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
|
897 |
"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
|
898 |
! |
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 |
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
|
901 |
(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
|
902 |
self listMenuApply. |
0ffe853febbc
Fixed deleting/undeleting items by clicking to check box.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14032
diff
changeset
|
903 |
^ self |
0ffe853febbc
Fixed deleting/undeleting items by clicking to check box.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14032
diff
changeset
|
904 |
]. |
0ffe853febbc
Fixed deleting/undeleting items by clicking to check box.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14032
diff
changeset
|
905 |
|
0ffe853febbc
Fixed deleting/undeleting items by clicking to check box.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14032
diff
changeset
|
906 |
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
|
907 |
|
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
908 |
"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
|
909 |
"Modified: / 10-04-2014 / 11:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 910 |
! ! |
911 |
||
912 |
!ChangeList methodsFor:'generators'! |
|
913 |
||
914 |
makeGenerator |
|
915 |
"Superclass Tools::BrowserList says that I am responsible to implement this method" |
|
916 |
||
917 |
^Iterator on: |
|
918 |
[:whatToDo| |
|
12657 | 919 |
|
13937 | 920 |
(selectionHolder value ? #()) do: |
10009 | 921 |
[:changeListItem| | change | |
922 |
change := changeListItem change. |
|
923 |
change isCompositeChange ifTrue: |
|
924 |
[change changes do: whatToDo]]]. |
|
925 |
||
926 |
"Modified: / 24-07-2009 / 23:00:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
927 |
"Modified: / 24-10-2009 / 20:00:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
928 |
! ! |
|
929 |
||
930 |
!ChangeList methodsFor:'hooks'! |
|
931 |
||
10925 | 932 |
postBuildListView: aView |
18115 | 933 |
"I want to see the events of the list" |
10009 | 934 |
|
10925 | 935 |
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
|
936 |
aView scrolledView delegate: self. |
10009 | 937 |
|
10925 | 938 |
"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
|
939 |
"Modified: / 10-04-2014 / 11:29:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 940 |
! ! |
941 |
||
942 |
!ChangeList methodsFor:'initialization'! |
|
943 |
||
944 |
initialize |
|
13835 | 945 |
|
11794 | 946 |
super initialize. |
10009 | 947 |
menuHolder := [self menuFor: #listMenu]. |
13835 | 948 |
scrollToBottom := false. |
11794 | 949 |
applyAction isNil ifTrue:[ |
13835 | 950 |
applyAction := [:change | change apply ]. |
11794 | 951 |
]. |
10009 | 952 |
|
953 |
"Created: / 29-10-2010 / 12:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
954 |
! ! |
|
955 |
||
956 |
!ChangeList methodsFor:'menu actions'! |
|
957 |
||
958 |
listMenuApply |
|
12666 | 959 |
|sel list idx selectionHolder| |
10009 | 960 |
|
961 |
self acceptEnabled ifFalse:[^self]. |
|
12666 | 962 |
selectionHolder := self selectionHolder. |
10009 | 963 |
|
12666 | 964 |
(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
|
965 |
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
|
966 |
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
|
967 |
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
|
968 |
idx < list size ifTrue:[ |
12666 | 969 |
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
|
970 |
] ifFalse:[ |
12666 | 971 |
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
|
972 |
]. |
bd76570b2cc4
accept (Ctrl-s) (implement it - not only claim it in the menu!);
Claus Gittinger <cg@exept.de>
parents:
11194
diff
changeset
|
973 |
]. |
10009 | 974 |
|
975 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11794 | 976 |
"Modified: / 10-09-2012 / 13:57:46 / cg" |
10009 | 977 |
! |
978 |
||
979 |
listMenuApplyAll |
|
980 |
||
981 |
self acceptEnabled ifFalse:[^self]. |
|
982 |
||
983 |
self selection value do: |
|
11794 | 984 |
[:e|e removed ifFalse:[applyAction value:e change]]. |
10009 | 985 |
|
986 |
"Created: / 05-12-2009 / 14:53:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11794 | 987 |
"Modified: / 10-09-2012 / 13:57:58 / cg" |
10009 | 988 |
! |
989 |
||
990 |
listMenuBrowse |
|
991 |
||
11194 | 992 |
self listMenuBrowseChanges: |
993 |
((self selectionHolder value ? #()) collect:[:e|e change]) |
|
994 |
||
995 |
"Modified: / 24-01-2012 / 22:00:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
996 |
! |
|
997 |
||
998 |
listMenuBrowseChanges: changes |
|
15432 | 999 |
| collectChanges classes methods methodsOnly browserClass| |
11194 | 1000 |
|
10009 | 1001 |
classes := Set new. |
1002 |
methods := Set new. |
|
1003 |
methodsOnly := true. |
|
15432 | 1004 |
|
1005 |
collectChanges := |
|
1006 |
[:each | |
|
1007 |
(each isClassChange and:[each changeClass notNil]) ifTrue:[ |
|
12666 | 1008 |
classes add: each changeClass. |
15432 | 1009 |
each isMethodCodeChange ifTrue:[ |
1010 |
each changeMethod notNil ifTrue: [methods add:each changeMethod] |
|
1011 |
] ifFalse:[ |
|
1012 |
methodsOnly := false |
|
1013 |
] |
|
1014 |
] ifFalse:[ |
|
1015 |
each isCompositeChange ifTrue:[ |
|
1016 |
each changes do:collectChanges |
|
1017 |
] |
|
12666 | 1018 |
] |
15432 | 1019 |
]. |
1020 |
changes do: collectChanges. |
|
12666 | 1021 |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12666
diff
changeset
|
1022 |
browserClass := environment browserClass. |
10009 | 1023 |
methodsOnly |
1024 |
ifTrue: |
|
19143 | 1025 |
[methods size == 1 |
12666 | 1026 |
ifTrue:[ browserClass openInMethod: methods anyOne] |
1027 |
ifFalse:[ browserClass browseMethods: methods asArray title: 'Selected methods from changeset' sort: true]] |
|
10009 | 1028 |
ifFalse: |
19143 | 1029 |
[classes size == 1 |
12666 | 1030 |
ifTrue:[ browserClass browseClass: classes anyOne] |
1031 |
ifFalse:[ browserClass browseClasses: classes]] |
|
10009 | 1032 |
|
1033 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11194 | 1034 |
"Created: / 24-01-2012 / 22:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1035 |
! |
1036 |
||
1037 |
listMenuDeleteSelection |
|
1038 |
||
1039 |
self selectionHolder value do: |
|
1040 |
[:each|each removed: true]. |
|
1041 |
self updateList |
|
1042 |
! |
|
1043 |
||
1044 |
listMenuInspect |
|
1045 |
||
1046 |
| selection | |
|
1047 |
||
1048 |
selection := self selectionHolder value collect:[:e|e change]. |
|
19143 | 1049 |
selection size == 1 |
10009 | 1050 |
ifTrue:[selection anyOne inspect] |
1051 |
ifFalse:[selection inspect]. |
|
1052 |
||
1053 |
"Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1054 |
! |
|
1055 |
||
1056 |
listMenuSelectAdditions |
|
1057 |
||
1058 |
self listMenuSelectAllSuchThat:[:change|change delta = #+] |
|
1059 |
! |
|
1060 |
||
1061 |
listMenuSelectAll |
|
1062 |
||
1063 |
self listMenuSelectAllSuchThat:[:change|true] |
|
1064 |
! |
|
1065 |
||
1066 |
listMenuSelectAllSuchThat:conditionBlock |
|
1067 |
|newSelection| |
|
1068 |
||
1069 |
newSelection := self listHolder value |
|
1070 |
select:[:entry | conditionBlock value:entry change ]. |
|
1071 |
self selectionHolder value:newSelection |
|
1072 |
! |
|
1073 |
||
1074 |
listMenuSelectNone |
|
1075 |
||
1076 |
self listMenuSelectAllSuchThat:[:change|false] |
|
1077 |
! |
|
1078 |
||
1079 |
listMenuSelectRemovals |
|
1080 |
||
1081 |
self listMenuSelectAllSuchThat:[:change|change delta = #-] |
|
1082 |
! |
|
1083 |
||
1084 |
listMenuSelectSame |
|
1085 |
||
1086 |
self listMenuSelectAllSuchThat:[:change|change delta = #=] |
|
1087 |
! |
|
1088 |
||
1089 |
listMenuSelectUsingBlock |
|
1090 |
||
1091 |
|conditionBlockString conditionBlock dialog textHolder template| |
|
1092 |
||
1093 |
template := |
|
1094 |
'[:change| |
|
1095 |
"/ Define condition for selection below: |
|
1096 |
"/ change is an instance of Change |
|
1097 |
"/ change will be selected if and only if block returns true |
|
1098 |
||
1099 |
||
1100 |
true"/always select the change |
|
1101 |
] |
|
1102 |
'. |
|
1103 |
||
1104 |
LastSelectionConditionString isNil ifTrue:[ |
|
1105 |
LastSelectionConditionString := template. |
|
1106 |
]. |
|
1107 |
||
1108 |
||
1109 |
textHolder := ValueHolder new. |
|
1110 |
dialog := Dialog |
|
1111 |
forRequestText:(resources string:'Enter condition for selection') |
|
1112 |
lines:20 |
|
1113 |
columns:70 |
|
1114 |
initialAnswer:LastSelectionConditionString |
|
1115 |
model:textHolder. |
|
1116 |
dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]). |
|
1117 |
dialog open. |
|
1118 |
dialog accepted ifFalse:[^ self]. |
|
1119 |
||
1120 |
conditionBlockString := textHolder value. |
|
1121 |
LastSelectionConditionString := conditionBlockString. |
|
1122 |
||
1123 |
conditionBlock := Parser evaluate:conditionBlockString. |
|
1124 |
conditionBlock isBlock ifFalse:[ |
|
1125 |
self error:'Bad selection block (syntax error?)'. |
|
1126 |
^ self |
|
1127 |
]. |
|
1128 |
||
1129 |
self listMenuSelectAllSuchThat: conditionBlock |
|
1130 |
! |
|
1131 |
||
1132 |
listMenuUndeleteSelection |
|
1133 |
||
1134 |
self selectionHolder value do: |
|
1135 |
[:each|each removed: false]. |
|
1136 |
self updateList |
|
1137 |
! ! |
|
1138 |
||
1139 |
!ChangeList methodsFor:'private'! |
|
1140 |
||
1141 |
application |
|
1142 |
||
1143 |
^self |
|
1144 |
||
1145 |
"Created: / 05-12-2009 / 14:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1146 |
! |
|
1147 |
||
1148 |
browserNameList |
|
1149 |
||
1150 |
^'Change list' |
|
1151 |
||
1152 |
"Modified: / 24-07-2009 / 22:06:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1153 |
! |
|
1154 |
||
12666 | 1155 |
iconSelectorForChange:change |
1156 |
| delta sym selectorOrNil | |
|
1157 |
||
1158 |
masterApplication notNil ifTrue:[ |
|
1159 |
selectorOrNil := masterApplication iconSelectorForChange:change. |
|
1160 |
selectorOrNil notNil ifTrue:[ ^ selectorOrNil ]. |
|
1161 |
]. |
|
1162 |
delta := change deltaDetail. |
|
1163 |
sym := delta shortDeltaSymbol. |
|
1164 |
sym = #+ ifTrue:[^#iconPlus]. |
|
1165 |
sym = #- ifTrue:[^#iconMinus]. |
|
1166 |
sym = #= ifTrue:[^#iconEqual]. |
|
1167 |
"/ different. |
|
1168 |
^ nil. |
|
1169 |
! |
|
1170 |
||
13835 | 1171 |
listColumn: columnId visible: visible |
1172 |
visible ifTrue:[ |
|
1173 |
self listColumnShow: columnId |
|
1174 |
] ifFalse:[ |
|
1175 |
self listColumnHide: columnId |
|
1176 |
] |
|
1177 |
||
1178 |
"Created: / 26-07-2012 / 18:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1179 |
! |
|
1180 |
||
1181 |
listColumnHide: columnId |
|
1182 |
self listColumns do:[:spec| |
|
1183 |
spec id = columnId ifTrue:[ |
|
1184 |
self listColumns remove: spec. |
|
1185 |
listView notNil ifTrue:[ |
|
1186 |
listView invalidate. |
|
1187 |
]. |
|
1188 |
^self |
|
1189 |
]. |
|
1190 |
] |
|
1191 |
||
1192 |
"Created: / 26-07-2012 / 18:19:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1193 |
! |
|
1194 |
||
1195 |
listColumnShow: columnId |
|
1196 |
||
1197 |
| columns | |
|
1198 |
columns := self listColumns. |
|
1199 |
||
1200 |
columns do:[:spec| |
|
1201 |
spec id = columnId ifTrue:[ |
|
1202 |
^self. |
|
1203 |
] |
|
1204 |
]. |
|
1205 |
||
1206 |
self class listColumnSpec do:[:specArray| |
|
1207 |
| spec | |
|
1208 |
||
1209 |
spec := specArray decodeAsLiteralArray. |
|
1210 |
spec id = columnId ifTrue:[ |
|
1211 |
columnId == #removed ifTrue:[ |
|
1212 |
columns addFirst: spec. |
|
1213 |
] ifFalse:[ |
|
1214 |
columns add: spec. |
|
1215 |
]. |
|
1216 |
listView notNil ifTrue:[ |
|
1217 |
listView invalidate. |
|
1218 |
]. |
|
1219 |
^self. |
|
1220 |
] |
|
1221 |
||
1222 |
]. |
|
1223 |
||
1224 |
"Created: / 26-07-2012 / 17:56:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1225 |
! |
|
1226 |
||
10009 | 1227 |
listEntryFor:chg |
1228 |
^ListEntry change:chg application: self |
|
1229 |
||
1230 |
"Modified: / 05-12-2009 / 14:39:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1231 |
! |
|
1232 |
||
1233 |
makeDependent |
|
1234 |
||
1235 |
"Modified: / 24-07-2009 / 22:06:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1236 |
! |
|
1237 |
||
1238 |
makeIndependent |
|
1239 |
||
1240 |
"Modified: / 24-07-2009 / 22:06:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1241 |
! |
|
1242 |
||
1243 |
parentOrModel |
|
1244 |
||
1245 |
^self |
|
1246 |
||
1247 |
"Created: / 05-12-2009 / 14:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1248 |
! |
|
1249 |
||
1250 |
updateList |
|
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1251 |
|inGenerator changeset firstLineShown oldSel newList newSel| |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1252 |
|
12657 | 1253 |
self withWaitCursorDo:[ |
1254 |
inGenerator := self inGeneratorHolder value. |
|
13835 | 1255 |
listView notNil ifTrue:[ |
1256 |
((listView isKindOf: ScrollableView) not or:[listView scrolledView notNil]) ifTrue:[ |
|
1257 |
firstLineShown := listView firstLineShown |
|
1258 |
]. |
|
1259 |
]. |
|
1260 |
oldSel := self selection. |
|
10009 | 1261 |
|
13835 | 1262 |
changeset := inGenerator isNil ifTrue:[ #() ] ifFalse:[ inGenerator ]. |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1263 |
self showDefinitionsOnlyHolder value ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1264 |
newList := changeset select: [:chg | chg isOrContainsClassDefinitionChange ]. |
13927 | 1265 |
] ifFalse:[ |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1266 |
self showConflictsOnlyHolder value ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1267 |
newList := changeset select: [:chg | chg isConflict ]. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1268 |
] ifFalse:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1269 |
| showRemoved showSame | |
13927 | 1270 |
|
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1271 |
showRemoved := self showRemovedHolder value. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1272 |
showSame := self showSameHolder value. |
13927 | 1273 |
|
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1274 |
newList := changeset select: [:chg | |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1275 |
(showRemoved or:[ chg removed not ]) |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1276 |
and:[showSame or:[chg delta ~~ #=]] |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1277 |
]. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1278 |
]. |
13927 | 1279 |
]. |
1280 |
"/ OLD CODE |
|
1281 |
"/ newList := changeset |
|
1282 |
"/ select: |
|
1283 |
"/ [:chg | |
|
1284 |
"/ (self showRemovedHolder value or:[ chg removed not ]) |
|
1285 |
"/ and:[self showSameHolder value or:[chg delta ~~ #=]] |
|
1286 |
"/ ]. |
|
12657 | 1287 |
newList := self filterList: newList. |
1288 |
newList := newList collect:[:chg | self listEntryFor:chg ]. |
|
1289 |
self listHolder value ~= newList ifTrue:[ |
|
1290 |
self listHolder value: newList. |
|
13835 | 1291 |
((newList size ~~ 0) and:[scrollToBottom]) ifTrue:[ |
1292 |
self selection: { newList last } |
|
1293 |
] ifFalse:[ |
|
1294 |
oldSel notEmptyOrNil ifTrue:[ |
|
1295 |
newSel := OrderedCollection new: oldSel size. |
|
1296 |
oldSel := oldSel reject:[:e|e isNil]. |
|
1297 |
oldSel := oldSel collect:[:e|e change]. |
|
1298 |
newList do:[:e|(oldSel includes:e change) ifTrue:[newSel add:e]]. |
|
1299 |
self selection: newSel. |
|
1300 |
]. |
|
1301 |
(listView notNil and:[firstLineShown notNil]) ifTrue:[ |
|
1302 |
listView scrollToLine: (newList size min: firstLineShown). |
|
1303 |
]. |
|
1304 |
]. |
|
1305 |
scrollToBottom := false. |
|
1306 |
||
12657 | 1307 |
] |
11039 | 1308 |
] |
13927 | 1309 |
|
11039 | 1310 |
"Modified: / 28-12-2011 / 15:46:15 / cg" |
13927 | 1311 |
"Modified: / 12-02-2014 / 17:15:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1312 |
! ! |
1313 |
||
1314 |
!ChangeList methodsFor:'queries'! |
|
1315 |
||
1316 |
hasChangeSelected |
|
1317 |
||
1318 |
^self selectionHolder value size > 0 |
|
1319 |
! |
|
1320 |
||
1321 |
hasChangeSelectedAndNotRemoved |
|
13513 | 1322 |
| selection | |
10009 | 1323 |
|
1324 |
selection := self selectionHolder value ? #(). |
|
13513 | 1325 |
^selection size > 0 and: [selection conform:[:e|e removed not]]. |
10009 | 1326 |
! |
1327 |
||
1328 |
hasSingleChangeSelected |
|
1329 |
||
19143 | 1330 |
^self selectionHolder value size == 1 |
10009 | 1331 |
! |
1332 |
||
1333 |
hasSingleChangeSelectedAndCanBrowse |
|
12666 | 1334 |
self selectionHolder value ? #() do: [:each | |
1335 |
|chg| |
|
10009 | 1336 |
|
12666 | 1337 |
chg := each change. |
1338 |
chg isClassChange ifTrue:[ |
|
1339 |
(chg isMethodChange not or:[chg isMethodCodeChange]) ifFalse:[^ false] |
|
1340 |
]. |
|
1341 |
]. |
|
1342 |
^ true |
|
13835 | 1343 |
! |
1344 |
||
1345 |
showColumn: columnSymbol |
|
1346 |
||
1347 |
^self showColumnSpecHolder value includes: columnSymbol. |
|
1348 |
||
1349 |
"Created: / 03-04-2012 / 11:28:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 1350 |
! ! |
1351 |
||
1352 |
!ChangeList::ListEntry class methodsFor:'instance creation'! |
|
1353 |
||
1354 |
change: aChange |
|
1355 |
||
1356 |
^self new change: aChange |
|
1357 |
||
1358 |
"Created: / 24-07-2009 / 22:43:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1359 |
! |
|
1360 |
||
1361 |
change: aChange application: anApplicationModel |
|
1362 |
||
1363 |
^self new change: aChange; application: anApplicationModel |
|
1364 |
||
1365 |
"Created: / 05-12-2009 / 14:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1366 |
! |
|
1367 |
||
1368 |
change: aChange parent: aChangeList |
|
1369 |
||
1370 |
^self new change: aChange; parent: aChangeList |
|
1371 |
||
1372 |
"Created: / 25-07-2009 / 23:33:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1373 |
! ! |
|
1374 |
||
1375 |
!ChangeList::ListEntry methodsFor:'accessing'! |
|
1376 |
||
1377 |
application |
|
1378 |
^ application ifNil:[super application] |
|
1379 |
||
1380 |
"Modified: / 05-12-2009 / 14:16:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1381 |
! |
|
1382 |
||
1383 |
application:anApplicationModel |
|
1384 |
application := anApplicationModel. |
|
1385 |
||
1386 |
"Modified: / 05-12-2009 / 14:15:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1387 |
! |
|
1388 |
||
1389 |
change |
|
1390 |
^ change |
|
1391 |
! |
|
1392 |
||
1393 |
change:aChange |
|
1394 |
self assert: ((aChange isKindOf: Change) or:[aChange isKindOf: RefactoryChange]). |
|
1395 |
change := aChange. |
|
1396 |
||
1397 |
"Modified: / 25-07-2009 / 23:40:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
10957 | 1398 |
"Modified (format): / 04-12-2011 / 14:58:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1399 |
! |
1400 |
||
1401 |
changeClass |
|
1402 |
||
1403 |
^change changeClass |
|
1404 |
! |
|
1405 |
||
10334 | 1406 |
changeSource |
11662 | 1407 |
"the changes source" |
10334 | 1408 |
|
13835 | 1409 |
"/ Hack to make sure code is displayed in similar way |
1410 |
"/ (i.e., with no namespace pragma) |
|
1411 |
^ (change isClassDefinitionChange and:[change isPrivateClassDefinitionChange]) ifTrue:[ |
|
1412 |
change definitionStringInNamespace: nil. |
|
1413 |
] ifFalse:[ |
|
1414 |
change changeSource. |
|
1415 |
]. |
|
10334 | 1416 |
|
1417 |
"Created: / 19-07-2011 / 12:03:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11662 | 1418 |
"Modified (comment): / 25-07-2012 / 17:39:39 / cg" |
13835 | 1419 |
"Modified: / 14-11-2013 / 14:55:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10334 | 1420 |
! |
1421 |
||
10009 | 1422 |
children |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1423 |
|app addIf showRemoved showSame| |
10009 | 1424 |
|
10881
07359595b386
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
10657
diff
changeset
|
1425 |
children isNil ifTrue:[ |
10957 | 1426 |
change isCompositeChange ifTrue:[ |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1427 |
app := self application. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1428 |
|
10957 | 1429 |
children := OrderedCollection new: change changes size. |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1430 |
app showDefinitionsOnlyHolder value ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1431 |
addIf := [:chg | chg isOrContainsClassDefinitionChange]. |
12657 | 1432 |
] ifFalse:[ |
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1433 |
app showConflictsOnlyHolder value ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1434 |
addIf := [:chg | chg isConflict]. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1435 |
] ifFalse:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1436 |
showRemoved := app showRemovedHolder value. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1437 |
showSame := app showSameHolder value. |
12657 | 1438 |
|
13970
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1439 |
addIf := [:chg | |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1440 |
((showRemoved or:[ chg removed not ]) |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1441 |
and:[showSame or:[chg delta ~~ #=]]) |
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 |
] |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1444 |
]. |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1445 |
change changes do:[:chg| |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1446 |
(addIf value:chg) ifTrue:[ |
d280c182f218
added a "show definitions only" filter (menu)
Claus Gittinger <cg@exept.de>
parents:
13937
diff
changeset
|
1447 |
children add: ((app listEntryFor: chg) parent: self) |
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 |
]. |
10957 | 1450 |
] ifFalse:[ |
1451 |
children := #() |
|
1452 |
] |
|
10881
07359595b386
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
10657
diff
changeset
|
1453 |
]. |
10009 | 1454 |
^children |
1455 |
||
1456 |
"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
|
1457 |
"Modified (format): / 18-11-2011 / 14:56:25 / cg" |
10957 | 1458 |
"Modified: / 04-12-2011 / 15:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10009 | 1459 |
! |
1460 |
||
1461 |
delta |
|
10657 | 1462 |
"/ obsolete: please use deltaDetail |
10009 | 1463 |
|
1464 |
^change delta |
|
1465 |
||
1466 |
"Created: / 29-10-2010 / 14:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10657 | 1467 |
"Modified (comment): / 31-08-2011 / 10:30:02 / cg" |
1468 |
! |
|
1469 |
||
1470 |
deltaDetail |
|
1471 |
||
1472 |
^change deltaDetail |
|
1473 |
||
1474 |
"Created: / 29-10-2010 / 14:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1475 |
"Created: / 31-08-2011 / 10:29:21 / cg" |
|
10009 | 1476 |
! |
1477 |
||
10334 | 1478 |
imageSource |
11662 | 1479 |
"return the source for the in-image version of the change" |
10334 | 1480 |
|
11662 | 1481 |
^ change imageSource |
10334 | 1482 |
|
1483 |
"Created: / 19-07-2011 / 12:03:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11662 | 1484 |
"Modified (comment): / 25-07-2012 / 17:38:57 / cg" |
10334 | 1485 |
! |
1486 |
||
10009 | 1487 |
label |
11710 | 1488 |
| label | |
10009 | 1489 |
|
1490 |
label := change displayString. |
|
13835 | 1491 |
|
1492 |
"Hack: if the printString contains multiple lines, then |
|
1493 |
if there are just 2 lines, then merge them, otherwise add |
|
1494 |
... to the first line" |
|
1495 |
(label includes: Character cr) ifTrue:[ |
|
1496 |
| firstCR secondCR | |
|
1497 |
firstCR := label indexOf: Character cr. |
|
1498 |
firstCR ~~ label size ifTrue:[ |
|
1499 |
secondCR := label indexOf: Character cr startingAt: firstCR + 1. |
|
1500 |
]. |
|
1501 |
secondCR isNil ifTrue:[ |
|
1502 |
"/2 lines only |
|
1503 |
label := label copy at: firstCR put: Character space. |
|
1504 |
] ifFalse:[ |
|
1505 |
label := (label copyTo: firstCR - 1) , '...' |
|
1506 |
]. |
|
1507 |
]. |
|
19082 | 1508 |
self removed ifTrue:[label := label allGray]. |
10009 | 1509 |
^label |
1510 |
||
1511 |
"Created: / 05-11-2008 / 08:20:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1512 |
"Modified: / 25-07-2009 / 23:43:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1513 |
"Modified: / 05-12-2009 / 14:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11710 | 1514 |
"Modified (format): / 27-07-2012 / 21:26:34 / cg" |
10009 | 1515 |
! |
1516 |
||
13835 | 1517 |
labelAndIcon |
1518 |
^(LabelAndIcon label: self label icon: self iconDelta) |
|
1519 |
||
1520 |
"Created: / 01-08-2012 / 18:14:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1521 |
! |
|
1522 |
||
1523 |
notRemoved |
|
1524 |
^ self removed not |
|
1525 |
||
1526 |
"Created: / 26-07-2012 / 18:31:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1527 |
! |
|
1528 |
||
1529 |
notRemoved: aBoolean |
|
1530 |
^ self removed: aBoolean not |
|
1531 |
||
1532 |
"Created: / 26-07-2012 / 18:31:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1533 |
! |
|
1534 |
||
10009 | 1535 |
removed |
13835 | 1536 |
^ change removed == true |
1537 |
||
1538 |
"Modified: / 26-07-2012 / 18:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10009 | 1539 |
! |
1540 |
||
1541 |
removed:aBoolean |
|
1542 |
change removed: aBoolean. |
|
1543 |
! |
|
1544 |
||
1545 |
source |
|
1546 |
||
1547 |
^change source |
|
1548 |
! |
|
1549 |
||
13835 | 1550 |
timeStamp |
1551 |
^change timeOfChangeIfKnown |
|
1552 |
||
1553 |
"Created: / 26-07-2012 / 18:38:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1554 |
! |
|
1555 |
||
10009 | 1556 |
x |
1557 |
^ x |
|
1558 |
! ! |
|
1559 |
||
1560 |
!ChangeList::ListEntry methodsFor:'displaying'! |
|
1561 |
||
13835 | 1562 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
16874 | 1563 |
self displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:false |
12666 | 1564 |
! |
1565 |
||
15150 | 1566 |
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected |
1567 |
| list cx icon | |
|
1568 |
||
1569 |
list := self application. |
|
1570 |
cx := x := newX. |
|
1571 |
(list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
|
1572 |
(icon := self iconRemoved) notNil ifTrue:[ |
|
1573 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
|
1574 |
]. |
|
1575 |
cx := cx + 22."experimental value - this looks good" |
|
1576 |
]. |
|
1577 |
(icon := self iconDelta) notNil ifTrue:[ |
|
1578 |
icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
|
1579 |
]. |
|
1580 |
cx := cx + 16."12 + 2px gap" |
|
1581 |
||
1582 |
super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h isHighlightedAsSelected:isHighlightedAsSelected. |
|
1583 |
||
1584 |
"/ "Now, display additional columns..." |
|
1585 |
"/ (list showColumn: #timestamp) ifTrue:[ |
|
1586 |
"/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
|
1587 |
"/ colS := change timeOfChangeIfKnown notNil |
|
1588 |
"/ ifTrue:[change timeOfChangeIfKnown printString] |
|
1589 |
"/ ifFalse:['???']. |
|
1590 |
"/ [ (colW := colS widthOn: aGC) > (aGC width - cx - 5) ] whileTrue:[ |
|
1591 |
"/ colS = '...' ifTrue:[ ^ self ]. |
|
1592 |
"/ colS := '...' , (colS copyFrom: 6). |
|
1593 |
"/ ]. |
|
1594 |
"/ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h. |
|
1595 |
"/ ]. |
|
1596 |
||
1597 |
"Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1598 |
! |
|
1599 |
||
12666 | 1600 |
iconDelta |
1601 |
| iconSelector | |
|
1602 |
||
1603 |
iconSelector := self iconSelector. |
|
1604 |
iconSelector isNil ifTrue:[^nil]. |
|
1605 |
self removed ifTrue:[iconSelector := iconSelector , #Grayed]. |
|
1606 |
^self application class perform: iconSelector asSymbol. |
|
10009 | 1607 |
|
12666 | 1608 |
"Created: / 05-12-2009 / 14:11:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1609 |
"Modified: / 18-11-2011 / 14:56:33 / cg" |
|
1610 |
! |
|
1611 |
||
1612 |
iconRemoved |
|
1613 |
|appClass| |
|
1614 |
||
1615 |
appClass := self application class. |
|
1616 |
^self removed |
|
1617 |
ifTrue: [appClass uncheckedIcon ] |
|
1618 |
ifFalse:[appClass checkedIcon ] |
|
1619 |
||
1620 |
"Created: / 05-12-2009 / 14:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1621 |
! |
|
10009 | 1622 |
|
1623 |
iconSelector |
|
12666 | 1624 |
^ application iconSelectorForChange:change |
10009 | 1625 |
! ! |
1626 |
||
10957 | 1627 |
!ChangeList::ListEntry methodsFor:'protocol-queries'! |
1628 |
||
1629 |
hasChildren |
|
1630 |
^ change isCompositeChange and:[change changes notEmptyOrNil ]. |
|
1631 |
||
1632 |
"Created: / 04-12-2011 / 14:45:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11710 | 1633 |
"Modified (format): / 27-07-2012 / 21:25:34 / cg" |
10957 | 1634 |
! ! |
1635 |
||
10009 | 1636 |
!ChangeList class methodsFor:'documentation'! |
1637 |
||
10451 | 1638 |
version |
16492 | 1639 |
^ '$Header$' |
10451 | 1640 |
! |
1641 |
||
10009 | 1642 |
version_CVS |
16492 | 1643 |
^ '$Header$' |
10009 | 1644 |
! |
1645 |
||
1646 |
version_SVN |
|
16492 | 1647 |
^ '$Id$' |
10009 | 1648 |
! ! |
12108 | 1649 |