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