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