author | Claus Gittinger <cg@exept.de> |
Wed, 26 Jun 2019 23:34:48 +0200 | |
changeset 18850 | 3158de790f36 |
parent 18483 | 319db28519b6 |
child 19065 | 774936d6d653 |
permissions | -rw-r--r-- |
17847 | 1 |
"{ Encoding: utf8 }" |
2 |
||
5591 | 3 |
" |
4 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
5592 | 14 |
"{ Package: 'stx:libtool' }" |
5591 | 15 |
|
16 |
"{ NameSpace: Tools }" |
|
17 |
||
18 |
BrowserList subclass:#VariableList |
|
16537 | 19 |
instanceVariableNames:'classHolder groupVariablesByInheritance selectedVariableEntries |
20 |
showClassVars showWarningAboutMissingEntryInXmlSpec |
|
21 |
sortVariablesByName variableList' |
|
5591 | 22 |
classVariableNames:'' |
23 |
poolDictionaries:'' |
|
24 |
category:'Interface-Browsers-New' |
|
25 |
! |
|
26 |
||
10255 | 27 |
Object subclass:#VariableEntry |
15455 | 28 |
instanceVariableNames:'label application class name type icon sortingByNameHolder |
16537 | 29 |
classShown groupByInheritanceHolder' |
10255 | 30 |
classVariableNames:'' |
31 |
poolDictionaries:'' |
|
32 |
privateIn:VariableList |
|
33 |
! |
|
34 |
||
5591 | 35 |
!VariableList class methodsFor:'documentation'! |
36 |
||
37 |
copyright |
|
38 |
" |
|
39 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
40 |
All Rights Reserved |
|
41 |
||
42 |
This software is furnished under a license and may be used |
|
43 |
only in accordance with the terms of that license and with the |
|
44 |
inclusion of the above copyright notice. This software may not |
|
45 |
be provided or otherwise made available to, or used by, any |
|
46 |
other person. No title to or ownership of the software is |
|
47 |
hereby transferred. |
|
48 |
" |
|
11878 | 49 |
! |
50 |
||
51 |
documentation |
|
52 |
" |
|
53 |
I implement the variable list (below class list) in the new system browser |
|
54 |
" |
|
5591 | 55 |
! ! |
56 |
||
57 |
!VariableList class methodsFor:'interface specs'! |
|
58 |
||
59 |
windowSpec |
|
60 |
"This resource specification was automatically generated |
|
61 |
by the UIPainter of ST/X." |
|
62 |
||
63 |
"Do not manually edit this!! If it is corrupted, |
|
64 |
the UIPainter may not be able to read the specification." |
|
65 |
||
66 |
" |
|
10287 | 67 |
UIPainter new openOnClass:Tools::VariableList andSelector:#windowSpec |
68 |
Tools::VariableList new openInterface:#windowSpec |
|
69 |
Tools::VariableList open |
|
5591 | 70 |
" |
71 |
||
72 |
<resource: #canvas> |
|
73 |
||
74 |
^ |
|
10287 | 75 |
#(FullSpec |
76 |
name: windowSpec |
|
77 |
window: |
|
78 |
(WindowSpec |
|
79 |
label: 'VariableList' |
|
80 |
name: 'VariableList' |
|
81 |
min: (Point 0 0) |
|
82 |
bounds: (Rectangle 0 0 300 300) |
|
9461 | 83 |
) |
10287 | 84 |
component: |
85 |
(SpecCollection |
|
86 |
collection: ( |
|
87 |
(SequenceViewSpec |
|
88 |
name: 'List' |
|
89 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
90 |
tabable: true |
|
91 |
model: selectedVariableEntries |
|
92 |
menu: menuHolder |
|
93 |
hasHorizontalScrollBar: true |
|
94 |
hasVerticalScrollBar: true |
|
95 |
miniScrollerHorizontal: true |
|
96 |
isMultiSelect: true |
|
97 |
valueChangeSelector: selectionChangedByClick |
|
98 |
useIndex: false |
|
99 |
sequenceList: variableList |
|
100 |
doubleClickChannel: doubleClickChannel |
|
9461 | 101 |
) |
102 |
) |
|
5591 | 103 |
|
9461 | 104 |
) |
5591 | 105 |
) |
106 |
! ! |
|
107 |
||
108 |
!VariableList class methodsFor:'plugIn spec'! |
|
109 |
||
110 |
aspectSelectors |
|
111 |
"This resource specification was automatically generated |
|
112 |
by the UIPainter of ST/X." |
|
113 |
||
114 |
"Do not manually edit this. If it is corrupted, |
|
115 |
the UIPainter may not be able to read the specification." |
|
116 |
||
117 |
"Return a description of exported aspects; |
|
118 |
these can be connected to aspects of an embedding application |
|
119 |
(if this app is embedded in a subCanvas)." |
|
120 |
||
121 |
^ #( |
|
14021
ff0b42e2c251
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13827
diff
changeset
|
122 |
environmentHolder |
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
123 |
#(#doubleClickChannel #action ) |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
124 |
#classHolder |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
125 |
#forceGeneratorTrigger |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
126 |
#immediateUpdate |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
127 |
#inGeneratorHolder |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
128 |
#menuHolder |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
129 |
#outGeneratorHolder |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
130 |
#packageFilter |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
131 |
#selectedVariables |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
132 |
#selectionChangeCondition |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
133 |
#updateTrigger |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
134 |
#showClassVarsInVariableList |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
135 |
#slaveMode |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
136 |
#sortVariablesByName |
16537 | 137 |
#groupVariablesByInheritance |
5591 | 138 |
). |
14021
ff0b42e2c251
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13827
diff
changeset
|
139 |
|
ff0b42e2c251
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13827
diff
changeset
|
140 |
"Modified: / 24-02-2014 / 10:37:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 141 |
! ! |
142 |
||
143 |
!VariableList methodsFor:'aspects'! |
|
144 |
||
145 |
classHolder |
|
146 |
classHolder isNil ifTrue:[ |
|
147 |
classHolder := #() asValue. |
|
148 |
classHolder addDependent:self |
|
149 |
]. |
|
150 |
^ classHolder |
|
151 |
! |
|
152 |
||
153 |
classHolder:aValueHolder |
|
154 |
classHolder notNil ifTrue:[ |
|
10308 | 155 |
classHolder removeDependent:self |
5591 | 156 |
]. |
157 |
classHolder := aValueHolder. |
|
158 |
classHolder notNil ifTrue:[ |
|
10308 | 159 |
classHolder isBehavior ifTrue:[self error:'should not happen']. |
160 |
classHolder addDependent:self |
|
5591 | 161 |
]. |
10308 | 162 |
|
163 |
"Modified: / 11-07-2011 / 17:04:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5591 | 164 |
! |
165 |
||
166 |
defaultSlaveModeValue |
|
167 |
^ false. |
|
168 |
! |
|
169 |
||
16537 | 170 |
groupVariablesByInheritance |
171 |
"/ groupVariablesByInheritance and sortVariablesByName form a 3-state value |
|
172 |
"/ groupVariablesByInheritance sortVariablesByName |
|
173 |
"/ T T - sort within each defining class |
|
174 |
"/ T F - by inst-order grouped by defining class |
|
175 |
"/ F T - show all of them in one big sorted list |
|
176 |
"/ F F - useless - show all of them by inst-order |
|
177 |
groupVariablesByInheritance isNil ifTrue:[ |
|
178 |
groupVariablesByInheritance := true asValue. |
|
179 |
groupVariablesByInheritance addDependent:self |
|
180 |
]. |
|
181 |
^ groupVariablesByInheritance |
|
182 |
! |
|
183 |
||
184 |
groupVariablesByInheritance:aValueHolder |
|
185 |
"/ self assert:(aValueHolder value isBoolean). |
|
186 |
||
187 |
groupVariablesByInheritance notNil ifTrue:[ |
|
188 |
groupVariablesByInheritance removeDependent:self |
|
189 |
]. |
|
190 |
groupVariablesByInheritance := aValueHolder. |
|
191 |
groupVariablesByInheritance notNil ifTrue:[ |
|
192 |
groupVariablesByInheritance addDependent:self |
|
193 |
]. |
|
194 |
! |
|
195 |
||
10255 | 196 |
selectedVariableEntries |
197 |
<resource: #uiAspect> |
|
198 |
||
199 |
"automatically generated by UIPainter ..." |
|
200 |
||
201 |
selectedVariableEntries isNil ifTrue:[ |
|
202 |
selectedVariableEntries := #() asValue. |
|
16192 | 203 |
selectedVariableEntries addDependent:self. |
10255 | 204 |
]. |
205 |
^ selectedVariableEntries. |
|
206 |
||
207 |
"Modified: / 12-04-2011 / 15:49:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
208 |
! |
|
209 |
||
5591 | 210 |
selectedVariables |
211 |
^ self selectionHolder |
|
212 |
||
213 |
! |
|
214 |
||
215 |
selectedVariables:aValueHolder |
|
216 |
^ self selectionHolder:aValueHolder |
|
217 |
||
218 |
! |
|
219 |
||
220 |
showClassVarsInVariableList |
|
221 |
showClassVars isNil ifTrue:[ |
|
222 |
showClassVars := false asValue. |
|
223 |
showClassVars addDependent:self |
|
224 |
]. |
|
225 |
^ showClassVars |
|
226 |
! |
|
227 |
||
228 |
showClassVarsInVariableList:aValueHolder |
|
229 |
showClassVars notNil ifTrue:[ |
|
230 |
showClassVars removeDependent:self |
|
231 |
]. |
|
232 |
showClassVars := aValueHolder. |
|
233 |
showClassVars notNil ifTrue:[ |
|
234 |
showClassVars addDependent:self |
|
235 |
]. |
|
236 |
! |
|
237 |
||
238 |
showingInheritedClassVars |
|
239 |
^ false |
|
240 |
"/ ^ true |
|
241 |
! |
|
242 |
||
243 |
sortVariablesByName |
|
16537 | 244 |
"/ groupVariablesByInheritance and sortVariablesByName form a 3-state value |
245 |
"/ groupVariablesByInheritance sortVariablesByName |
|
246 |
"/ T T - sort within each defining class |
|
247 |
"/ T F - by inst-order grouped by defining class |
|
248 |
"/ F T - show all of them in one big sorted list |
|
249 |
"/ F F - useless - show all of them by inst-order |
|
5591 | 250 |
sortVariablesByName isNil ifTrue:[ |
16537 | 251 |
sortVariablesByName := false asValue. |
252 |
sortVariablesByName addDependent:self |
|
5591 | 253 |
]. |
254 |
^ sortVariablesByName |
|
255 |
! |
|
256 |
||
257 |
sortVariablesByName:aValueHolder |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
258 |
"/ self assert:(aValueHolder value isBoolean). |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
259 |
|
5591 | 260 |
sortVariablesByName notNil ifTrue:[ |
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
261 |
sortVariablesByName removeDependent:self |
5591 | 262 |
]. |
263 |
sortVariablesByName := aValueHolder. |
|
264 |
sortVariablesByName notNil ifTrue:[ |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
265 |
sortVariablesByName addDependent:self |
5591 | 266 |
]. |
267 |
! |
|
268 |
||
269 |
variableList |
|
270 |
variableList isNil ifTrue:[ |
|
271 |
variableList := ValueHolder new |
|
272 |
]. |
|
273 |
^ variableList |
|
274 |
||
275 |
||
276 |
! ! |
|
277 |
||
278 |
!VariableList methodsFor:'change & update'! |
|
279 |
||
280 |
delayedUpdate:something with:aParameter from:changedObject |
|
281 |
|selectedClasses changedClass anyChange| |
|
282 |
||
283 |
self inSlaveModeOrInvisible ifTrue:[self invalidateList. ^ self]. |
|
284 |
||
285 |
changedObject == slaveMode ifTrue:[ |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
286 |
listValid ~~ true ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
287 |
self enqueueDelayedUpdateList |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
288 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
289 |
"/ self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
290 |
^ self |
5591 | 291 |
]. |
292 |
||
293 |
changedObject == classHolder ifTrue:[ |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
294 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
295 |
^ self |
5591 | 296 |
]. |
297 |
changedObject == showClassVars ifTrue:[ |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
298 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
299 |
^ self. |
5591 | 300 |
]. |
301 |
changedObject == sortVariablesByName ifTrue:[ |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
302 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
303 |
^ self. |
5591 | 304 |
]. |
16537 | 305 |
changedObject == groupVariablesByInheritance ifTrue:[ |
306 |
self invalidateList. |
|
307 |
^ self. |
|
308 |
]. |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
309 |
changedObject == environment ifTrue:[ |
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
310 |
(something == #projectOrganization) ifTrue:[^ self]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
311 |
(something == #currentChangeSet) ifTrue:[^ self]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
312 |
(something == #aboutToAutoloadClass) ifTrue:[^ self]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
313 |
|
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
314 |
(something == #classDefinition |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
315 |
or:[ (something == #newClass) |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
316 |
or:[ something == #classVariables and:[showClassVars value == true]]]) |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
317 |
ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
318 |
changedClass := aParameter. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
319 |
selectedClasses := classHolder value. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
320 |
selectedClasses notNil ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
321 |
selectedClasses isSequenceable ifFalse:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
322 |
selectedClasses := selectedClasses asOrderedCollection |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
323 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
324 |
selectedClasses keysAndValuesDo:[:idx :cls | |nm| |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
325 |
cls notNil ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
326 |
cls isObsolete ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
327 |
cls isMeta ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
328 |
nm := cls theNonMetaclass name. |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
329 |
selectedClasses at:idx put:(environment at:nm) class. |
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
330 |
] ifFalse:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
331 |
nm := cls name. |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
332 |
selectedClasses at:idx put:(environment at:nm). |
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
333 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
334 |
anyChange := true. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
335 |
] ifFalse:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
336 |
(cls == aParameter |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
337 |
or:[something == #classVariables |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
338 |
and:[showClassVars value == true |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
339 |
and:[cls theNonMetaclass == aParameter theNonMetaclass]]]) ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
340 |
anyChange := true. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
341 |
] |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
342 |
] |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
343 |
] |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
344 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
345 |
(selectedClasses includes:nil) ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
346 |
"/ can happen, if a selected class is removed... |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
347 |
"/ self halt:'should this happen ?'. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
348 |
"/ fix it ... |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
349 |
selectedClasses := selectedClasses select:[:each | each notNil]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
350 |
classHolder value:selectedClasses. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
351 |
anyChange := true. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
352 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
353 |
anyChange == true ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
354 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
355 |
^ self |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
356 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
357 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
358 |
^ self |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
359 |
]. |
5591 | 360 |
] ifFalse:[ |
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
361 |
changedObject isBehavior ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
362 |
anyChange := false. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
363 |
selectedClasses := classHolder value. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
364 |
selectedClasses notNil ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
365 |
selectedClasses keysAndValuesDo:[:idx :cls | |nm| |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
366 |
cls isObsolete ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
367 |
nm := cls name. |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
368 |
selectedClasses at:idx put:(environment at:nm). |
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
369 |
anyChange := true. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
370 |
] |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
371 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
372 |
anyChange == true ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
373 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
374 |
^ self |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
375 |
]. |
5591 | 376 |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
377 |
(selectedClasses includesIdentical:something) ifTrue:[ |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
378 |
self invalidateList. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
379 |
^ self |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
380 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
381 |
]. |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
382 |
^ self |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
383 |
]. |
5591 | 384 |
]. |
385 |
super delayedUpdate:something with:aParameter from:changedObject |
|
11296
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
386 |
|
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
387 |
"Modified: / 01-03-2012 / 09:18:11 / cg" |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
388 |
! |
2fec94a88af2
added: #enqueueDelayedUpdateList
Claus Gittinger <cg@exept.de>
parents:
10974
diff
changeset
|
389 |
|
5591 | 390 |
makeDependent |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
391 |
environment addDependent:self |
5591 | 392 |
|
393 |
! |
|
394 |
||
395 |
makeIndependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
396 |
environment removeDependent:self |
5591 | 397 |
|
398 |
! |
|
399 |
||
400 |
selectionChangedByClick |
|
401 |
"we are not interested in that - get another notification |
|
402 |
via the changed valueHolder" |
|
403 |
||
404 |
||
405 |
! |
|
406 |
||
407 |
update:something with:aParameter from:changedObject |
|
408 |
"/ ^ self delayedUpdate:something with:aParameter from:changedObject. |
|
409 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13458
diff
changeset
|
410 |
changedObject == environment ifTrue:[ |
10255 | 411 |
something == #methodDictionary ifTrue:[ |
412 |
^ self |
|
413 |
]. |
|
414 |
something == #methodTrap ifTrue:[ |
|
415 |
^ self |
|
416 |
]. |
|
10366 | 417 |
something == #methodCoverageInfo ifTrue:[ |
418 |
^ self |
|
419 |
]. |
|
10255 | 420 |
something == #methodInClass ifTrue:[ |
421 |
^ self |
|
422 |
]. |
|
423 |
something == #methodInClassRemoved ifTrue:[ |
|
424 |
^ self |
|
425 |
]. |
|
426 |
something == #classComment ifTrue:[ |
|
427 |
^ self. |
|
428 |
]. |
|
14293 | 429 |
something == #lastTestRunResult ifTrue:[ |
430 |
^ self |
|
431 |
]. |
|
432 |
something isNil ifTrue:[ |
|
433 |
^ self |
|
434 |
]. |
|
5591 | 435 |
]. |
436 |
"/ self window sensor isNil ifTrue:[ |
|
437 |
"/ "/ I am not visible ... |
|
438 |
"/ self invalidateList. |
|
439 |
"/ ^ self |
|
440 |
"/ ]. |
|
10255 | 441 |
changedObject == selectedVariableEntries ifTrue:[ |
442 |
self selectedVariables value: |
|
443 |
((selectedVariableEntries value ? #()) |
|
14144
9bcb9fef21b6
Access graphicsDevice via method send instead of instVar access
Stefan Vogel <sv@exept.de>
parents:
14114
diff
changeset
|
444 |
select:[:e| e isString not] "filter out class name header strings" |
9bcb9fef21b6
Access graphicsDevice via method send instead of instVar access
Stefan Vogel <sv@exept.de>
parents:
14114
diff
changeset
|
445 |
thenCollect:[:e|e name]). |
10255 | 446 |
^self. |
447 |
]. |
|
448 |
||
449 |
||
5591 | 450 |
super update:something with:aParameter from:changedObject |
451 |
||
10255 | 452 |
"Modified: / 12-04-2011 / 15:54:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10366 | 453 |
"Modified: / 20-07-2011 / 18:52:44 / cg" |
5591 | 454 |
! ! |
455 |
||
456 |
!VariableList methodsFor:'generators'! |
|
457 |
||
458 |
makeGenerator |
|
459 |
||
460 |
||
461 |
||
462 |
! ! |
|
463 |
||
464 |
!VariableList methodsFor:'private'! |
|
465 |
||
5909 | 466 |
commonPostBuild |
5591 | 467 |
|list| |
468 |
||
5909 | 469 |
super commonPostBuild. |
5591 | 470 |
|
5909 | 471 |
list := builder componentAt:#List. |
5591 | 472 |
list notNil ifTrue:[ |
5909 | 473 |
list selectConditionBlock:[:item | self selectionChangeAllowed:item]. |
474 |
list ignoreReselect:false. |
|
5591 | 475 |
]. |
476 |
! |
|
477 |
||
478 |
commonSubClassIn:classes |
|
479 |
"return true if there is a common subclass" |
|
480 |
||
481 |
|theCommonSubClass "classesByInheritance"| |
|
482 |
||
483 |
theCommonSubClass := nil. |
|
484 |
classes do:[:eachClass | |
|
485 |
theCommonSubClass isNil ifTrue:[ |
|
486 |
theCommonSubClass := eachClass |
|
487 |
] ifFalse:[ |
|
488 |
(eachClass isSubclassOf:theCommonSubClass) ifTrue:[ |
|
489 |
theCommonSubClass := eachClass |
|
490 |
] ifFalse:[ |
|
491 |
(theCommonSubClass isSubclassOf:eachClass) ifFalse:[ |
|
492 |
^ nil |
|
493 |
] |
|
494 |
] |
|
495 |
] |
|
496 |
]. |
|
497 |
^ theCommonSubClass. |
|
498 |
||
499 |
"/ classesByInheritance := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
|
500 |
"/ classesByInheritance keysAndValuesDo:[:index :eachClass | |
|
501 |
"/ "/ all classes after that one must be superclasses ... |
|
502 |
"/ classesByInheritance from:index+1 to:classesByInheritance size do:[:otherClass | |
|
503 |
"/ (eachClass isSubclassOf:otherClass) ifFalse:[ |
|
504 |
"/ ^ nil. |
|
505 |
"/ ] |
|
506 |
"/ ]. |
|
507 |
"/ ]. |
|
508 |
"/ ^ classesByInheritance first |
|
509 |
! |
|
510 |
||
10324
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
511 |
iconInBrowserForVariable:varName in:aClass |
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
512 |
"variables for which an entry is found in the xml-spec (if any) are marked |
17833 | 513 |
with an <xml>-icon. |
514 |
This is an inexact heuristic; assumes that if the tag matches, that would be an XML entry for it" |
|
10255 | 515 |
|
10324
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
516 |
(Expecco::ExpeccoXMLDecoder notNil |
17833 | 517 |
and:[aClass canUnderstand: #xmlSpecFor:]) ifTrue:[ |
10324
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
518 |
Error handle:[:ex | |
17847 | 519 |
self breakPoint:#cg. |
10324
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
520 |
] do:[ |
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
521 |
(Expecco::ExpeccoXMLDecoder xmlSpecForObject:aClass basicNew) |
17833 | 522 |
do:[:spec | |
523 |
spec tag = varName ifTrue:[ |
|
524 |
^ SystemBrowser instVarOverlayXmlSpec |
|
525 |
]. |
|
526 |
"/ spec getter = varName ifTrue:[ |
|
527 |
"/ ^ SystemBrowser instVarOverlayXmlSpec |
|
528 |
"/ ]. |
|
529 |
"/ spec getter = ('get',varName asUppercaseFirst) ifTrue:[ |
|
530 |
"/ ^ SystemBrowser instVarOverlayXmlSpec |
|
531 |
"/ ]. |
|
532 |
"/ spec setter = ('set',varName asUppercaseFirst) ifTrue:[ |
|
533 |
"/ ^ SystemBrowser instVarOverlayXmlSpec |
|
534 |
"/ ] |
|
10324
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
535 |
]. |
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
536 |
]. |
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
537 |
]. |
d68f7aa2e449
I dont like extensions too much.
Claus Gittinger <cg@exept.de>
parents:
10308
diff
changeset
|
538 |
^ nil |
10255 | 539 |
|
540 |
"Created: / 12-04-2011 / 19:58:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11586 | 541 |
"Modified: / 22-06-2012 / 13:17:28 / sr" |
17833 | 542 |
"Modified: / 01-12-2017 / 17:53:41 / cg" |
10255 | 543 |
! |
544 |
||
545 |
listEntryForClass: cls name:name |
|
16537 | 546 |
^ self listEntryForClass: cls name:name info:nil |
10255 | 547 |
! |
548 |
||
16537 | 549 |
listEntryForClass: cls name:name info: classInfoOrNil |
550 |
| entry | |
|
10974 | 551 |
|
16537 | 552 |
entry := Tools::VariableList::VariableEntry application: self class: cls name: name. |
13382 | 553 |
entry sortingByNameHolder:sortVariablesByName. |
16537 | 554 |
entry groupByInheritanceHolder:groupVariablesByInheritance. |
555 |
classInfoOrNil notNil ifTrue:[ |
|
556 |
entry type: (classInfoOrNil infoForInstvarOrNil: name). |
|
10974 | 557 |
]. |
558 |
^entry |
|
559 |
||
560 |
"Created: / 27-11-2011 / 17:17:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13827 | 561 |
"Modified: / 07-10-2013 / 08:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10974 | 562 |
! |
563 |
||
5591 | 564 |
listOfVariables |
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
565 |
|nameList numClasses classes class commonSubclass showingClassVars |
16537 | 566 |
sortByName groupByInheritance classesAlreadyProcessed hasSmallSense smallSenseManager info | |
5591 | 567 |
|
568 |
classHolder isNil ifTrue:[ |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
569 |
"/ testing |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
570 |
^ #() |
5591 | 571 |
]. |
572 |
||
13458
842c7f563bd5
class: Tools::VariableList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13457
diff
changeset
|
573 |
hasSmallSense := (ConfigurableFeatures includesFeature:'SmallSenseEnabled') |
842c7f563bd5
class: Tools::VariableList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13457
diff
changeset
|
574 |
and:[(Smalltalk at: #'SmallSense::Manager') notNil]. |
10974 | 575 |
hasSmallSense ifTrue:[ |
13457
630e14513fec
Fix for recent SmallSense (moved to its own namespace)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13382
diff
changeset
|
576 |
smallSenseManager := (Smalltalk at: #'SmallSense::Manager') instance. |
10974 | 577 |
]. |
578 |
||
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
579 |
showingClassVars := self showClassVarsInVariableList value == true. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
580 |
sortByName := self sortVariablesByName value. |
16537 | 581 |
groupByInheritance := self groupVariablesByInheritance value. |
582 |
self assert:(sortByName isBoolean). |
|
583 |
self assert:(groupByInheritance isBoolean). |
|
5591 | 584 |
|
585 |
classes := classHolder value. |
|
586 |
(numClasses := classes size) == 0 ifTrue:[^ #() ]. |
|
587 |
numClasses > 1 ifTrue:[ |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
588 |
"/ multiple classes - see if there is a common subclass ... |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
589 |
commonSubclass := self commonSubClassIn:classes. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
590 |
commonSubclass notNil ifTrue:[ |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
591 |
"/ yes - treat like a single class |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
592 |
classes := Array with:(commonSubclass). |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
593 |
numClasses := 1. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
594 |
]. |
13155 | 595 |
"/ commonSuperclass := Behavior commonSuperclassOf:classes. |
596 |
"/ commonSuperclass notNil ifTrue:[ |
|
597 |
"/ "/ yes - treat like a single class |
|
598 |
"/ classes := Array with:(commonSuperclass). |
|
599 |
"/ numClasses := 1. |
|
600 |
"/ ]. |
|
5591 | 601 |
]. |
602 |
||
603 |
numClasses > 1 ifTrue:[ |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
604 |
"/ multiple classes - sort alphabetically ... |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
605 |
"/ unless there is a common subclass ... |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
606 |
nameList := Set new. |
10550 | 607 |
classesAlreadyProcessed := IdentitySet new. |
13155 | 608 |
classes do:[:eachClass | |
609 |
|class| |
|
610 |
||
611 |
class := eachClass. |
|
612 |
"/ showingClassVars ifTrue:[ |
|
613 |
"/ class := class theNonMetaclass |
|
614 |
"/ ]. |
|
615 |
||
10974 | 616 |
hasSmallSense ifTrue:[ |
617 |
info := smallSenseManager infoForClassOrNil: class. |
|
618 |
]. |
|
619 |
||
10550 | 620 |
(classesAlreadyProcessed includes:class) ifFalse:[ |
621 |
showingClassVars ifTrue:[ |
|
622 |
self showingInheritedClassVars ifTrue:[ |
|
623 |
class theNonMetaclass withAllSuperclassesDo:[:cls| |
|
10974 | 624 |
hasSmallSense ifTrue:[ |
625 |
info := smallSenseManager infoForClassOrNil: cls. |
|
626 |
]. |
|
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
627 |
|
10550 | 628 |
(classesAlreadyProcessed includes:cls) ifFalse:[ |
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
629 |
"/ Must check whether environment contains the class and filter it out, |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
630 |
"/ if not. Think of limited environment to Java classes which should not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
631 |
"/ show Object & JavaObject even if they are real superclasses of any Java |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
632 |
"/ class. |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
633 |
"/ Q: Should we rather ignore all superclasses after first class which is not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
634 |
"/ in environment? |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
635 |
|
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
636 |
(environment at: cls name ifAbsent:[nil]) notNil ifTrue:[ |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
637 |
nameList addAll: |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
638 |
(cls classVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info]). |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
639 |
]. |
10550 | 640 |
classesAlreadyProcessed add:cls. |
641 |
] |
|
642 |
] |
|
643 |
] ifFalse:[ |
|
10255 | 644 |
nameList addAll: |
10974 | 645 |
(class classVarNames collect:[:nm|self listEntryForClass: class name: nm info: info ]) |
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
646 |
] |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
647 |
] ifFalse:[ |
10550 | 648 |
class withAllSuperclassesDo:[:cls| |
649 |
(classesAlreadyProcessed includes:cls) ifFalse:[ |
|
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
650 |
"/ Must check whether environment contains the class and filter it out, |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
651 |
"/ if not. Think of limited environment to Java classes which should not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
652 |
"/ show Object & JavaObject even if they are real superclasses of any Java |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
653 |
"/ class. |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
654 |
"/ Q: Should we rather ignore all superclasses after first class which is not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
655 |
"/ in environment? |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
656 |
|
14806
56a544a200ce
Fix Tools::VariableList>>listOfVariables - pass non-metaclass name when checking
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14612
diff
changeset
|
657 |
(environment at: cls theNonMetaclass name ifAbsent:[nil]) notNil ifTrue:[ |
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
658 |
nameList addAll: |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
659 |
(cls instVarNames collect:[:nm|self listEntryForClass: cls name: nm info: info ]). |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
660 |
]. |
10550 | 661 |
classesAlreadyProcessed add:cls. |
662 |
] |
|
663 |
] |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
664 |
] |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
665 |
] |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
666 |
]. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
667 |
nameList := nameList asOrderedCollection. |
5591 | 668 |
] ifFalse:[ |
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
669 |
"/ only a single class - sort by inheritance |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
670 |
class := classes first. |
5591 | 671 |
|
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
672 |
nameList := OrderedCollection new. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
673 |
class notNil ifTrue:[ |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
674 |
showingClassVars ifTrue:[ |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
675 |
class := class theNonMetaclass |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
676 |
]. |
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
677 |
class withAllSuperclassesDo:[:cls| |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
678 |
"/ Must check whether environment contains the class and filter it out, |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
679 |
"/ if not. Think of limited environment to Java classes which should not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
680 |
"/ show Object & JavaObject even if they are real superclasses of any Java |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
681 |
"/ class. |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
682 |
"/ Q: Should we rather ignore all superclasses after first class which is not |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
683 |
"/ in environment? |
18011 | 684 |
|className classUsed| |
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
685 |
|
18011 | 686 |
className := cls theNonMetaclass name. |
687 |
className isSymbol ifFalse:[ |
|
688 |
"/ an anon class |
|
689 |
classUsed := cls |
|
690 |
] ifTrue:[ |
|
691 |
classUsed := environment at: className ifAbsent:[cls theNonMetaclass]. |
|
692 |
]. |
|
693 |
classUsed notNil ifTrue:[ |
|
15455 | 694 |
|varNames classShown| |
5591 | 695 |
|
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
696 |
(hasSmallSense and:[showingClassVars not]) ifTrue:[ |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
697 |
info := smallSenseManager infoForClassOrNil: cls. |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
698 |
]. |
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
699 |
varNames := showingClassVars ifTrue:[ cls classVarNames ] ifFalse:[ cls instVarNames ]. |
15455 | 700 |
classShown := (cls ~~ class). "/ only append the class in the shown name, if the var is inherited |
16537 | 701 |
sortByName ifTrue:[ |
16707 | 702 |
varNames := varNames copy sort. |
16537 | 703 |
]. |
17598 | 704 |
varNames reverseDo:[:varName| |
15455 | 705 |
|entry| |
706 |
nameList addFirst: (entry := self listEntryForClass: cls name: varName info: info). |
|
707 |
classShown ifFalse:[ entry classShown:classShown ]. |
|
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
708 |
]. |
16537 | 709 |
groupByInheritance ifTrue:[ |
18483 | 710 |
cls isAbstract ifTrue:[ |
711 |
nameList addFirst:((cls nameInBrowser, ' (abstract)') allItalic withColor: Color gray). |
|
712 |
] ifFalse:[ |
|
713 |
nameList addFirst:((cls nameInBrowser) withColor: Color gray). |
|
714 |
] |
|
14288
01c8bbd5b6dd
Fix in #listOfVariables - must check whether all superclasses are actually in environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14144
diff
changeset
|
715 |
] |
6721
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
716 |
]. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
717 |
]. |
c49f5a3cbca2
variableList (sort) fixed in hierarchy views
Claus Gittinger <cg@exept.de>
parents:
5909
diff
changeset
|
718 |
]. |
5591 | 719 |
]. |
720 |
||
16537 | 721 |
(numClasses > 1 or:[sortByName and:[groupByInheritance not]]) ifTrue:[ |
10255 | 722 |
nameList := nameList asSortedCollection:[:a :b|a name < b name]. |
5591 | 723 |
]. |
724 |
^ nameList |
|
725 |
||
10255 | 726 |
"Created: / 05-02-2000 / 13:42:11 / cg" |
10550 | 727 |
"Modified: / 08-08-2011 / 16:20:58 / cg" |
14806
56a544a200ce
Fix Tools::VariableList>>listOfVariables - pass non-metaclass name when checking
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14612
diff
changeset
|
728 |
"Modified: / 28-10-2014 / 11:42:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17598 | 729 |
"Modified (format): / 25-07-2017 / 17:51:15 / stefan" |
5591 | 730 |
! |
731 |
||
732 |
postBuildWith:aBuilder |
|
733 |
|listView| |
|
734 |
||
735 |
(listView := aBuilder componentAt:#List) notNil ifTrue:[ |
|
736 |
listView scrollWhenUpdating:#end |
|
737 |
]. |
|
738 |
super postBuildWith:aBuilder |
|
739 |
||
740 |
! |
|
741 |
||
742 |
release |
|
743 |
super release. |
|
744 |
||
745 |
classHolder removeDependent:self. |
|
746 |
showClassVars removeDependent:self. |
|
747 |
! |
|
748 |
||
749 |
selectionChangeAllowed:index |
|
10255 | 750 |
|
751 |
| entry | |
|
752 |
^((entry := variableList value at:index) isString" and:[entry startsWith:'---']") not. |
|
753 |
||
754 |
"Modified: / 28-04-2011 / 13:18:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5591 | 755 |
! |
756 |
||
757 |
updateList |
|
758 |
| prevSelection newSelection newList oldList selectedVariablesHolder| |
|
759 |
||
760 |
oldList := self variableList value copy. |
|
10255 | 761 |
showWarningAboutMissingEntryInXmlSpec := false. |
5591 | 762 |
newList := self listOfVariables. |
763 |
||
764 |
newList ~= variableList value ifTrue:[ |
|
10495 | 765 |
selectedVariablesHolder := self selectedVariableEntries. |
11360 | 766 |
prevSelection := (self selectedVariables value "selectedVariablesHolder value" copy) ? #(). |
10255 | 767 |
variableList value:newList. |
768 |
||
11360 | 769 |
newSelection := newList select:[:item | prevSelection includes:item string]. |
770 |
"/ newSelection := prevSelection select:[:item | newList includes:item]. |
|
5591 | 771 |
|
10255 | 772 |
newSelection size > 0 ifTrue:[ |
773 |
"/ force change (for dependents) |
|
11360 | 774 |
"/ selectedVariablesHolder value:nil. |
775 |
selectedVariablesHolder |
|
776 |
setValue:newSelection; |
|
11461 | 777 |
removeDependent:self; |
778 |
changed; |
|
779 |
addDependent:self. |
|
10255 | 780 |
] ifFalse:[ |
781 |
prevSelection := selectedVariablesHolder value. |
|
782 |
selectedVariablesHolder value:nil. |
|
783 |
]. |
|
11360 | 784 |
(prevSelection size > 0 or:[newSelection size > 0 |
785 |
"and:[ prevSelection ~= newSelection]"]) ifTrue:[ |
|
10255 | 786 |
self updateOutputGenerator. |
787 |
]. |
|
788 |
]. |
|
789 |
(showWarningAboutMissingEntryInXmlSpec and:[self topApplication respondsTo: #showMessage:]) |
|
790 |
ifTrue: |
|
791 |
[ |
|
792 |
self topApplication showMessage: |
|
793 |
'One or more instance variables are not listed in #xmlSpecFor:'. |
|
794 |
]. |
|
795 |
showWarningAboutMissingEntryInXmlSpec := false. |
|
14861
87aa6288286b
access listValid only via setter (for easier trapping)
Claus Gittinger <cg@exept.de>
parents:
14806
diff
changeset
|
796 |
self setListValid:true. |
10255 | 797 |
|
10495 | 798 |
"Modified: / 05-08-2011 / 12:34:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11461 | 799 |
"Modified: / 23-03-2012 / 15:55:47 / cg" |
10255 | 800 |
! ! |
801 |
||
802 |
!VariableList::VariableEntry class methodsFor:'instance creation'! |
|
803 |
||
804 |
application: app class: aClass name: aString |
|
805 |
||
806 |
^self new application: app; class: aClass; name: aString |
|
807 |
||
808 |
"Created: / 12-04-2011 / 19:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
809 |
! |
|
810 |
||
811 |
class: aClass name: aString |
|
812 |
||
813 |
^self new class: aClass; name: aString |
|
814 |
||
815 |
"Created: / 12-04-2011 / 15:39:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
816 |
! ! |
|
817 |
||
818 |
!VariableList::VariableEntry methodsFor:'accessing'! |
|
819 |
||
820 |
application: anObject |
|
5591 | 821 |
|
10255 | 822 |
application := anObject |
823 |
||
824 |
"Created: / 12-04-2011 / 19:55:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
825 |
! |
|
826 |
||
10308 | 827 |
asString |
828 |
||
829 |
^self name |
|
830 |
||
831 |
"Created: / 11-07-2011 / 17:03:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
832 |
! |
|
833 |
||
10255 | 834 |
class:aClass |
835 |
class := aClass. |
|
836 |
! |
|
837 |
||
15455 | 838 |
classShown:aBoolean |
839 |
classShown := aBoolean. |
|
840 |
! |
|
841 |
||
16537 | 842 |
groupByInheritanceHolder:aValueHolder |
843 |
"/ is there a need for a valueHolder? |
|
844 |
groupByInheritanceHolder := aValueHolder. |
|
845 |
! |
|
846 |
||
10255 | 847 |
icon |
10871 | 848 |
icon isNil ifTrue:[ |
849 |
icon := application iconInBrowserForVariable: name in: class. |
|
850 |
icon isNil ifTrue:[icon := #NOICON]. |
|
851 |
]. |
|
10255 | 852 |
^icon |
853 |
||
854 |
"Created: / 12-04-2011 / 15:54:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
855 |
"Modified: / 12-04-2011 / 19:58:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10871 | 856 |
"Modified: / 18-11-2011 / 15:05:18 / cg" |
10255 | 857 |
! |
858 |
||
859 |
klass |
|
860 |
^ class |
|
861 |
||
862 |
"Created: / 12-04-2011 / 19:54:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
863 |
! |
|
864 |
||
10974 | 865 |
label |
866 |
||
867 |
label isNil ifTrue:[ |
|
868 |
label := name. |
|
869 |
type notNil ifTrue:[ |
|
16500 | 870 |
label := (label , ' ' , (type displayString withColor: Color brown)) |
13827 | 871 |
] ifFalse:[ |
872 |
"/ Hack for Java classes to display field type |
|
873 |
class theNonMetaclass isJavaClass ifTrue:[ |
|
874 |
| field | |
|
875 |
field := class theNonMetaclass lookupFieldFor:name static: (class isMetaclass) onlyPublic: false. |
|
876 |
field notNil ifTrue:[ |
|
877 |
label := label asText , |
|
878 |
' ' , |
|
879 |
(('< ' , (JavaMethod fieldTypeFromStream: (field descriptor readStream) in: class theNonMetaclass javaPackage) , ' >') |
|
16500 | 880 |
withColor: Color brown). |
13827 | 881 |
]. |
882 |
]. |
|
13382 | 883 |
]. |
10974 | 884 |
]. |
885 |
^label |
|
886 |
||
887 |
"Created: / 16-12-2011 / 00:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13827 | 888 |
"Modified: / 07-10-2013 / 08:29:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10974 | 889 |
! |
890 |
||
13382 | 891 |
labelWithClass |
892 |
|l| |
|
893 |
||
894 |
l := self label. |
|
895 |
class notNil ifTrue:[ |
|
16500 | 896 |
^ label,' (' ,(class nameWithoutPrefix withColor: Color gray),')' |
13382 | 897 |
]. |
898 |
^label |
|
899 |
! |
|
900 |
||
10255 | 901 |
name |
902 |
^ name |
|
903 |
! |
|
904 |
||
905 |
name:aString |
|
906 |
name := aString. |
|
907 |
! |
|
908 |
||
16537 | 909 |
sortingByNameHolder:aValueHolder |
910 |
"/ is there a need for a valueHolder? |
|
911 |
sortingByNameHolder := aValueHolder. |
|
13382 | 912 |
! |
913 |
||
10255 | 914 |
string |
915 |
||
916 |
^name |
|
917 |
||
918 |
"Created: / 12-04-2011 / 15:45:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10974 | 919 |
! |
920 |
||
921 |
type |
|
922 |
"Return a SmallSense inferred type" |
|
923 |
||
924 |
^ type |
|
925 |
||
926 |
"Modified (format): / 16-12-2011 / 00:41:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
927 |
! |
|
928 |
||
929 |
type:aSmallSenseType |
|
930 |
"Sets a SmallSense inferred type" |
|
931 |
||
932 |
type := aSmallSenseType. |
|
933 |
||
934 |
"Modified (format): / 16-12-2011 / 00:41:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10255 | 935 |
! ! |
936 |
||
937 |
!VariableList::VariableEntry methodsFor:'displaying'! |
|
938 |
||
15455 | 939 |
displayOn:aGC x:x y:y opaque:opaque |
13382 | 940 |
| icn shownLabel | |
10255 | 941 |
|
942 |
icn := self icon. |
|
943 |
icn ~~ #NOICON ifTrue:[ |
|
944 |
icn displayOn:aGC x:x + 1 y:y - icn height. |
|
5591 | 945 |
]. |
13382 | 946 |
|
16537 | 947 |
shownLabel := ((classShown ? true) and:[sortingByNameHolder value and:[groupByInheritanceHolder value not]]) |
13382 | 948 |
ifTrue:[ self labelWithClass ] |
949 |
ifFalse: [ self label ]. |
|
950 |
||
951 |
shownLabel displayOn:aGC x:x + 20 y:y opaque: opaque |
|
10255 | 952 |
|
953 |
"Created: / 12-04-2011 / 15:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5591 | 954 |
! ! |
955 |
||
10974 | 956 |
!VariableList::VariableEntry methodsFor:'queries'! |
957 |
||
958 |
widthOn:aGC |
|
959 |
||
960 |
^20"space for icon, see displayOn:..." |
|
961 |
+ (self label widthOn:aGC) |
|
962 |
||
963 |
"Created: / 16-12-2011 / 01:04:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
964 |
! ! |
|
965 |
||
5591 | 966 |
!VariableList class methodsFor:'documentation'! |
967 |
||
9461 | 968 |
version_CVS |
16192 | 969 |
^ '$Header$' |
5591 | 970 |
! ! |
12450 | 971 |