author | Claus Gittinger <cg@exept.de> |
Thu, 01 Nov 2012 11:59:12 +0100 | |
changeset 11978 | 4ff5f53f23a9 |
parent 11967 | 09b72b540e24 |
child 12001 | 286aa33188ee |
permissions | -rw-r--r-- |
6179 | 1 |
" |
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5592 | 12 |
"{ Package: 'stx:libtool' }" |
5591 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
BrowserList subclass:#ClassList |
|
17 |
instanceVariableNames:'classList classNameList meta lastSelectedClasses |
|
18 |
selectedClassNameIndices currentNamespace hidePrivateClasses |
|
9431 | 19 |
unloadedClassesColor markApplicationsHolder classFilterBlock |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
20 |
sortByNameAndInheritance outGeneratorHolderForMethods' |
5591 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'Interface-Browsers-New' |
|
24 |
! |
|
25 |
||
26 |
!ClassList class methodsFor:'documentation'! |
|
27 |
||
6179 | 28 |
copyright |
29 |
" |
|
30 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
31 |
All Rights Reserved |
|
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
! |
|
41 |
||
5591 | 42 |
documentation |
43 |
" |
|
44 |
embeddable application displaying the classes as listed by |
|
45 |
the inputGenerator. |
|
46 |
Provides an outputGenerator, which enumerates the classes and |
|
47 |
their protocols (method-categories) in the selected classes. |
|
48 |
||
49 |
[author:] |
|
50 |
Claus Gittinger (cg@exept.de) |
|
51 |
" |
|
52 |
||
53 |
||
54 |
! ! |
|
55 |
||
56 |
!ClassList class methodsFor:'interface specs'! |
|
57 |
||
58 |
singleClassWindowSpec |
|
59 |
"This resource specification was automatically generated |
|
60 |
by the UIPainter of ST/X." |
|
61 |
||
62 |
"Do not manually edit this!! If it is corrupted, |
|
63 |
the UIPainter may not be able to read the specification." |
|
64 |
||
65 |
" |
|
66 |
UIPainter new openOnClass:ClassList andSelector:#singleClassWindowSpec |
|
67 |
ClassList new openInterface:#singleClassWindowSpec |
|
68 |
" |
|
69 |
||
70 |
<resource: #canvas> |
|
71 |
||
72 |
^ |
|
73 |
#(#FullSpec |
|
5592 | 74 |
#name: #windowSpec |
75 |
#window: |
|
5591 | 76 |
#(#WindowSpec |
5592 | 77 |
#label: 'ClassList' |
78 |
#name: 'ClassList' |
|
79 |
#min: #(#Point 0 0) |
|
80 |
#max: #(#Point 1024 721) |
|
81 |
#bounds: #(#Rectangle 12 22 312 322) |
|
82 |
) |
|
83 |
#component: |
|
5591 | 84 |
#(#SpecCollection |
5592 | 85 |
#collection: #( |
86 |
#(#LabelSpec |
|
87 |
#label: 'ClassName' |
|
88 |
#name: 'ClassLabel' |
|
89 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
90 |
#translateLabel: true |
|
91 |
#labelChannel: #classLabelHolder |
|
92 |
#menu: #menuHolder |
|
93 |
) |
|
5591 | 94 |
"/ #(#UISubSpecification |
95 |
"/ #name: 'MetaToggleSpec' |
|
96 |
"/ #layout: #(#LayoutFrame 0 0.0 -25 1.0 0 1.0 0 1.0) |
|
97 |
"/ #minorKey: #metaSpec |
|
98 |
"/ ) |
|
5592 | 99 |
) |
5591 | 100 |
|
5592 | 101 |
) |
5591 | 102 |
) |
103 |
! |
|
104 |
||
105 |
windowSpec |
|
106 |
"This resource specification was automatically generated |
|
107 |
by the UIPainter of ST/X." |
|
108 |
||
109 |
"Do not manually edit this!! If it is corrupted, |
|
110 |
the UIPainter may not be able to read the specification." |
|
111 |
||
112 |
" |
|
113 |
UIPainter new openOnClass:ClassList andSelector:#windowSpec |
|
114 |
ClassList new openInterface:#windowSpec |
|
115 |
ClassList open |
|
116 |
" |
|
117 |
||
118 |
<resource: #canvas> |
|
119 |
||
120 |
^ |
|
121 |
#(#FullSpec |
|
6468 | 122 |
#name: #windowSpec |
123 |
#window: |
|
5591 | 124 |
#(#WindowSpec |
6468 | 125 |
#label: 'ClassList' |
126 |
#name: 'ClassList' |
|
127 |
#min: #(#Point 0 0) |
|
128 |
#bounds: #(#Rectangle 16 46 316 346) |
|
129 |
) |
|
130 |
#component: |
|
5591 | 131 |
#(#SpecCollection |
6468 | 132 |
#collection: #( |
133 |
#(#SequenceViewSpec |
|
134 |
#name: 'List' |
|
135 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
136 |
#tabable: true |
|
137 |
#model: #selectedClassNameIndices |
|
138 |
#menu: #menuHolder |
|
139 |
#hasHorizontalScrollBar: true |
|
140 |
#hasVerticalScrollBar: true |
|
141 |
#miniScrollerHorizontal: true |
|
142 |
#isMultiSelect: true |
|
143 |
#valueChangeSelector: #selectionChangedByClick |
|
144 |
#useIndex: true |
|
145 |
#sequenceList: #classNameList |
|
146 |
#doubleClickChannel: #doubleClickChannel |
|
147 |
#properties: |
|
148 |
#(#PropertyListDictionary |
|
149 |
#dragArgument: nil |
|
150 |
#dropArgument: nil |
|
151 |
#canDropSelector: #canDropContext: |
|
152 |
#dropSelector: #doDropContext: |
|
153 |
) |
|
154 |
) |
|
155 |
) |
|
5591 | 156 |
|
6468 | 157 |
) |
5591 | 158 |
) |
159 |
! ! |
|
160 |
||
161 |
!ClassList class methodsFor:'plugIn spec'! |
|
162 |
||
163 |
aspectSelectors |
|
164 |
"This resource specification was automatically generated |
|
165 |
by the UIPainter of ST/X." |
|
166 |
||
167 |
"Do not manually edit this. If it is corrupted, |
|
168 |
the UIPainter may not be able to read the specification." |
|
169 |
||
170 |
"Return a description of exported aspects; |
|
171 |
these can be connected to aspects of an embedding application |
|
172 |
(if this app is embedded in a subCanvas)." |
|
173 |
||
174 |
^ #( |
|
9431 | 175 |
#currentNamespace |
176 |
#(#doubleClickChannel #action ) |
|
177 |
#forceGeneratorTrigger |
|
178 |
#hidePrivateClasses |
|
179 |
#hideUnloadedClasses |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
180 |
#sortByNameAndInheritance |
9431 | 181 |
#immediateUpdate |
182 |
#inGeneratorHolder |
|
183 |
#menuHolder |
|
184 |
#meta |
|
185 |
#organizerMode |
|
186 |
#outGeneratorHolder |
|
187 |
#packageFilter |
|
188 |
#nameSpaceFilter |
|
189 |
#selectedClasses |
|
190 |
#selectionChangeCondition |
|
191 |
#showClassPackages |
|
192 |
#slaveMode |
|
193 |
#updateTrigger |
|
194 |
#markApplicationsHolder |
|
9437 | 195 |
#showCoverageInformation |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
196 |
#outGeneratorHolderForMethods |
5591 | 197 |
). |
198 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
199 |
"Modified: / 04-07-2011 / 18:34:44 / cg" |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
200 |
"Modified: / 07-08-2011 / 19:02:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 201 |
! ! |
202 |
||
203 |
!ClassList methodsFor:'accessing'! |
|
204 |
||
205 |
markApplications |
|
206 |
"return the value of the instance variable 'markApplications' (automatically generated)" |
|
207 |
||
208 |
^ self markApplicationsHolder value |
|
209 |
||
210 |
"Created: / 3.11.2001 / 14:06:19 / cg" |
|
211 |
! |
|
212 |
||
213 |
markApplications:something |
|
214 |
"set the value of the instance variable 'markApplications' (automatically generated)" |
|
215 |
||
216 |
self markApplicationsHolder value:something. |
|
217 |
||
218 |
"Created: / 3.11.2001 / 14:06:25 / cg" |
|
219 |
! |
|
220 |
||
221 |
unloadedClassesColor |
|
222 |
"return the value of the instance variable 'unloadedClassesColor' (automatically generated)" |
|
223 |
||
224 |
^ unloadedClassesColor |
|
225 |
! |
|
226 |
||
227 |
unloadedClassesColor:something |
|
228 |
"set the value of the instance variable 'unloadedClassesColor' (automatically generated)" |
|
229 |
||
230 |
unloadedClassesColor := something. |
|
231 |
! ! |
|
232 |
||
233 |
!ClassList methodsFor:'aspects'! |
|
234 |
||
235 |
classLabelHolder |
|
236 |
^ self pseudoListLabelHolder |
|
237 |
! |
|
238 |
||
239 |
classList |
|
240 |
classList isNil ifTrue:[ |
|
241 |
classList := ValueHolder new. |
|
242 |
]. |
|
243 |
^ classList |
|
244 |
||
245 |
"Created: / 5.2.2000 / 13:42:16 / cg" |
|
246 |
"Modified: / 25.2.2000 / 02:21:07 / cg" |
|
247 |
! |
|
248 |
||
249 |
classNameList |
|
250 |
classNameList isNil ifTrue:[ |
|
251 |
classNameList := ValueHolder new |
|
252 |
]. |
|
253 |
^ classNameList |
|
254 |
! |
|
255 |
||
256 |
currentNamespace:aValueHolder |
|
257 |
currentNamespace notNil ifTrue:[ |
|
258 |
currentNamespace removeDependent:self |
|
259 |
]. |
|
260 |
currentNamespace := aValueHolder. |
|
261 |
currentNamespace notNil ifTrue:[ |
|
262 |
currentNamespace isBehavior ifTrue:[self halt:'should not happen']. |
|
263 |
currentNamespace addDependent:self |
|
264 |
]. |
|
265 |
||
266 |
"Modified: / 4.2.2000 / 23:34:28 / cg" |
|
267 |
"Created: / 5.2.2000 / 21:37:57 / cg" |
|
268 |
! |
|
269 |
||
270 |
doubleClick |
|
271 |
self halt:'should not happen'. |
|
272 |
! |
|
273 |
||
274 |
hidePrivateClasses |
|
275 |
hidePrivateClasses isNil ifTrue:[ |
|
276 |
hidePrivateClasses := false asValue. |
|
277 |
hidePrivateClasses addDependent:self. |
|
278 |
]. |
|
279 |
^ hidePrivateClasses. |
|
280 |
||
281 |
"Created: / 24.2.2000 / 15:06:44 / cg" |
|
282 |
! |
|
283 |
||
284 |
hidePrivateClasses:aValueHolder |
|
285 |
hidePrivateClasses notNil ifTrue:[ |
|
286 |
hidePrivateClasses removeDependent:self |
|
287 |
]. |
|
288 |
hidePrivateClasses := aValueHolder. |
|
289 |
hidePrivateClasses notNil ifTrue:[ |
|
290 |
hidePrivateClasses addDependent:self |
|
291 |
]. |
|
292 |
||
293 |
"Created: / 24.2.2000 / 15:06:46 / cg" |
|
294 |
! |
|
295 |
||
296 |
markApplicationsHolder |
|
297 |
markApplicationsHolder isNil ifTrue:[ |
|
298 |
markApplicationsHolder := true asValue. |
|
299 |
markApplicationsHolder addDependent:self. |
|
300 |
]. |
|
301 |
^ markApplicationsHolder. |
|
302 |
! |
|
303 |
||
304 |
markApplicationsHolder:aValueHolder |
|
305 |
markApplicationsHolder notNil ifTrue:[ |
|
306 |
markApplicationsHolder removeDependent:self |
|
307 |
]. |
|
308 |
markApplicationsHolder := aValueHolder. |
|
309 |
markApplicationsHolder notNil ifTrue:[ |
|
310 |
markApplicationsHolder addDependent:self |
|
311 |
]. |
|
312 |
||
313 |
"Created: / 24.2.2000 / 15:06:46 / cg" |
|
314 |
! |
|
315 |
||
316 |
meta |
|
317 |
meta isNil ifTrue:[ |
|
318 |
meta := false asValue. |
|
319 |
meta addDependent:self |
|
320 |
]. |
|
321 |
^ meta |
|
322 |
||
323 |
"Modified: / 31.1.2000 / 01:19:59 / cg" |
|
324 |
"Created: / 5.2.2000 / 13:42:16 / cg" |
|
325 |
! |
|
326 |
||
327 |
meta:aValueHolder |
|
328 |
"/ (aValueHolder == true or:[aValueHolder == false]) ifTrue:[self halt]. |
|
329 |
||
330 |
meta notNil ifTrue:[ |
|
331 |
meta removeDependent:self |
|
332 |
]. |
|
333 |
meta := aValueHolder. |
|
334 |
meta notNil ifTrue:[ |
|
335 |
meta addDependent:self |
|
336 |
]. |
|
337 |
! |
|
338 |
||
9371 | 339 |
selectClass:aClass |
340 |
self selectedClasses value:(Array with:aClass) |
|
341 |
! |
|
342 |
||
5591 | 343 |
selectedClassNameIndices |
344 |
selectedClassNameIndices isNil ifTrue:[ |
|
345 |
selectedClassNameIndices := #() asValue. |
|
346 |
selectedClassNameIndices addDependent:self |
|
347 |
]. |
|
348 |
^ selectedClassNameIndices. |
|
349 |
||
350 |
"Created: / 5.2.2000 / 21:31:48 / cg" |
|
351 |
"Modified: / 5.2.2000 / 21:43:02 / cg" |
|
352 |
! |
|
353 |
||
354 |
selectedClasses |
|
9371 | 355 |
"bad name- its a holder, baby" |
356 |
||
5591 | 357 |
^ self selectionHolder |
358 |
! |
|
359 |
||
360 |
selectedClasses:aValueHolder |
|
9371 | 361 |
"bad name- its a holder, baby" |
362 |
||
5591 | 363 |
^ self selectionHolder:aValueHolder |
364 |
! |
|
365 |
||
366 |
showClassPackages |
|
367 |
showClassPackages isNil ifTrue:[ |
|
368 |
showClassPackages := false asValue. |
|
369 |
showClassPackages addDependent:self. |
|
370 |
]. |
|
371 |
^ showClassPackages. |
|
372 |
||
373 |
"Created: / 24.2.2000 / 15:06:44 / cg" |
|
374 |
! |
|
375 |
||
376 |
showClassPackages:aValueHolder |
|
377 |
showClassPackages notNil ifTrue:[ |
|
378 |
showClassPackages removeDependent:self |
|
379 |
]. |
|
380 |
showClassPackages := aValueHolder. |
|
381 |
showClassPackages notNil ifTrue:[ |
|
382 |
showClassPackages addDependent:self |
|
383 |
]. |
|
9431 | 384 |
! |
385 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
386 |
sortByNameAndInheritance |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
387 |
sortByNameAndInheritance isNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
388 |
sortByNameAndInheritance := false asValue. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
389 |
sortByNameAndInheritance addDependent:self. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
390 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
391 |
^ sortByNameAndInheritance. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
392 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
393 |
"Created: / 04-07-2011 / 18:28:15 / cg" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
394 |
! |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
395 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
396 |
sortByNameAndInheritance:aValueHolder |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
397 |
sortByNameAndInheritance notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
398 |
sortByNameAndInheritance removeDependent:self |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
399 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
400 |
sortByNameAndInheritance := aValueHolder. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
401 |
sortByNameAndInheritance notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
402 |
sortByNameAndInheritance addDependent:self |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
403 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
404 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
405 |
"Created: / 04-07-2011 / 18:33:43 / cg" |
5591 | 406 |
! ! |
407 |
||
408 |
!ClassList methodsFor:'change & update'! |
|
409 |
||
410 |
classDefinitionChanged:aClassOrNil |
|
411 |
||
412 |
listValid ifFalse:[^ self]. |
|
413 |
||
414 |
slaveMode value == true ifTrue:[ |
|
5592 | 415 |
self invalidateList. |
416 |
^ self. |
|
5591 | 417 |
]. |
418 |
self slaveMode value isNil ifTrue:[ |
|
5592 | 419 |
self window shown ifFalse:[ |
420 |
self invalidateList. |
|
421 |
^ self |
|
422 |
]. |
|
5591 | 423 |
]. |
424 |
||
425 |
aClassOrNil isNil ifTrue:[ |
|
5592 | 426 |
self halt:'should not happen'. |
5591 | 427 |
]. |
428 |
||
429 |
"/ if that class is in my list ... |
|
430 |
((self classList value ? #()) contains:[:cls | cls notNil and:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name]]) |
|
431 |
ifTrue:[ |
|
5592 | 432 |
self updateListsFor:aClassOrNil. |
433 |
"/ force update |
|
434 |
self selectedClassNameIndices value:(self selectedClassNameIndices value). |
|
5591 | 435 |
|
5592 | 436 |
((self selectedClasses value ? #()) contains:[:cls | cls notNil ifTrue:[cls theNonMetaclass name = aClassOrNil theNonMetaclass name] ifFalse:[false]]) |
437 |
ifTrue:[ |
|
438 |
self updateOutputGenerator |
|
439 |
]. |
|
5591 | 440 |
] ifFalse:[ |
5592 | 441 |
self invalidateList |
5591 | 442 |
] |
443 |
||
444 |
||
445 |
"Modified: / 29.2.2000 / 00:15:23 / cg" |
|
446 |
! |
|
447 |
||
448 |
classRemoved:aClass |
|
449 |
|list| |
|
450 |
||
451 |
list := self classList value. |
|
452 |
list notNil ifTrue:[ |
|
453 |
(list includesIdentical:aClass) ifTrue:[ |
|
454 |
self invalidateList. |
|
455 |
] |
|
456 |
] |
|
457 |
||
458 |
"Modified: / 25.2.2000 / 23:53:51 / cg" |
|
459 |
! |
|
460 |
||
461 |
delayedUpdate:something with:aParameter from:changedObject |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
462 |
|cls classes chgClass wg savedList| |
5591 | 463 |
|
464 |
classes := self classList value ? #(). |
|
465 |
||
466 |
self inSlaveModeOrInvisible ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
467 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
468 |
^ self. |
5591 | 469 |
]. |
470 |
||
471 |
"/ (self slaveMode value == true) ifTrue:[^ self]. |
|
472 |
"/ self slaveMode value isNil ifTrue:[ |
|
473 |
"/ self window shown ifFalse:[ |
|
474 |
"/ self invalidateList. |
|
475 |
"/ ^ self |
|
476 |
"/ ]. |
|
477 |
"/ ]. |
|
478 |
||
479 |
changedObject == slaveMode ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
480 |
listValid ~~ true ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
481 |
self enqueueDelayedUpdateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
482 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
483 |
self enqueueDelayedClassSelectionChanged. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
484 |
^ self |
5591 | 485 |
]. |
486 |
||
487 |
changedObject == Smalltalk ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
488 |
something == #methodInClass ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
489 |
^ self "no interest" |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
490 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
491 |
something == #methodInClassRemoved ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
492 |
"/ must update the list, if the methods package is different from |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
493 |
"/ the classes package (to undo any has-exension highlighting) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
494 |
cls := aParameter first. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
495 |
self updateListsFor:cls. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
496 |
^ self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
497 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
498 |
something == #organization ifTrue:[^ self "no interest" ]. |
5591 | 499 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
500 |
(something == #classDefinition |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
501 |
or:[something == #classVariables |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
502 |
or:[something == #newClass]]) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
503 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
504 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
505 |
self classDefinitionChanged:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
506 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
507 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
508 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
509 |
(something == #lastTestRunResult) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
510 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
511 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
512 |
self updateListsFor:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
513 |
"/ self classDefinitionChanged:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
514 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
515 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
516 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
517 |
something == #classRemove ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
518 |
"/ update my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
519 |
self classRemoved:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
520 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
521 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
522 |
something == #classRename ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
523 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
524 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
525 |
aParameter isArray ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
526 |
cls := aParameter at:1. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
527 |
self classDefinitionChanged:cls. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
528 |
] |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
529 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
530 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
531 |
]. |
5591 | 532 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
533 |
something == #projectOrganization ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
534 |
aParameter isNil ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
535 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
536 |
organizerMode value == #project ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
537 |
self enqueueDelayedUpdateOutputGenerator. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
538 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
539 |
^ self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
540 |
]. |
5591 | 541 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
542 |
cls := aParameter at:1. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
543 |
cls notNil ifTrue:[ "/ should not happen (but does occasionally) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
544 |
((classes includes:cls theMetaclass) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
545 |
or:[(classes includes:cls theNonMetaclass)]) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
546 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
547 |
organizerMode value == #project ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
548 |
self enqueueDelayedUpdateOutputGenerator. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
549 |
] |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
550 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
551 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
552 |
^ self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
553 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
554 |
^ self. |
5591 | 555 |
]. |
556 |
||
557 |
(something == #lastTestRunResult) ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
558 |
^ self |
5591 | 559 |
]. |
560 |
||
561 |
changedObject == ChangeSet ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
562 |
wg := self windowGroup. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
563 |
wg isNil ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
564 |
changedObject removeDependent:self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
565 |
] ifFalse:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
566 |
"/ react on changes of the changeSet to recolorize items |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
567 |
((something ~~ #addChange:) |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
568 |
or:[ |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
569 |
chgClass := aParameter changeClass. |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
570 |
chgClass notNil |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
571 |
and:[ (classes includes:chgClass theNonMetaclass) |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
572 |
or:[classes includes:chgClass theMetaclass]] |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
573 |
] |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
574 |
) ifTrue:[ |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
575 |
wg sensor |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
576 |
flushEventsFor:self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
577 |
where:[:ev | ev isMessageSendEvent |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
578 |
and:[ev selector == #delayedUpdate:with:from: |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
579 |
and:[(ev arguments at:3) == ChangeSet]]]. |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
580 |
self enqueueDelayedAction:[self reconstructNameList]. |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
581 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
582 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
583 |
^ self |
5591 | 584 |
]. |
585 |
||
586 |
changedObject == self selectedClasses ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
587 |
slaveMode value ~~ true ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
588 |
savedList := self selectedClasses value. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
589 |
lastSelectedClasses := nil. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
590 |
listValid == true ifFalse:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
591 |
self updateList |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
592 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
593 |
self selectedClasses setValue:savedList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
594 |
self selectedClassesChanged. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
595 |
self updateOutputGenerator. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
596 |
] ifFalse:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
597 |
listValid := false. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
598 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
599 |
^ self |
5591 | 600 |
]. |
601 |
||
602 |
(changedObject == meta |
|
603 |
or:[changedObject == selectedClassNameIndices]) ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
604 |
self selectionChanged. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
605 |
^ self |
5591 | 606 |
]. |
607 |
changedObject == showClassPackages ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
608 |
self classNameList value:nil. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
609 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
610 |
^ self |
5591 | 611 |
]. |
612 |
||
613 |
(changedObject == hideUnloadedClasses |
|
614 |
or:[changedObject == hidePrivateClasses |
|
615 |
or:[changedObject == nameSpaceFilter |
|
616 |
or:[changedObject == packageFilter]]]) ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
617 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
618 |
^ self |
5591 | 619 |
]. |
620 |
||
621 |
super delayedUpdate:something with:aParameter from:changedObject |
|
622 |
||
623 |
"Modified: / 13.11.2001 / 11:32:10 / cg" |
|
624 |
! |
|
625 |
||
626 |
enqueueDelayedClassSelectionChanged |
|
627 |
(NewSystemBrowser synchronousUpdate == true |
|
628 |
or:[ immediateUpdate value == true ]) |
|
629 |
ifTrue:[ |
|
6716 | 630 |
self selectedClassesChanged. |
631 |
^ self. |
|
5591 | 632 |
]. |
633 |
||
634 |
self enqueueMessage:#selectedClassesChanged for:self arguments:#() |
|
635 |
! |
|
636 |
||
637 |
getSelectedClassIndicesFromClasses |
|
638 |
"the class selection has changed; |
|
639 |
return a collection of selection-indices" |
|
640 |
||
641 |
|classes selectedClasses numSelected| |
|
642 |
||
643 |
classes := self classList value. |
|
644 |
selectedClasses := self selectedClasses value. |
|
645 |
||
646 |
numSelected := selectedClasses size. |
|
647 |
numSelected == 0 ifTrue:[ |
|
648 |
^ #() |
|
649 |
]. |
|
650 |
||
651 |
numSelected == classes size ifTrue:[ |
|
652 |
"/ all selected - easy |
|
653 |
^ (1 to:numSelected) asOrderedCollection |
|
654 |
]. |
|
655 |
meta value ifTrue:[ |
|
656 |
classes := classes collect:[:eachClass | eachClass theMetaclass]. |
|
657 |
]. |
|
658 |
||
659 |
classes := selectedClasses collect:[:aSelectedClass | classes identityIndexOf:aSelectedClass.]. |
|
660 |
classes := classes select:[:idx | idx ~= 0]. |
|
661 |
^ classes |
|
662 |
||
663 |
"Created: / 24.2.2000 / 19:47:52 / cg" |
|
664 |
! |
|
665 |
||
666 |
getSelectedClassesFromIndices |
|
667 |
"the selection-index collection has changed; |
|
668 |
return a collection of corresponding classes" |
|
669 |
||
670 |
|selected classes allEntrySelected isMeta anyLost selectedClassNameIndices| |
|
671 |
||
672 |
allEntrySelected := false. |
|
673 |
||
674 |
classes := classList value. |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
675 |
classes isNil ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
676 |
self updateList. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
677 |
classes := classList value. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
678 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
679 |
|
5591 | 680 |
isMeta := meta value. |
681 |
anyLost := false. |
|
682 |
||
683 |
selectedClassNameIndices := self selectedClassNameIndices value. |
|
684 |
selectedClassNameIndices size == classes size ifTrue:[ |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
685 |
selectedClassNameIndices size == 0 ifTrue:[^ #()]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
686 |
isMeta ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
687 |
^ classes collect:[:eachClass | eachClass theMetaclass]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
688 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
689 |
^ classes collect:[:eachClass | eachClass theNonMetaclass]. |
5591 | 690 |
]. |
691 |
||
692 |
selected := selectedClassNameIndices |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
693 |
collect:[:idx | |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
694 |
|cls| |
5591 | 695 |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
696 |
cls := classes at:idx. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
697 |
cls == (self class nameListEntryForALL) ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
698 |
allEntrySelected := true. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
699 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
700 |
cls notNil ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
701 |
isMeta ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
702 |
cls := cls theMetaclass |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
703 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
704 |
cls := cls theNonMetaclass |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
705 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
706 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
707 |
anyLost := true |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
708 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
709 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
710 |
cls |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
711 |
]. |
5591 | 712 |
anyLost ifTrue:[ |
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
713 |
selected := selected select:[:each | each notNil]. |
5591 | 714 |
]. |
715 |
||
716 |
"/ allEntrySelected ifTrue:[ |
|
717 |
"/ selected := classList value select:[:cls | cls ~~ AllEntry]. |
|
718 |
"/ meta value ifTrue:[ |
|
719 |
"/ selected := selected collect:[:cls | cls theMetaclass]. |
|
720 |
"/ ] ifFalse:[ |
|
721 |
"/ selected := selected collect:[:cls | cls theNonMetaclass]. |
|
722 |
"/ ]. |
|
723 |
"/ ]. |
|
724 |
||
725 |
^ selected. |
|
726 |
||
727 |
"Created: / 24.2.2000 / 19:43:37 / cg" |
|
728 |
! |
|
729 |
||
730 |
selectedClassesChanged |
|
731 |
|indices selectedClassNameIndicesHolder| |
|
732 |
||
733 |
self classList value size == 0 ifTrue:[ |
|
734 |
"/ this may happen during early startup, |
|
735 |
"/ when invoked with a preset classSelection, |
|
736 |
"/ and the classGenerator has not yet been setup |
|
737 |
"/ to not clobber the selection, defer the update |
|
738 |
"/ until the classList arrives ... |
|
739 |
^ self |
|
740 |
]. |
|
741 |
"/ lastSelectedClasses := self selectedClasses value copy. |
|
742 |
||
743 |
indices := self getSelectedClassIndicesFromClasses. |
|
744 |
selectedClassNameIndicesHolder := self selectedClassNameIndices. |
|
745 |
selectedClassNameIndicesHolder value ~= indices ifTrue:[ |
|
746 |
"/ in slaveMode, do not update selectedClasses from indices |
|
747 |
true "slaveMode value" ifTrue:[ |
|
748 |
selectedClassNameIndicesHolder value:indices withoutNotifying:self |
|
749 |
] ifFalse:[ |
|
750 |
selectedClassNameIndicesHolder value:indices. |
|
751 |
] |
|
752 |
] |
|
753 |
||
754 |
"Created: / 13.2.2000 / 22:18:10 / cg" |
|
755 |
"Modified: / 24.2.2000 / 19:48:56 / cg" |
|
756 |
! |
|
757 |
||
758 |
selectionChanged |
|
759 |
"the lists selection has changed. Since the list uses indices, |
|
760 |
update the corresponding selectedClasses collection" |
|
761 |
||
762 |
|selected prevSelection selectedClassesHolder| |
|
763 |
||
764 |
selectedClassesHolder := self selectedClasses. |
|
765 |
||
766 |
selected := self getSelectedClassesFromIndices. |
|
767 |
||
768 |
prevSelection := selectedClassesHolder value ? #(). |
|
769 |
||
770 |
prevSelection ~= selected ifTrue:[ |
|
8752 | 771 |
selectedClassesHolder value:selected. |
5591 | 772 |
]. |
773 |
! |
|
774 |
||
775 |
selectionChangedByClick |
|
776 |
"we are not interested in that - get another notification |
|
777 |
via the changed valueHolder" |
|
778 |
||
779 |
|selected master| |
|
780 |
||
781 |
selected := self getSelectedClassesFromIndices. |
|
782 |
(selected = lastSelectedClasses and:[selected size == 1]) |
|
783 |
ifTrue:[ |
|
784 |
"/ thats a kludge - we want to turn off the protocol selection, |
|
785 |
"/ when a class is reselected. |
|
786 |
||
787 |
masterApplication notNil ifTrue:[ |
|
788 |
master := masterApplication. |
|
789 |
masterApplication masterApplication notNil ifTrue:[ |
|
790 |
master := masterApplication masterApplication. |
|
791 |
]. |
|
792 |
(master respondsTo:#classReselected) ifTrue:[ |
|
793 |
master classReselected. |
|
794 |
]. |
|
795 |
] |
|
796 |
] ifFalse:[ |
|
797 |
lastSelectedClasses := selected copy. |
|
798 |
] |
|
799 |
! |
|
800 |
||
801 |
update:something with:aParameter from:changedObject |
|
10367 | 802 |
|cls sel mthd newMethod oldMethod idx classListValue| |
5591 | 803 |
|
804 |
self slaveMode value == true ifTrue:[ |
|
6847 | 805 |
something == #methodInClass ifTrue:[ ^ self ]. |
806 |
something == #addChange: ifTrue:[ self invalidateList. ^ self ]. |
|
11978
4ff5f53f23a9
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11967
diff
changeset
|
807 |
something == #methodCoverageInfo ifTrue:[ self invalidateList. ^ self ]. |
5591 | 808 |
]. |
809 |
"/ self window sensor isNil ifTrue:[ |
|
810 |
"/ "/ not visible ... |
|
811 |
"/ self invalidateList. |
|
812 |
"/ ^ self |
|
813 |
"/ ]. |
|
814 |
||
815 |
classListValue := classList value. |
|
816 |
||
817 |
changedObject == Smalltalk ifTrue:[ |
|
6847 | 818 |
something == #classComment ifTrue:[ |
819 |
^ self. |
|
820 |
]. |
|
821 |
something == #methodDictionary ifTrue:[ |
|
822 |
^ self |
|
823 |
]. |
|
824 |
something == #methodTrap ifTrue:[ |
|
825 |
^ self |
|
826 |
]. |
|
11556
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
827 |
something == #coverageInfo ifTrue:[ |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
828 |
listValid == true ifTrue:[ |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
829 |
self enqueueDelayedUpdateList |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
830 |
]. |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
831 |
^ self. |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
832 |
]. |
10367 | 833 |
something == #methodCoverageInfo ifTrue:[ |
834 |
listValid == true ifTrue:[ |
|
11556
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
835 |
mthd := aParameter. |
10367 | 836 |
cls := mthd mclass. |
837 |
cls notNil ifTrue:[ |
|
838 |
classListValue size > 0 ifTrue:[ |
|
839 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
840 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
841 |
self enqueueDelayedUpdateList |
|
842 |
] |
|
843 |
] |
|
844 |
]. |
|
845 |
]. |
|
846 |
^ self |
|
847 |
]. |
|
6847 | 848 |
something == #lastTestRunResult ifTrue:[ |
849 |
cls := aParameter at:1. |
|
850 |
sel := aParameter at:2. |
|
851 |
(cls notNil and:[sel isNil]) ifTrue:[ |
|
852 |
classListValue size > 0 ifTrue:[ |
|
853 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
854 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
855 |
self enqueueDelayedUpdateList |
|
856 |
] |
|
857 |
] |
|
858 |
]. |
|
859 |
^ self |
|
860 |
]. |
|
861 |
||
862 |
something == #methodInClassRemoved ifTrue:[ |
|
863 |
cls := aParameter at:1. |
|
864 |
cls notNil ifTrue:[ |
|
865 |
classListValue size > 0 ifTrue:[ |
|
866 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
867 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
868 |
self enqueueDelayedUpdateList |
|
869 |
] |
|
870 |
] |
|
871 |
]. |
|
872 |
^ self |
|
873 |
]. |
|
5591 | 874 |
|
6847 | 875 |
something == #methodInClass ifTrue:[ |
876 |
cls := aParameter at:1. |
|
877 |
cls notNil ifTrue:[ |
|
878 |
classListValue size > 0 ifTrue:[ |
|
879 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
880 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
881 |
newMethod := cls compiledMethodAt:(aParameter at:2). |
|
882 |
oldMethod := aParameter at:3. |
|
883 |
((oldMethod isNil |
|
884 |
and:[newMethod package ~= cls package]) |
|
885 |
or:[oldMethod notNil |
|
886 |
and:[newMethod package ~= oldMethod package]]) |
|
887 |
ifTrue:[ |
|
888 |
"/ must update the list (for the package-info) |
|
889 |
self enqueueDelayedUpdateList |
|
890 |
] |
|
891 |
] |
|
892 |
] |
|
893 |
]. |
|
894 |
^ self |
|
895 |
]. |
|
5591 | 896 |
|
6847 | 897 |
"/ kludge: must be careful if my inGenerator is a constant list. |
898 |
"/ in that case, I have to update it |
|
899 |
"/ (sigh - all a consequence of not #becoming the new class) |
|
900 |
((something == #classDefinition) or:[something == #newClass]) ifTrue:[ |
|
901 |
inGeneratorHolder value isOrderedCollection ifTrue:[ |
|
902 |
idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name]. |
|
903 |
idx ~~ 0 ifTrue:[ |
|
904 |
inGeneratorHolder value at:idx put:aParameter. |
|
905 |
self updateListsFor:aParameter. |
|
906 |
"/ self enqueueDelayedUpdateList. |
|
907 |
] |
|
908 |
] ifFalse:[ |
|
909 |
classListValue size > 0 ifTrue:[ |
|
910 |
idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name]. |
|
911 |
idx ~~ 0 ifTrue:[ |
|
912 |
listValid ifTrue:[ |
|
913 |
self classDefinitionChanged:aParameter. |
|
914 |
^ self. |
|
915 |
] |
|
916 |
] |
|
917 |
]. |
|
918 |
]. |
|
919 |
]. |
|
5591 | 920 |
]. |
921 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
922 |
changedObject == sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
923 |
self invalidateList. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
924 |
^ self. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
925 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
926 |
|
5591 | 927 |
super update:something with:aParameter from:changedObject |
928 |
||
11561 | 929 |
"Modified: / 05-06-2012 / 23:39:34 / cg" |
5591 | 930 |
! ! |
931 |
||
932 |
!ClassList methodsFor:'drag & drop'! |
|
933 |
||
6468 | 934 |
canDropContext:aDropContext |
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
935 |
|objects| |
5591 | 936 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
937 |
objects := aDropContext dropObjects collect:[:obj | obj theObject]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
938 |
(objects conform:[:anObject | anObject isMethod]) ifTrue:[ |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
939 |
|methods cls| |
5591 | 940 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
941 |
methods := objects. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
942 |
cls := self classAtTargetPointOf:aDropContext. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
943 |
cls isNil ifTrue:[^ false]. |
5591 | 944 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
945 |
^ methods contains:[:aMethod | aMethod mclass ~= cls] |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
946 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
947 |
(self objectsAreClassFiles:objects) ifTrue:[^ true]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
948 |
^ false. |
7121 | 949 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
950 |
"Modified: / 17-10-2006 / 18:26:07 / cg" |
5591 | 951 |
! |
952 |
||
953 |
classAtTargetPointOf:aDropContext |
|
954 |
|p classListView lineNr cls| |
|
955 |
||
956 |
p := aDropContext targetPoint. |
|
957 |
||
958 |
classListView := aDropContext targetWidget. |
|
959 |
||
960 |
lineNr := classListView lineAtY:p y. |
|
961 |
lineNr isNil ifTrue:[^ nil]. |
|
962 |
||
963 |
cls := classList value at:lineNr. |
|
964 |
^ cls |
|
965 |
! |
|
966 |
||
6468 | 967 |
doDropContext:aDropContext |
8598 | 968 |
|objects browser| |
969 |
||
970 |
browser := self masterApplication. |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
971 |
|
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
972 |
objects := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
973 |
(objects conform:[:something | something isMethod]) ifTrue:[ |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
974 |
|cls methods| |
5591 | 975 |
|
7436 | 976 |
methods := objects. |
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
977 |
cls := self classAtTargetPointOf:aDropContext. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
978 |
methods first mclass isMeta ifTrue:[ |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
979 |
cls := cls theMetaclass |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
980 |
]. |
5591 | 981 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
982 |
cls notNil ifTrue:[ |
8945 | 983 |
methods := methods reject:[:mthd | mthd mclass theNonMetaclass == cls theNonMetaclass]. |
984 |
methods notEmpty ifTrue:[ |
|
985 |
aDropContext dragType == DropContext dragTypeCopy ifTrue:[ |
|
986 |
browser copyMethods:methods toClass:cls. |
|
987 |
] ifFalse:[ |
|
988 |
browser moveMethods:methods toClass:cls. |
|
989 |
]. |
|
990 |
] |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
991 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
992 |
^ self |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
993 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
994 |
(objects conform:[:something | something isFilename]) ifTrue:[ |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
995 |
self dropClassFiles:objects. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
996 |
^ self |
5591 | 997 |
]. |
998 |
||
7436 | 999 |
"Modified: / 21-10-2006 / 20:39:55 / cg" |
5591 | 1000 |
! ! |
1001 |
||
1002 |
!ClassList methodsFor:'generators'! |
|
1003 |
||
1004 |
makeGenerator |
|
1005 |
"return a generator which enumerates the method categories from the selected class; |
|
1006 |
that generator generates 2-element elements (includes the class), in order |
|
1007 |
to make the consumers only depend on one input (i.e. no need for another |
|
1008 |
classHolder in the methodList)." |
|
1009 |
||
8752 | 1010 |
^ Iterator |
1011 |
on:[:whatToDo | |
|
11938 | 1012 |
|allEntry classes cls already anyMethod packages classIsInPackage showChanged changedClasses| |
5591 | 1013 |
|
8752 | 1014 |
allEntry := self class nameListEntryForALL. |
11938 | 1015 |
changedClasses := ChangeSet current changedClasses. |
5591 | 1016 |
|
8752 | 1017 |
classes := self selectedClasses value ? #(). |
1018 |
packages := packageFilter value value. |
|
1019 |
(packages notNil and:[packages includes:allEntry]) ifTrue:[packages := nil]. |
|
1020 |
showChanged := packages notNil and:[packages includes:NavigatorModel nameListEntryForChanged]. |
|
5591 | 1021 |
|
8752 | 1022 |
classes do:[:cls | |
1023 |
(cls notNil and:[cls ~~ allEntry]) ifTrue:[ |
|
1024 |
anyMethod := false. |
|
1025 |
classIsInPackage := packages isNil |
|
1026 |
or:[(packages includes:cls package) |
|
11938 | 1027 |
or:[ showChanged and:[changedClasses includes:cls]] ]. |
5591 | 1028 |
|
8752 | 1029 |
cls theNonMetaclass isJavaClass ifTrue:[ |
1030 |
cls isMeta ifTrue:[ |
|
1031 |
whatToDo value:cls theNonMetaclass value:(self class nameListEntryForStatic). |
|
1032 |
] ifFalse:[ |
|
1033 |
whatToDo value:cls value:(self class nameListEntryForNonStatic). |
|
1034 |
] |
|
1035 |
] ifFalse:[ |
|
1036 |
cls supportsMethodCategories ifTrue:[ |
|
1037 |
already := Set new. |
|
1038 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
|
1039 |
|cat| |
|
5591 | 1040 |
|
8752 | 1041 |
cat := mthd category. |
1042 |
(already includes:cat) ifFalse:[ |
|
1043 |
(classIsInPackage |
|
1044 |
or:[packages isNil |
|
1045 |
or:[packages includes:mthd package]]) |
|
1046 |
ifTrue:[ |
|
1047 |
already add:cat. |
|
1048 |
whatToDo value:cls value:cat. |
|
1049 |
] |
|
1050 |
] |
|
1051 |
]. |
|
1052 |
] ifFalse:[ |
|
1053 |
whatToDo value:cls value:(self class nameListEntryForNILCategory). |
|
1054 |
]. |
|
1055 |
]. |
|
1056 |
||
1057 |
anyMethod ifFalse:[ |
|
1058 |
"/ tell the one below, which classes are seen here, |
|
1059 |
"/ (even if no method is present) |
|
1060 |
"/ to allow him to decide if the className is to be shown in the list |
|
1061 |
whatToDo value:cls value:nil. |
|
1062 |
]. |
|
1063 |
]. |
|
1064 |
]. |
|
1065 |
] |
|
5591 | 1066 |
|
1067 |
"Modified: / 24.2.2000 / 23:18:26 / cg" |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1068 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1069 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1070 |
makeGeneratorForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1071 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1072 |
^ Iterator |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1073 |
on:[:whatToDo | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1074 |
|allEntry classes cls already packages classIsInPackage showChanged cat | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1075 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1076 |
allEntry := self class nameListEntryForALL. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1077 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1078 |
classes := self selectedClasses value ? #(). |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1079 |
packages := packageFilter value value. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1080 |
(packages notNil and:[packages includes:allEntry]) ifTrue:[packages := nil]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1081 |
showChanged := packages notNil and:[packages includes:NavigatorModel nameListEntryForChanged]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1082 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1083 |
classes do:[:cls | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1084 |
(cls notNil and:[cls ~~ allEntry]) ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1085 |
classIsInPackage := packages isNil |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1086 |
or:[(packages includes:cls package) |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1087 |
or:[ showChanged and:[ChangeSet current changedClasses includes:cls]] ]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1088 |
cls isMeta ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1089 |
cat := self class nameListEntryForStatic. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1090 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1091 |
cat := self class nameListEntryForNonStatic. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1092 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1093 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1094 |
whatToDo value:cls value:cat value:sel value:mthd. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1095 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1096 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1097 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1098 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1099 |
] |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1100 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1101 |
"Modified: / 24-02-2000 / 23:18:26 / cg" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1102 |
"Created: / 07-08-2011 / 19:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1103 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1104 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1105 |
outGeneratorHolderForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1106 |
^ outGeneratorHolderForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1107 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1108 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1109 |
outGeneratorHolderForMethods:something |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1110 |
outGeneratorHolderForMethods := something. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1111 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1112 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1113 |
updateOutputGenerator |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1114 |
"create a generator which enumerates my elements, |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1115 |
and place it into the outputGenerator holder" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1116 |
|
11918
46ef9b23af7a
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11881
diff
changeset
|
1117 |
super updateOutputGenerator. |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1118 |
outGeneratorHolderForMethods notNil ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1119 |
outGeneratorHolderForMethods value: self makeGeneratorForMethods. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1120 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1121 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1122 |
"Modified: / 04-02-2000 / 17:16:34 / cg" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1123 |
"Created: / 05-02-2000 / 13:42:08 / cg" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1124 |
"Created: / 07-08-2011 / 18:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1125 |
! ! |
1126 |
||
11259 | 1127 |
!ClassList methodsFor:'initialize-release'! |
1128 |
||
1129 |
release |
|
1130 |
super release. |
|
1131 |
||
1132 |
currentNamespace removeDependent:self. |
|
1133 |
sortByNameAndInheritance removeDependent:self. |
|
1134 |
hidePrivateClasses removeDependent:self. |
|
1135 |
markApplicationsHolder removeDependent:self. |
|
1136 |
meta removeDependent:self. |
|
1137 |
selectedClassNameIndices removeDependent:self. |
|
1138 |
showClassPackages removeDependent:self. |
|
1139 |
||
1140 |
"Created: / 05-02-2000 / 13:42:18 / cg" |
|
1141 |
! ! |
|
1142 |
||
5591 | 1143 |
!ClassList methodsFor:'private'! |
1144 |
||
1145 |
listOfClasses |
|
1146 |
|classesAlready classesOrdered generator nameSpaceFilter packageFilter allName hidePrivate |
|
9761 | 1147 |
privateClassesPerClass nameFilterIncludesMatchCharacters lcNameFilter| |
5591 | 1148 |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1149 |
self sortByNameAndInheritance value ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1150 |
^ self listOfClassesByInheritance |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1151 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1152 |
|
5591 | 1153 |
allName := self class nameListEntryForALL. |
7708 | 1154 |
(self showAllClassesInNameSpaceOrganisation value) ifFalse:[ |
1155 |
nameSpaceFilter := self nameSpaceFilter value. |
|
1156 |
nameSpaceFilter notNil ifTrue:[ |
|
1157 |
(nameSpaceFilter includes:allName) ifTrue:[ |
|
1158 |
nameSpaceFilter := nil |
|
1159 |
]. |
|
1160 |
]. |
|
5591 | 1161 |
]. |
8752 | 1162 |
"/ packageFilter := self packageFilter value. |
1163 |
"/ packageFilter notNil ifTrue:[ |
|
1164 |
"/ (packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
|
1165 |
"/ ]. |
|
5591 | 1166 |
|
1167 |
inGeneratorHolder isNil ifTrue:[ |
|
6879 | 1168 |
"/ for standAlone testing |
1169 |
generator := Smalltalk allClasses. |
|
1170 |
(self hideUnloadedClasses value) ifTrue:[ |
|
1171 |
generator := generator select:[:cls | cls isLoaded] |
|
1172 |
]. |
|
5591 | 1173 |
] ifFalse:[ |
6879 | 1174 |
generator := inGeneratorHolder value. |
1175 |
generator isNil ifTrue:[^ #() ]. |
|
5591 | 1176 |
]. |
1177 |
||
1178 |
classesAlready := IdentitySet new. |
|
1179 |
classesOrdered := OrderedCollection new. |
|
1180 |
hidePrivate := self hidePrivateClasses value. |
|
1181 |
||
1182 |
privateClassesPerClass := IdentityDictionary new. |
|
9759 | 1183 |
nameFilterIncludesMatchCharacters := nameFilter notNil and:[nameFilter includesMatchCharacters]. |
9761 | 1184 |
nameFilter notNil ifTrue:[ lcNameFilter := nameFilter asLowercase]. |
5591 | 1185 |
|
1186 |
generator do:[:cls | |
|
6879 | 1187 |
|owner bucket| |
5591 | 1188 |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1189 |
"JV@2011-08-07: FIXME: Ugly code, hard to extend!! And duplicated in listOfClassesByInheritance !!!!!!!!" |
6879 | 1190 |
(hidePrivate not or:[cls isPrivate not]) |
1191 |
ifTrue:[ |
|
1192 |
(nameSpaceFilter isNil |
|
1193 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
1194 |
(packageFilter isNil |
|
1195 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
1196 |
(classesAlready includes:cls) ifFalse:[ |
|
8167 | 1197 |
(classFilterBlock isNil |
1198 |
or:[(classFilterBlock value:cls)]) ifTrue:[ |
|
8166
f90857fb2227
added a rejectedPackages filter
Claus Gittinger <cg@exept.de>
parents:
8072
diff
changeset
|
1199 |
classesAlready add:cls. |
9759 | 1200 |
(nameFilter isNil |
9761 | 1201 |
or:[ (nameFilterIncludesMatchCharacters not and:[ cls name asLowercase startsWith:lcNameFilter]) |
1202 |
or:[ (nameFilterIncludesMatchCharacters and:[nameFilter match:cls name ignoreCase:true]) ]]) ifTrue:[ |
|
9759 | 1203 |
(owner := cls owningClass) notNil ifTrue:[ |
1204 |
bucket := privateClassesPerClass |
|
1205 |
at:owner |
|
1206 |
ifAbsentPut:[SortedCollection new |
|
1207 |
sortBlock:[:a :b | (a name ? '?') < (b name ? '?')] ]. |
|
1208 |
bucket add:cls. |
|
1209 |
] ifFalse:[ |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1210 |
"Do not show Java anonymous classes" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1211 |
cls isJavaClass ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1212 |
cls isAnonymous ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1213 |
classesOrdered add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1214 |
] |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1215 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1216 |
classesOrdered add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1217 |
] |
9759 | 1218 |
] |
8166
f90857fb2227
added a rejectedPackages filter
Claus Gittinger <cg@exept.de>
parents:
8072
diff
changeset
|
1219 |
] |
6879 | 1220 |
] |
1221 |
] |
|
1222 |
] |
|
1223 |
] |
|
1224 |
] |
|
5591 | 1225 |
]. |
1226 |
||
8263
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1227 |
"/ are there any private classes, for which the owner is not in the list ? |
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1228 |
privateClassesPerClass keysAndValuesDo:[:eachOwnerClass :privateClasses| |
8274
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1229 |
(classesAlready includes:eachOwnerClass) ifFalse:[ |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1230 |
classesOrdered add:eachOwnerClass. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1231 |
classesAlready add:eachOwnerClass. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1232 |
"/ privateClasses do:[:privateClass | |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1233 |
"/ (classesOrdered includes:privateClass) ifFalse:[ |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1234 |
"/ classesOrdered add:privateClass. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1235 |
"/ ]. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1236 |
"/ ]. |
8263
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1237 |
]. |
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1238 |
]. |
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1239 |
|
5591 | 1240 |
classesOrdered size == 1 ifTrue:[ |
6879 | 1241 |
self classLabelHolder value:(classesOrdered first name) |
5591 | 1242 |
] ifFalse:[ |
1243 |
"/ self classLabelHolder value:(classes size printString , ' classes'). |
|
6879 | 1244 |
sortBy value ~~ #doNotSort ifTrue:[ |
1245 |
classesOrdered sort:[:a :b | a name < b name]. |
|
1246 |
] |
|
5591 | 1247 |
]. |
1248 |
||
1249 |
privateClassesPerClass notEmpty ifTrue:[ |
|
6879 | 1250 |
|stream action| |
5591 | 1251 |
|
6879 | 1252 |
stream := WriteStream on:(Array new). |
5591 | 1253 |
|
8752 | 1254 |
action := |
1255 |
[:eachClass | |
|
6879 | 1256 |
|bucket| |
5591 | 1257 |
|
6879 | 1258 |
stream nextPut:eachClass. |
8274
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1259 |
|
6879 | 1260 |
bucket := privateClassesPerClass at:eachClass ifAbsent:nil. |
1261 |
bucket notNil ifTrue:[ |
|
1262 |
bucket do:action. |
|
1263 |
] |
|
8752 | 1264 |
]. |
5591 | 1265 |
|
6879 | 1266 |
classesOrdered do:action. |
1267 |
classesOrdered := stream contents. |
|
5591 | 1268 |
]. |
1269 |
||
1270 |
"/ |
|
1271 |
"/ does not work (yet) |
|
1272 |
"/ classes addFirst:AllEntry. |
|
1273 |
^ classesOrdered |
|
1274 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1275 |
"Modified: / 04-07-2011 / 18:33:56 / cg" |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1276 |
"Modified (format): / 07-08-2011 / 16:02:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1277 |
! |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1278 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1279 |
listOfClassesByInheritance |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1280 |
"TODO: needs refatoring and common code extract with listOfClasses, |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1281 |
but I have no time at the moment..." |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1282 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1283 |
|classesAlready classes classesOrdered generator nameSpaceFilter packageFilter allName hidePrivate |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1284 |
privateClassesPerClass nameFilterIncludesMatchCharacters lcNameFilter| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1285 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1286 |
allName := self class nameListEntryForALL. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1287 |
nameSpaceFilter := self nameSpaceFilter value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1288 |
nameSpaceFilter notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1289 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1290 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1291 |
packageFilter := self packageFilter value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1292 |
packageFilter notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1293 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1294 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1295 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1296 |
inGeneratorHolder isNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1297 |
"/ for standAlone testing |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1298 |
generator := Smalltalk allClasses. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1299 |
(self hideUnloadedClasses value) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1300 |
generator := generator select:[:cls | cls isLoaded] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1301 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1302 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1303 |
generator := inGeneratorHolder value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1304 |
generator isNil ifTrue:[^ #() ]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1305 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1306 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1307 |
classesAlready := IdentitySet new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1308 |
classes := Set new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1309 |
classesOrdered := OrderedCollection new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1310 |
hidePrivate := self hidePrivateClasses value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1311 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1312 |
privateClassesPerClass := IdentityDictionary new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1313 |
nameFilterIncludesMatchCharacters := nameFilter notNil and:[nameFilter includesMatchCharacters]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1314 |
nameFilter notNil ifTrue:[ lcNameFilter := nameFilter asLowercase]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1315 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1316 |
generator do:[:cls | |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1317 |
|owner bucket| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1318 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1319 |
(hidePrivate not or:[cls isPrivate not]) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1320 |
ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1321 |
(nameSpaceFilter isNil |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1322 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1323 |
(packageFilter isNil |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1324 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1325 |
(classesAlready includes:cls) ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1326 |
classesAlready add:cls. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1327 |
(owner := cls owningClass) notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1328 |
bucket := privateClassesPerClass at:owner ifAbsentPut:[SortedCollection new sortBlock:[:a :b | a name < b name] ]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1329 |
bucket add:cls. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1330 |
] ifFalse:[ |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1331 |
cls isJavaClass ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1332 |
cls isAnonymous ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1333 |
classes add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1334 |
] |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1335 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1336 |
classes add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1337 |
] |
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1338 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1339 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1340 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1341 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1342 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1343 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1344 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1345 |
privateClassesPerClass keysAndValuesDo: |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1346 |
[:owner :privateClasses| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1347 |
(owner isPrivate not and:[(classes includes: owner) not]) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1348 |
ifTrue:[classes addAll: privateClasses]]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1349 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1350 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1351 |
classes size == 1 ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1352 |
classesOrdered := classes asArray. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1353 |
self classLabelHolder value:(classes first name) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1354 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1355 |
"/ self classLabelHolder value:(classes size printString , ' classes'). |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1356 |
" sortBy value ~~ #doNotSort ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1357 |
classesOrdered sort:[:a :b | a name < b name]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1358 |
]" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1359 |
classesOrdered := ClassSorter sort: classes. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1360 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1361 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1362 |
privateClassesPerClass notEmpty ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1363 |
|stream action| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1364 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1365 |
stream := WriteStream on:(Array new). |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1366 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1367 |
action := [:eachClass | |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1368 |
|bucket| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1369 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1370 |
stream nextPut:eachClass. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1371 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1372 |
bucket := privateClassesPerClass at:eachClass ifAbsent:nil. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1373 |
bucket notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1374 |
bucket do:action. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1375 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1376 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1377 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1378 |
classesOrdered do:action. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1379 |
classesOrdered := stream contents. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1380 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1381 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1382 |
"/ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1383 |
"/ does not work (yet) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1384 |
"/ classes addFirst:AllEntry. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1385 |
^ classesOrdered |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1386 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1387 |
"Modified: / 18-08-2000 / 20:34:10 / cg" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1388 |
"Modified: / 21-01-2008 / 19:43:04 / janfrog" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1389 |
"Modified: / 24-08-2010 / 20:17:07 / Jan Vrany <enter your email here>" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1390 |
"Created: / 04-07-2011 / 18:27:34 / cg" |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1391 |
"Modified: / 07-08-2011 / 16:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1392 |
! |
1393 |
||
1394 |
makeDependent |
|
1395 |
Smalltalk addDependent:self. |
|
1396 |
ChangeSet addDependent:self. |
|
1397 |
||
1398 |
"Created: / 5.2.2000 / 13:42:17 / cg" |
|
1399 |
! |
|
1400 |
||
1401 |
makeIndependent |
|
1402 |
Smalltalk removeDependent:self. |
|
1403 |
ChangeSet removeDependent:self. |
|
1404 |
! |
|
1405 |
||
1406 |
nameListForClasses:aClassList |
|
1407 |
|orgMode namespaces showNamespaces fullNameList nameList |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1408 |
filteredPackages filteredNameSpaces classesInRemoteChangeSet |
7708 | 1409 |
classNamesInChangeSet classNamesInRemoteChangeSet| |
5591 | 1410 |
|
1411 |
showNamespaces := false. |
|
1412 |
||
1413 |
filteredNameSpaces := nameSpaceFilter value. |
|
1414 |
(filteredNameSpaces isNil |
|
6738
8226c7e2907b
magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents:
6716
diff
changeset
|
1415 |
and:[self organizerMode value ~~ OrganizerCanvas organizerModeNamespace]) ifTrue:[ |
5950 | 1416 |
showNamespaces := true. "/ if no filter, always show the namespace. |
5591 | 1417 |
] ifFalse:[ |
5950 | 1418 |
(filteredNameSpaces size > 1 |
1419 |
or:[(filteredNameSpaces size > 0) |
|
1420 |
and:[filteredNameSpaces includes:(self class nameListEntryForALL)]]) ifTrue:[ |
|
1421 |
showNamespaces := true |
|
1422 |
] ifFalse:[ |
|
1423 |
"/ if there are classes from multiple namespaces, |
|
1424 |
"/ show the full name |
|
5591 | 1425 |
|
5950 | 1426 |
namespaces := IdentitySet new. |
1427 |
fullNameList := OrderedCollection new. |
|
5591 | 1428 |
|
5950 | 1429 |
aClassList |
1430 |
do:[:cls | |nm| |
|
1431 |
nm := cls nameInBrowser. |
|
1432 |
fullNameList add:nm. |
|
1433 |
namespaces add:cls topNameSpace. |
|
1434 |
]. |
|
1435 |
showNamespaces := namespaces size > 1 |
|
1436 |
]. |
|
5591 | 1437 |
]. |
1438 |
||
1439 |
orgMode := organizerMode value. |
|
1440 |
filteredPackages := packageFilter value value. |
|
1441 |
||
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1442 |
classNamesInChangeSet := ChangeSet current changedClasses |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1443 |
collect:[:each | each theNonMetaclass name]. |
5591 | 1444 |
|
7503 | 1445 |
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ]. |
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1446 |
classNamesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass name]. |
7503 | 1447 |
|
5591 | 1448 |
nameList := aClassList |
5950 | 1449 |
collect:[:cls | |
5591 | 1450 |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1451 |
|className nm pkg emPkg hasExtensions isInChangeSet isInRemoteChangeSet icon |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1452 |
clr| |
5591 | 1453 |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1454 |
className := cls theNonMetaclass name. |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1455 |
isInChangeSet := classNamesInChangeSet includes:className. |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1456 |
isInRemoteChangeSet := classNamesInRemoteChangeSet includes:className. |
5591 | 1457 |
|
5950 | 1458 |
nm := self nameListEntryFor:cls withNameSpace:showNamespaces. |
9431 | 1459 |
|
9437 | 1460 |
self showCoverageInformation value ifTrue:[ |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1461 |
clr := self colorForCoverageInformationOfClass:cls. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1462 |
clr notNil ifTrue:[ |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1463 |
nm := self colorize:nm with:#color -> clr |
9431 | 1464 |
]. |
11955
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1465 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1466 |
clr isNil ifTrue:[ |
9431 | 1467 |
isInChangeSet ifTrue:[ |
1468 |
nm := self emphasizeForChangedCode:nm |
|
1469 |
]. |
|
1470 |
isInRemoteChangeSet ifTrue:[ |
|
1471 |
nm := (self colorizeForChangedCodeInSmallTeam:'!! '),nm |
|
1472 |
]. |
|
7503 | 1473 |
]. |
5591 | 1474 |
|
6916 | 1475 |
pkg := cls package ? '-'. |
5950 | 1476 |
hasExtensions := cls hasExtensions. |
1477 |
hasExtensions ifTrue:[ |
|
1478 |
emPkg := self emphasizeForDifferentPackage:'+'. "/ self emphasizeForDifferentPackage:pkg. |
|
1479 |
]. |
|
5591 | 1480 |
|
6738
8226c7e2907b
magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents:
6716
diff
changeset
|
1481 |
orgMode == OrganizerCanvas organizerModeProject ifTrue:[ |
5950 | 1482 |
(filteredPackages notNil |
1483 |
and:[(filteredPackages includes:cls package) not]) ifTrue:[ |
|
1484 |
"/ class is in another packae; |
|
1485 |
"/ however, class is listed due to methods |
|
1486 |
"/ in the filtered package |
|
1487 |
hasExtensions ifTrue:[ |
|
1488 |
nm := nm , emPkg. |
|
1489 |
] ifFalse:[ |
|
1490 |
nm := nm , ' [ ' , pkg, ' ]'. |
|
1491 |
]. |
|
1492 |
] ifFalse:[ |
|
1493 |
"/ any methods from other packages in this class ? |
|
1494 |
hasExtensions ifTrue:[ |
|
1495 |
nm := nm , (self emphasizeForDifferentPackage:'+'). |
|
1496 |
]. |
|
1497 |
]. |
|
1498 |
] ifFalse:[ |
|
1499 |
showClassPackages value == true ifTrue:[ |
|
1500 |
"/ add the package; |
|
1501 |
hasExtensions ifTrue:[ |
|
6006 | 1502 |
nm := nm , ' [ ' , pkg, ' ]' , (self emphasizeForDifferentPackage:'+'). |
5950 | 1503 |
"/ isInChangeSet ifFalse:[ |
1504 |
"/ nm := self colorizeForDifferentPackage:nm |
|
1505 |
"/ ]. |
|
1506 |
] ifFalse:[ |
|
1507 |
nm := nm , (self colorizeGrey:(' [ ' , pkg, ' ]')). |
|
1508 |
]. |
|
1509 |
] ifFalse:[ |
|
1510 |
hasExtensions ifTrue:[ |
|
1511 |
nm := nm , emPkg. |
|
1512 |
"/ isInChangeSet ifFalse:[ |
|
1513 |
"/ nm := self colorizeForDifferentPackage:nm |
|
1514 |
"/ ] |
|
1515 |
]. |
|
1516 |
] |
|
1517 |
]. |
|
6879 | 1518 |
|
1519 |
isInChangeSet ifTrue:[ |
|
7055 | 1520 |
nm := nm , self class markForBeingInChangeList |
6879 | 1521 |
]. |
5591 | 1522 |
"/ cls isVisualStartable ifTrue:[ |
1523 |
"/ nm := LabelAndIcon icon:((SystemBrowser visualStartableClassIcon) |
|
1524 |
"/ onDevice:self window device) |
|
1525 |
"/ string:nm |
|
1526 |
"/ ]. |
|
5950 | 1527 |
markApplicationsHolder value== true ifTrue:[ |
6902 | 1528 |
icon := self iconForClass:cls theNonMetaclass. |
5950 | 1529 |
icon isNil ifTrue:[ |
1530 |
icon := SystemBrowser emptyIcon |
|
1531 |
]. |
|
1532 |
nm := LabelAndIcon icon:icon string:nm |
|
5591 | 1533 |
|
5950 | 1534 |
]. |
1535 |
nm |
|
1536 |
]. |
|
5591 | 1537 |
|
1538 |
^ nameList |
|
1539 |
||
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1540 |
"Modified: / 27-10-2012 / 12:32:20 / cg" |
5591 | 1541 |
! |
1542 |
||
1543 |
reconstructNameList |
|
8274
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1544 |
"only reconstruct the names - class list & selection remains unschanged. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1545 |
Invoked when the organizerMode mode changes" |
5591 | 1546 |
|
1547 |
|prevMode listView oldNameList newNameList sav| |
|
1548 |
||
1549 |
self classList value isNil ifTrue:[ |
|
8072 | 1550 |
self updateList |
5591 | 1551 |
]. |
1552 |
||
1553 |
newNameList := self nameListForClasses:(classList value ? #()). |
|
1554 |
oldNameList := self classNameList value ? #(). |
|
1555 |
(newNameList |
|
8072 | 1556 |
sameContentsAs: oldNameList |
1557 |
whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b) |
|
1558 |
and:[ a hasImage == b hasImage |
|
1559 |
and:[ a hasIcon == b hasIcon ]]] |
|
5591 | 1560 |
) |
1561 |
ifTrue:[ |
|
8072 | 1562 |
"/ no need to update |
5591 | 1563 |
] ifFalse:[ |
8072 | 1564 |
builder notNil ifTrue:[ |
1565 |
listView := builder componentAt:#List. |
|
1566 |
]. |
|
1567 |
(listView isNil or:[listView scrolledView isNil]) ifTrue:[ |
|
1568 |
"/ invoked very early during setup |
|
1569 |
self classNameList value:newNameList |
|
1570 |
] ifFalse:[ |
|
1571 |
"/ avoid flicker and useless redraws |
|
5591 | 1572 |
|
8072 | 1573 |
prevMode := listView scrollWhenUpdating. |
1574 |
listView scrollWhenUpdating:nil. |
|
5591 | 1575 |
|
8072 | 1576 |
"/ this will lead to a selectionIndex change (done by the selListView); |
1577 |
"/ however, we dont want this here, since it recurses into |
|
1578 |
"/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder... |
|
1579 |
[ |
|
1580 |
self selectedClassNameIndices removeDependent:self. |
|
1581 |
"/ also, dont want a callback (selectionChangedByClick) |
|
1582 |
sav := listView action. |
|
1583 |
listView action:nil. |
|
1584 |
self classNameList value:newNameList. |
|
1585 |
] ensure:[ |
|
1586 |
listView action:sav. |
|
1587 |
self selectedClassNameIndices addDependent:self. |
|
1588 |
listView scrollWhenUpdating:prevMode. |
|
1589 |
]. |
|
1590 |
] |
|
5591 | 1591 |
]. |
1592 |
||
1593 |
"Modified: / 31.10.2001 / 11:33:21 / cg" |
|
1594 |
! |
|
1595 |
||
1596 |
updateClassesIn:aCollection |
|
1597 |
"replace any obsolete class in aCollection; |
|
1598 |
return true, if any was found" |
|
1599 |
||
1600 |
|found meta classes| |
|
1601 |
||
1602 |
found := false. |
|
1603 |
||
1604 |
aCollection isSequenceable ifFalse:[ |
|
1605 |
classes := aCollection copy. |
|
1606 |
aCollection removeAll. |
|
1607 |
classes do:[:cls | |
|
1608 |
|newClass| |
|
1609 |
||
1610 |
meta := cls isMeta. |
|
1611 |
newClass := Smalltalk at:(cls theNonMetaclass name). |
|
1612 |
newClass isNil ifTrue:[ |
|
1613 |
newClass := cls |
|
1614 |
] ifFalse:[ |
|
1615 |
meta ifTrue:[ |
|
1616 |
newClass := newClass class |
|
1617 |
] |
|
1618 |
]. |
|
1619 |
found := cls ~~ newClass. |
|
1620 |
aCollection add:newClass. |
|
1621 |
]. |
|
1622 |
] ifTrue:[ |
|
1623 |
aCollection keysAndValuesDo:[:idx :cls | |
|
1624 |
|newClass| |
|
1625 |
||
1626 |
cls notNil ifTrue:[ |
|
1627 |
meta := cls isMeta. |
|
1628 |
newClass := Smalltalk at:(cls theNonMetaclass name). |
|
1629 |
newClass isNil ifTrue:[ |
|
1630 |
newClass := cls |
|
1631 |
] ifFalse:[ |
|
1632 |
meta ifTrue:[ |
|
1633 |
newClass := newClass class |
|
1634 |
] |
|
1635 |
]. |
|
1636 |
found := cls ~~ newClass. |
|
1637 |
aCollection at:idx put:newClass. |
|
1638 |
] |
|
1639 |
]. |
|
1640 |
]. |
|
1641 |
^ found |
|
1642 |
! |
|
1643 |
||
1644 |
updateList |
|
1645 |
|prevSelection oldList newList newSelectionIndices |
|
6712 | 1646 |
forceSelectionChange selectedClassNameIndicesHolder classList |
1647 |
classesAddedToList classesRemovedFromList newSet oldSet| |
|
5591 | 1648 |
|
1649 |
newList := self listOfClasses. |
|
1650 |
classList := self classList. |
|
1651 |
oldList := classList value ? #(). |
|
1652 |
||
6712 | 1653 |
autoSelect == true ifTrue:[ |
1654 |
classesRemovedFromList := OrderedCollection new. |
|
1655 |
newSet := newList asSet. |
|
1656 |
oldSet := oldList asSet. |
|
1657 |
classesAddedToList := newSet select:[:eachNewClass | (oldSet includes:eachNewClass) not]. |
|
1658 |
classesRemovedFromList := oldSet select:[:eachOldClass | (newSet includes:eachOldClass) not]. |
|
1659 |
]. |
|
1660 |
||
5591 | 1661 |
(newList ~= oldList |
1662 |
or:[self classNameList value isNil and:[newList size > 0]]) ifTrue:[ |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1663 |
prevSelection := lastSelectedClasses ? #(). |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1664 |
prevSelection := prevSelection select:[:each | each notNil]. |
5591 | 1665 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1666 |
(newList collect:[:each | each name]) = (oldList collect:[:each | each name]) ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1667 |
"/ no need to tell anybody |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1668 |
classList setValue:newList. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1669 |
] ifFalse:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1670 |
classList value:newList. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1671 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1672 |
self reconstructNameList. |
5591 | 1673 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1674 |
(prevSelection size == 0 |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1675 |
and:[self selectedClasses value size ~~ 0]) ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1676 |
"/ this happens during early startup time, |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1677 |
"/ when the selection is already (pre-)set, |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1678 |
"/ and the classList is generated the first time |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1679 |
"/ (i.e. when opened with preset selection) |
5591 | 1680 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1681 |
"/ do not clobber the selection in this case. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1682 |
prevSelection := self selectedClasses value. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1683 |
prevSelection := prevSelection select:[:cls | cls notNil]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1684 |
"/ simulate a change, to force selection update in listView |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1685 |
forceSelectionChange := true. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1686 |
]. |
5591 | 1687 |
|
6712 | 1688 |
autoSelect == true ifTrue:[ |
1689 |
prevSelection isNil ifTrue:[ |
|
1690 |
prevSelection := OrderedCollection new |
|
1691 |
]. |
|
1692 |
prevSelection := prevSelection asOrderedCollection. |
|
1693 |
||
1694 |
classesAddedToList do:[:eachNewClass | |
|
1695 |
(prevSelection includes:eachNewClass) ifFalse:[ |
|
1696 |
prevSelection add:eachNewClass. |
|
1697 |
]. |
|
1698 |
]. |
|
1699 |
classesRemovedFromList do:[:eachOldClass | |
|
1700 |
prevSelection remove:eachOldClass ifAbsent:[]. |
|
1701 |
]. |
|
1702 |
]. |
|
1703 |
||
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1704 |
newSelectionIndices := prevSelection |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1705 |
collect:[:item | |cls| |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1706 |
cls := Smalltalk at:item theNonMetaclass name. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1707 |
newList identityIndexOf:cls] |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1708 |
thenSelect:[:index | index ~~ 0]. |
5591 | 1709 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1710 |
selectedClassNameIndicesHolder := self selectedClassNameIndices. |
6749
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1711 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1712 |
((selectedClassNameIndicesHolder value size ~~ self selectedClasses value size) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1713 |
or:[newSelectionIndices ~= selectedClassNameIndicesHolder value]) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1714 |
ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1715 |
newSelectionIndices notEmpty ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1716 |
"/ force change (for dependents) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1717 |
"/ selectedClassNameIndicesHolder value:newSelectionIndices. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1718 |
] ifFalse:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1719 |
prevSelection := self selectedClasses value. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1720 |
newSelectionIndices := #(). |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1721 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1722 |
selectedClassNameIndicesHolder value:newSelectionIndices. |
5591 | 1723 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1724 |
prevSelection notNil ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1725 |
lastSelectedClasses := prevSelection. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1726 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1727 |
self updateOutputGenerator. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1728 |
]. |
5591 | 1729 |
|
1730 |
] ifFalse:[ |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1731 |
"/ same classes - but name(s) could be differnet |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1732 |
newList size > 0 ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1733 |
self reconstructNameList |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1734 |
] |
5591 | 1735 |
]. |
1736 |
listValid := true. |
|
1737 |
||
1738 |
"Created: / 5.2.2000 / 13:42:18 / cg" |
|
1739 |
"Modified: / 31.10.2001 / 11:35:39 / cg" |
|
1740 |
! |
|
1741 |
||
1742 |
updateListsFor:aClass |
|
1743 |
|classes found foundInSelection| |
|
1744 |
||
1745 |
found := foundInSelection := false. |
|
1746 |
||
1747 |
"/ update for a changed class in the classList |
|
1748 |
(classes := classList value) size > 0 ifTrue:[ |
|
7984 | 1749 |
(self updateClassesIn:classes) ifTrue:[ |
1750 |
found := true |
|
1751 |
]. |
|
1752 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1753 |
"/ self halt:'should not happen'. |
7984 | 1754 |
classList value:(classes := classes select:[:each | each notNil]). |
1755 |
]. |
|
5591 | 1756 |
]. |
1757 |
"/ possibly in the generator |
|
1758 |
((classes := inGeneratorHolder value) isOrderedCollection |
|
1759 |
and:[classes size > 0]) ifTrue:[ |
|
7984 | 1760 |
(self updateClassesIn:classes) ifTrue:[ |
1761 |
found := true |
|
1762 |
]. |
|
1763 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1764 |
"/ self halt:'should not happen'. |
7984 | 1765 |
inGeneratorHolder value:(classes select:[:each | each notNil]). |
1766 |
] |
|
5591 | 1767 |
]. |
1768 |
"/ and in the selection |
|
1769 |
(classes := self selectedClasses value) size > 0 ifTrue:[ |
|
7984 | 1770 |
(self updateClassesIn:classes) ifTrue:[ |
1771 |
found := true. |
|
1772 |
foundInSelection := true. |
|
1773 |
]. |
|
1774 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1775 |
"/ self halt:'should not happen'. |
7984 | 1776 |
self selectedClasses value:(classes select:[:each | each notNil]). |
1777 |
] |
|
5591 | 1778 |
]. |
1779 |
"/ and in the last selection |
|
1780 |
(classes := lastSelectedClasses) size > 0 ifTrue:[ |
|
7984 | 1781 |
(self updateClassesIn:classes) ifTrue:[ |
1782 |
found := true |
|
1783 |
]. |
|
1784 |
(classes includes:nil) ifTrue:[ |
|
1785 |
"/ self halt:'should not happen'. |
|
1786 |
lastSelectedClasses := (classes select:[:each | each notNil]). |
|
1787 |
] |
|
5591 | 1788 |
]. |
1789 |
||
1790 |
found ifFalse:[ |
|
7984 | 1791 |
"/ could be a new class (or no-longer autolaoded one). |
1792 |
listValid ifTrue:[ |
|
1793 |
self enqueueDelayedUpdateList. |
|
1794 |
]. |
|
5591 | 1795 |
]. |
1796 |
foundInSelection ifTrue:[ |
|
7984 | 1797 |
"/ force update of output generator |
1798 |
self selectedClasses |
|
1799 |
removeDependent:self; |
|
1800 |
changed; |
|
1801 |
addDependent:self. |
|
5591 | 1802 |
]. |
1803 |
||
11561 | 1804 |
"Modified: / 05-06-2012 / 23:39:25 / cg" |
5591 | 1805 |
! ! |
1806 |
||
9431 | 1807 |
!ClassList methodsFor:'private-presentation'! |
1808 |
||
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1809 |
colorForCoverageInformationOfClass:aClass |
9431 | 1810 |
|instrumented anyPartiallyCovered anyCalled anyNotCalled| |
1811 |
||
1812 |
instrumented := anyPartiallyCovered := anyCalled := anyNotCalled := false. |
|
1813 |
aClass instAndClassMethodsDo:[:m | |
|
9447
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1814 |
m category = 'documentation' ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1815 |
m isInstrumented ifTrue:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1816 |
instrumented := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1817 |
m hasBeenCalled ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1818 |
anyNotCalled := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1819 |
] ifTrue:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1820 |
anyCalled := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1821 |
m haveAllBlocksBeenExecuted ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1822 |
anyPartiallyCovered := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1823 |
"/ no need to search further... |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1824 |
^ UserPreferences current colorForInstrumentedPartiallyCoveredCode |
9447
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1825 |
] |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1826 |
]. |
9431 | 1827 |
]. |
1828 |
]. |
|
1829 |
]. |
|
1830 |
instrumented ifFalse:[ ^ nil]. |
|
1831 |
||
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1832 |
anyCalled ifFalse:[ ^ UserPreferences current colorForInstrumentedNeverCalledCode ]. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1833 |
anyNotCalled ifFalse:[ ^ UserPreferences current colorForInstrumentedFullyCoveredCode ]. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1834 |
^ UserPreferences current colorForInstrumentedPartiallyCoveredCode |
9431 | 1835 |
|
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1836 |
"Created: / 28-04-2010 / 14:05:27 / cg" |
9431 | 1837 |
! |
1838 |
||
1839 |
iconForClass:aClass |
|
1840 |
^ SystemBrowser iconForClass:aClass |
|
1841 |
||
1842 |
"Created: / 17-08-2006 / 09:12:32 / cg" |
|
1843 |
! |
|
1844 |
||
1845 |
indentPerPrivacyLevel |
|
1846 |
^ 4 |
|
1847 |
! |
|
1848 |
||
1849 |
nameListEntryFor:aClass withNameSpace:useFullName |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1850 |
|sortByNameAndInheritance nm indent owner orgMode indentString javaPackage| |
9431 | 1851 |
|
1852 |
aClass == (self class nameListEntryForALL) ifTrue:[ ^ aClass ]. |
|
1853 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1854 |
sortByNameAndInheritance := self sortByNameAndInheritance value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1855 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1856 |
sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1857 |
nm := (self nameListIndentStringFor: aClass withNameSpace: useFullName) , aClass nameInBrowser. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1858 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1859 |
nm := aClass nameInBrowser. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1860 |
]. |
9431 | 1861 |
|
1862 |
aClass isLoaded ifFalse:[ |
|
1863 |
unloadedClassesColor notNil ifTrue:[ |
|
1864 |
nm := nm colorizeAllWith:unloadedClassesColor |
|
1865 |
] |
|
1866 |
]. |
|
1867 |
||
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1868 |
aClass isLoaded ifFalse:[ |
11881
fe2d88632160
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11864
diff
changeset
|
1869 |
"/ nm := nm,(' (?) ' colorizeAllWith:Color grey). |
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1870 |
] ifTrue:[ |
11952
2f2b5c6e81f7
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11945
diff
changeset
|
1871 |
nm := nm,((' (%1+%2) ' bindWith:(aClass methodDictionary size) with:(aClass class methodDictionary size)) |
2f2b5c6e81f7
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11945
diff
changeset
|
1872 |
colorizeAllWith:self class pseudoEntryForegroundColor). |
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1873 |
]. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1874 |
|
9431 | 1875 |
orgMode := organizerMode value. |
1876 |
orgMode == OrganizerCanvas organizerModeHierarchy ifTrue:[ |
|
1877 |
"/ always show the full name |
|
1878 |
^ nm |
|
1879 |
]. |
|
1880 |
orgMode == OrganizerCanvas organizerModeClassHierarchy ifTrue:[ |
|
1881 |
"/ always show the full name |
|
1882 |
^ nm |
|
1883 |
]. |
|
1884 |
||
1885 |
aClass isJavaClass ifTrue:[ |
|
1886 |
"/ only show the last name, unless multiple packages are shown in the list |
|
1887 |
javaPackage := aClass package. |
|
1888 |
(self classList value contains:[:cls | cls package ~= javaPackage]) ifTrue:[ |
|
1889 |
^ nm |
|
1890 |
]. |
|
1891 |
^ aClass lastName |
|
1892 |
]. |
|
1893 |
||
1894 |
useFullName ifFalse:[ |
|
1895 |
aClass isPrivate ifFalse:[ |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1896 |
sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1897 |
^ (self nameListIndentStringFor: aClass withNameSpace: useFullName) , aClass nameWithoutNameSpacePrefix |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1898 |
]. |
9431 | 1899 |
^ aClass nameWithoutNameSpacePrefix |
1900 |
] |
|
1901 |
]. |
|
1902 |
||
1903 |
"/ full name required if owner is not in the list |
|
1904 |
owner := aClass owningClass. |
|
1905 |
(owner isNil |
|
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1906 |
or:[(self classList value includesIdentical:owner) not]) ifFalse:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1907 |
|
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1908 |
"/ namespace |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1909 |
indent := (nm count:[:char | char == $:]) // 2. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1910 |
indent > 0 ifTrue:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1911 |
indent := indent * self indentPerPrivacyLevel. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1912 |
indentString := String new:indent withAll:Character space. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1913 |
sortByNameAndInheritance ifTrue:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1914 |
nm := (self nameListIndentStringFor:owner withNameSpace:useFullName) |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1915 |
, indentString , '::' , aClass nameWithoutPrefix. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1916 |
] ifFalse:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1917 |
nm := indentString , '::' , aClass nameWithoutPrefix |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1918 |
] |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1919 |
]. |
9431 | 1920 |
]. |
1921 |
||
1922 |
^ nm |
|
1923 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1924 |
"Modified: / 04-07-2011 / 19:00:45 / cg" |
11955
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1925 |
! |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1926 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1927 |
nameListIndentStringFor:aClass withNameSpace:useFullName |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1928 |
| indent indentString cls | |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1929 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1930 |
indent := 0. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1931 |
indentString := ''. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1932 |
cls := aClass superclass. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1933 |
[self classList value includesIdentical:cls] |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1934 |
whileTrue: |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1935 |
[indent := indent + 1. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1936 |
cls := cls superclass]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1937 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1938 |
indent == 0 ifFalse:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1939 |
indent <= 5 ifTrue:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1940 |
indentString := #( |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1941 |
'' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1942 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1943 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1944 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1945 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1946 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1947 |
) at:indent+1. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1948 |
] ifFalse:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1949 |
indentString := String new:indent*2 withAll:Character space. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1950 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1951 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1952 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1953 |
^indentString |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1954 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1955 |
"Modified: / 24-02-2000 / 17:52:28 / cg" |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1956 |
"Created: / 21-01-2008 / 19:02:07 / janfrog" |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1957 |
"Modified (format): / 04-07-2011 / 18:30:20 / cg" |
9431 | 1958 |
! ! |
1959 |
||
10421 | 1960 |
!ClassList methodsFor:'queries'! |
1961 |
||
1962 |
supportsSearch |
|
1963 |
||
1964 |
^(self componentAt: #List) notNil |
|
1965 |
||
1966 |
"Created: / 28-07-2011 / 17:46:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1967 |
! ! |
|
1968 |
||
5591 | 1969 |
!ClassList methodsFor:'setup'! |
1970 |
||
6749
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1971 |
autoSelect:aBoolean |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1972 |
autoSelect ~~ aBoolean ifTrue:[ |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1973 |
autoSelect := aBoolean. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1974 |
classList value:nil. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1975 |
]. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1976 |
! |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1977 |
|
8167 | 1978 |
classFilterBlock:aBlock |
1979 |
"use this to filter away unwanted packages" |
|
1980 |
||
1981 |
classFilterBlock := aBlock |
|
1982 |
! |
|
1983 |
||
5591 | 1984 |
postBuildWith:aBuilder |
1985 |
|classListView| |
|
1986 |
||
1987 |
super postBuildWith:aBuilder. |
|
1988 |
||
1989 |
classListView := aBuilder componentAt:'List'. |
|
1990 |
classListView notNil ifTrue:[ |
|
1991 |
classListView allowDrag:true. |
|
1992 |
classListView dragObjectConverter:[:obj | |
|
1993 |
|nm class idx| |
|
1994 |
||
1995 |
nm := obj theObject asString. |
|
1996 |
idx := classNameList value indexOf:nm. |
|
1997 |
idx == 0 ifTrue:[ |
|
1998 |
idx := classNameList value indexOf:nm string. |
|
1999 |
]. |
|
2000 |
class := classList value at:idx. |
|
2001 |
DropObject newClass:class. |
|
2002 |
]. |
|
2003 |
] |
|
2004 |
! ! |
|
2005 |
||
2006 |
!ClassList class methodsFor:'documentation'! |
|
2007 |
||
11561 | 2008 |
version |
11978
4ff5f53f23a9
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11967
diff
changeset
|
2009 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.68 2012-11-01 10:59:12 cg Exp $' |
11561 | 2010 |
! |
2011 |
||
8945 | 2012 |
version_CVS |
11978
4ff5f53f23a9
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11967
diff
changeset
|
2013 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.68 2012-11-01 10:59:12 cg Exp $' |
5591 | 2014 |
! ! |