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