author | Claus Gittinger <cg@exept.de> |
Thu, 14 Mar 2013 00:56:35 +0100 | |
changeset 12466 | c14bcbda280c |
parent 12044 | 154236f3c686 |
child 12579 | 638b1166d05b |
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 |
|
12001
286aa33188ee
comment/format in: #selectedClasses
Claus Gittinger <cg@exept.de>
parents:
11978
diff
changeset
|
355 |
"bad name- it's a holder, baby" |
9371 | 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 slaveMode value == true) ifTrue:[^ self]. |
|
467 |
"/ self slaveMode value isNil ifTrue:[ |
|
468 |
"/ self window shown ifFalse:[ |
|
469 |
"/ self invalidateList. |
|
470 |
"/ ^ self |
|
471 |
"/ ]. |
|
472 |
"/ ]. |
|
473 |
||
474 |
changedObject == slaveMode ifTrue:[ |
|
12044 | 475 |
"/ a previously suppressed update is now due |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
476 |
listValid ~~ true ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
477 |
self enqueueDelayedUpdateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
478 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
479 |
self enqueueDelayedClassSelectionChanged. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
480 |
^ self |
5591 | 481 |
]. |
482 |
||
12044 | 483 |
changedObject == self selectedClasses ifTrue:[ |
484 |
self inSlaveMode ifFalse:[ |
|
485 |
savedList := self selectedClasses value. |
|
486 |
lastSelectedClasses := nil. |
|
487 |
listValid == true ifFalse:[ |
|
488 |
self updateList |
|
489 |
]. |
|
490 |
self selectedClasses setValue:savedList. |
|
491 |
self selectedClassesChanged. |
|
492 |
self updateOutputGenerator. |
|
493 |
] ifTrue:[ |
|
494 |
"/ listValid := false. |
|
495 |
self selectedClassesChanged. |
|
496 |
]. |
|
497 |
^ self |
|
498 |
]. |
|
499 |
||
500 |
(changedObject == meta |
|
501 |
or:[changedObject == selectedClassNameIndices]) ifTrue:[ |
|
502 |
self inSlaveMode ifFalse:[ |
|
503 |
self selectionChanged. |
|
504 |
] ifTrue:[ |
|
505 |
listValid := false. |
|
506 |
self selectedClassesChanged. |
|
507 |
]. |
|
508 |
^ self |
|
509 |
]. |
|
510 |
||
511 |
self inSlaveModeOrInvisible ifTrue:[ |
|
512 |
self invalidateList. |
|
513 |
^ self. |
|
514 |
]. |
|
515 |
||
5591 | 516 |
changedObject == Smalltalk ifTrue:[ |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
517 |
something == #methodInClass ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
518 |
^ self "no interest" |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
519 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
520 |
something == #methodInClassRemoved ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
521 |
"/ 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
|
522 |
"/ the classes package (to undo any has-exension highlighting) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
523 |
cls := aParameter first. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
524 |
self updateListsFor:cls. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
525 |
^ self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
526 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
527 |
something == #organization ifTrue:[^ self "no interest" ]. |
5591 | 528 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
529 |
(something == #classDefinition |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
530 |
or:[something == #classVariables |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
531 |
or:[something == #newClass]]) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
532 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
533 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
534 |
self classDefinitionChanged:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
535 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
536 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
537 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
538 |
(something == #lastTestRunResult) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
539 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
540 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
541 |
self updateListsFor:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
542 |
"/ self classDefinitionChanged:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
543 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
544 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
545 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
546 |
something == #classRemove ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
547 |
"/ update my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
548 |
self classRemoved:aParameter. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
549 |
^ self. |
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 |
something == #classRename ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
552 |
"/ update that class in my classList and the selection |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
553 |
listValid ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
554 |
aParameter isArray ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
555 |
cls := aParameter at:1. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
556 |
self classDefinitionChanged:cls. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
557 |
] |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
558 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
559 |
^ self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
560 |
]. |
5591 | 561 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
562 |
something == #projectOrganization ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
563 |
aParameter isNil ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
564 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
565 |
organizerMode value == #project ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
566 |
self enqueueDelayedUpdateOutputGenerator. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
567 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
568 |
^ self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
569 |
]. |
5591 | 570 |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
571 |
cls := aParameter at:1. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
572 |
cls notNil ifTrue:[ "/ should not happen (but does occasionally) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
573 |
((classes includes:cls theMetaclass) |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
574 |
or:[(classes includes:cls theNonMetaclass)]) ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
575 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
576 |
organizerMode value == #project ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
577 |
self enqueueDelayedUpdateOutputGenerator. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
578 |
] |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
579 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
580 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
581 |
^ self |
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 |
(something == #lastTestRunResult) ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
587 |
^ self |
5591 | 588 |
]. |
589 |
||
590 |
changedObject == ChangeSet ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
591 |
wg := self windowGroup. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
592 |
wg isNil ifTrue:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
593 |
changedObject removeDependent:self. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
594 |
] ifFalse:[ |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
595 |
"/ react on changes of the changeSet to recolorize items |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
596 |
((something ~~ #addChange:) |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
597 |
or:[ |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
598 |
chgClass := aParameter changeClass. |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
599 |
chgClass notNil |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
600 |
and:[ (classes includes:chgClass theNonMetaclass) |
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
601 |
or:[classes includes:chgClass theMetaclass]] |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
602 |
] |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
603 |
) ifTrue:[ |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
604 |
wg sensor |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
605 |
flushEventsFor:self |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
606 |
where:[:ev | ev isMessageSendEvent |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
607 |
and:[ev selector == #delayedUpdate:with:from: |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
608 |
and:[(ev arguments at:3) == ChangeSet]]]. |
11967
09b72b540e24
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11955
diff
changeset
|
609 |
self enqueueDelayedAction:[self reconstructNameList]. |
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
610 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
611 |
]. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
612 |
^ self |
5591 | 613 |
]. |
614 |
||
615 |
changedObject == showClassPackages ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
616 |
self classNameList value:nil. |
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 |
(changedObject == hideUnloadedClasses |
|
622 |
or:[changedObject == hidePrivateClasses |
|
623 |
or:[changedObject == nameSpaceFilter |
|
624 |
or:[changedObject == packageFilter]]]) ifTrue:[ |
|
9204
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
625 |
self invalidateList. |
0690de3bd379
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
9075
diff
changeset
|
626 |
^ self |
5591 | 627 |
]. |
628 |
||
629 |
super delayedUpdate:something with:aParameter from:changedObject |
|
630 |
||
631 |
"Modified: / 13.11.2001 / 11:32:10 / cg" |
|
632 |
! |
|
633 |
||
634 |
enqueueDelayedClassSelectionChanged |
|
635 |
(NewSystemBrowser synchronousUpdate == true |
|
636 |
or:[ immediateUpdate value == true ]) |
|
637 |
ifTrue:[ |
|
6716 | 638 |
self selectedClassesChanged. |
639 |
^ self. |
|
5591 | 640 |
]. |
641 |
||
642 |
self enqueueMessage:#selectedClassesChanged for:self arguments:#() |
|
643 |
! |
|
644 |
||
645 |
getSelectedClassIndicesFromClasses |
|
646 |
"the class selection has changed; |
|
647 |
return a collection of selection-indices" |
|
648 |
||
649 |
|classes selectedClasses numSelected| |
|
650 |
||
651 |
classes := self classList value. |
|
652 |
selectedClasses := self selectedClasses value. |
|
653 |
||
654 |
numSelected := selectedClasses size. |
|
655 |
numSelected == 0 ifTrue:[ |
|
656 |
^ #() |
|
657 |
]. |
|
658 |
||
659 |
numSelected == classes size ifTrue:[ |
|
660 |
"/ all selected - easy |
|
661 |
^ (1 to:numSelected) asOrderedCollection |
|
662 |
]. |
|
663 |
meta value ifTrue:[ |
|
664 |
classes := classes collect:[:eachClass | eachClass theMetaclass]. |
|
665 |
]. |
|
666 |
||
667 |
classes := selectedClasses collect:[:aSelectedClass | classes identityIndexOf:aSelectedClass.]. |
|
668 |
classes := classes select:[:idx | idx ~= 0]. |
|
669 |
^ classes |
|
670 |
||
671 |
"Created: / 24.2.2000 / 19:47:52 / cg" |
|
672 |
! |
|
673 |
||
674 |
getSelectedClassesFromIndices |
|
675 |
"the selection-index collection has changed; |
|
676 |
return a collection of corresponding classes" |
|
677 |
||
678 |
|selected classes allEntrySelected isMeta anyLost selectedClassNameIndices| |
|
679 |
||
680 |
allEntrySelected := false. |
|
681 |
||
682 |
classes := classList value. |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
683 |
classes isNil ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
684 |
self updateList. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
685 |
classes := classList value. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
686 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
687 |
|
5591 | 688 |
isMeta := meta value. |
689 |
anyLost := false. |
|
690 |
||
691 |
selectedClassNameIndices := self selectedClassNameIndices value. |
|
692 |
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
|
693 |
selectedClassNameIndices size == 0 ifTrue:[^ #()]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
694 |
isMeta ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
695 |
^ 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
|
696 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
697 |
^ classes collect:[:eachClass | eachClass theNonMetaclass]. |
5591 | 698 |
]. |
699 |
||
700 |
selected := selectedClassNameIndices |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
701 |
collect:[:idx | |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
702 |
|cls| |
5591 | 703 |
|
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
704 |
cls := classes at:idx. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
705 |
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
|
706 |
allEntrySelected := true. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
707 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
708 |
cls notNil ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
709 |
isMeta ifTrue:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
710 |
cls := cls theMetaclass |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
711 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
712 |
cls := cls theNonMetaclass |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
713 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
714 |
] ifFalse:[ |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
715 |
anyLost := true |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
716 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
717 |
]. |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
718 |
cls |
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
719 |
]. |
5591 | 720 |
anyLost ifTrue:[ |
7928
93623a1f78a6
getSelectedClass if there has not been a classList fetch yet
Claus Gittinger <cg@exept.de>
parents:
7743
diff
changeset
|
721 |
selected := selected select:[:each | each notNil]. |
5591 | 722 |
]. |
723 |
||
724 |
"/ allEntrySelected ifTrue:[ |
|
725 |
"/ selected := classList value select:[:cls | cls ~~ AllEntry]. |
|
726 |
"/ meta value ifTrue:[ |
|
727 |
"/ selected := selected collect:[:cls | cls theMetaclass]. |
|
728 |
"/ ] ifFalse:[ |
|
729 |
"/ selected := selected collect:[:cls | cls theNonMetaclass]. |
|
730 |
"/ ]. |
|
731 |
"/ ]. |
|
732 |
||
733 |
^ selected. |
|
734 |
||
735 |
"Created: / 24.2.2000 / 19:43:37 / cg" |
|
736 |
! |
|
737 |
||
738 |
selectedClassesChanged |
|
739 |
|indices selectedClassNameIndicesHolder| |
|
740 |
||
741 |
self classList value size == 0 ifTrue:[ |
|
742 |
"/ this may happen during early startup, |
|
743 |
"/ when invoked with a preset classSelection, |
|
744 |
"/ and the classGenerator has not yet been setup |
|
745 |
"/ to not clobber the selection, defer the update |
|
746 |
"/ until the classList arrives ... |
|
747 |
^ self |
|
748 |
]. |
|
749 |
"/ lastSelectedClasses := self selectedClasses value copy. |
|
750 |
||
751 |
indices := self getSelectedClassIndicesFromClasses. |
|
752 |
selectedClassNameIndicesHolder := self selectedClassNameIndices. |
|
753 |
selectedClassNameIndicesHolder value ~= indices ifTrue:[ |
|
754 |
"/ in slaveMode, do not update selectedClasses from indices |
|
755 |
true "slaveMode value" ifTrue:[ |
|
756 |
selectedClassNameIndicesHolder value:indices withoutNotifying:self |
|
757 |
] ifFalse:[ |
|
758 |
selectedClassNameIndicesHolder value:indices. |
|
759 |
] |
|
760 |
] |
|
761 |
||
762 |
"Created: / 13.2.2000 / 22:18:10 / cg" |
|
763 |
"Modified: / 24.2.2000 / 19:48:56 / cg" |
|
764 |
! |
|
765 |
||
766 |
selectionChanged |
|
767 |
"the lists selection has changed. Since the list uses indices, |
|
768 |
update the corresponding selectedClasses collection" |
|
769 |
||
770 |
|selected prevSelection selectedClassesHolder| |
|
771 |
||
772 |
selectedClassesHolder := self selectedClasses. |
|
773 |
||
774 |
selected := self getSelectedClassesFromIndices. |
|
775 |
||
776 |
prevSelection := selectedClassesHolder value ? #(). |
|
777 |
||
778 |
prevSelection ~= selected ifTrue:[ |
|
8752 | 779 |
selectedClassesHolder value:selected. |
5591 | 780 |
]. |
781 |
! |
|
782 |
||
783 |
selectionChangedByClick |
|
784 |
"we are not interested in that - get another notification |
|
785 |
via the changed valueHolder" |
|
786 |
||
787 |
|selected master| |
|
788 |
||
789 |
selected := self getSelectedClassesFromIndices. |
|
790 |
(selected = lastSelectedClasses and:[selected size == 1]) |
|
791 |
ifTrue:[ |
|
792 |
"/ thats a kludge - we want to turn off the protocol selection, |
|
793 |
"/ when a class is reselected. |
|
794 |
||
795 |
masterApplication notNil ifTrue:[ |
|
796 |
master := masterApplication. |
|
797 |
masterApplication masterApplication notNil ifTrue:[ |
|
798 |
master := masterApplication masterApplication. |
|
799 |
]. |
|
800 |
(master respondsTo:#classReselected) ifTrue:[ |
|
801 |
master classReselected. |
|
802 |
]. |
|
803 |
] |
|
804 |
] ifFalse:[ |
|
805 |
lastSelectedClasses := selected copy. |
|
806 |
] |
|
807 |
! |
|
808 |
||
809 |
update:something with:aParameter from:changedObject |
|
10367 | 810 |
|cls sel mthd newMethod oldMethod idx classListValue| |
5591 | 811 |
|
12044 | 812 |
self inSlaveMode ifTrue:[ |
6847 | 813 |
something == #methodInClass ifTrue:[ ^ self ]. |
814 |
something == #addChange: ifTrue:[ self invalidateList. ^ self ]. |
|
11978
4ff5f53f23a9
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11967
diff
changeset
|
815 |
something == #methodCoverageInfo ifTrue:[ self invalidateList. ^ self ]. |
5591 | 816 |
]. |
817 |
"/ self window sensor isNil ifTrue:[ |
|
818 |
"/ "/ not visible ... |
|
819 |
"/ self invalidateList. |
|
820 |
"/ ^ self |
|
821 |
"/ ]. |
|
822 |
||
823 |
classListValue := classList value. |
|
824 |
||
825 |
changedObject == Smalltalk ifTrue:[ |
|
6847 | 826 |
something == #classComment ifTrue:[ |
827 |
^ self. |
|
828 |
]. |
|
829 |
something == #methodDictionary ifTrue:[ |
|
830 |
^ self |
|
831 |
]. |
|
832 |
something == #methodTrap ifTrue:[ |
|
833 |
^ self |
|
834 |
]. |
|
11556
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
835 |
something == #coverageInfo ifTrue:[ |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
836 |
listValid == true ifTrue:[ |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
837 |
self enqueueDelayedUpdateList |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
838 |
]. |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
839 |
^ self. |
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
840 |
]. |
10367 | 841 |
something == #methodCoverageInfo ifTrue:[ |
842 |
listValid == true ifTrue:[ |
|
11556
ca2117cbf0b5
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11259
diff
changeset
|
843 |
mthd := aParameter. |
10367 | 844 |
cls := mthd mclass. |
845 |
cls notNil ifTrue:[ |
|
846 |
classListValue size > 0 ifTrue:[ |
|
847 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
848 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
849 |
self enqueueDelayedUpdateList |
|
850 |
] |
|
851 |
] |
|
852 |
]. |
|
853 |
]. |
|
854 |
^ self |
|
855 |
]. |
|
6847 | 856 |
something == #lastTestRunResult ifTrue:[ |
857 |
cls := aParameter at:1. |
|
858 |
sel := aParameter at:2. |
|
859 |
(cls notNil and:[sel isNil]) ifTrue:[ |
|
860 |
classListValue size > 0 ifTrue:[ |
|
861 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
862 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
863 |
self enqueueDelayedUpdateList |
|
864 |
] |
|
865 |
] |
|
866 |
]. |
|
867 |
^ self |
|
868 |
]. |
|
869 |
||
870 |
something == #methodInClassRemoved ifTrue:[ |
|
12044 | 871 |
self inSlaveMode ifFalse:[ |
872 |
cls := aParameter at:1. |
|
873 |
cls notNil ifTrue:[ |
|
874 |
classListValue size > 0 ifTrue:[ |
|
875 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
876 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
877 |
self enqueueDelayedUpdateList |
|
878 |
] |
|
6847 | 879 |
] |
12044 | 880 |
]. |
6847 | 881 |
]. |
882 |
^ self |
|
883 |
]. |
|
5591 | 884 |
|
6847 | 885 |
something == #methodInClass ifTrue:[ |
886 |
cls := aParameter at:1. |
|
887 |
cls notNil ifTrue:[ |
|
888 |
classListValue size > 0 ifTrue:[ |
|
889 |
((classListValue includesIdentical:cls theNonMetaclass) |
|
890 |
or:[(classListValue includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
891 |
newMethod := cls compiledMethodAt:(aParameter at:2). |
|
892 |
oldMethod := aParameter at:3. |
|
893 |
((oldMethod isNil |
|
894 |
and:[newMethod package ~= cls package]) |
|
895 |
or:[oldMethod notNil |
|
896 |
and:[newMethod package ~= oldMethod package]]) |
|
897 |
ifTrue:[ |
|
898 |
"/ must update the list (for the package-info) |
|
899 |
self enqueueDelayedUpdateList |
|
900 |
] |
|
901 |
] |
|
902 |
] |
|
903 |
]. |
|
904 |
^ self |
|
905 |
]. |
|
5591 | 906 |
|
6847 | 907 |
"/ kludge: must be careful if my inGenerator is a constant list. |
908 |
"/ in that case, I have to update it |
|
909 |
"/ (sigh - all a consequence of not #becoming the new class) |
|
910 |
((something == #classDefinition) or:[something == #newClass]) ifTrue:[ |
|
911 |
inGeneratorHolder value isOrderedCollection ifTrue:[ |
|
912 |
idx := inGeneratorHolder value findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name]. |
|
913 |
idx ~~ 0 ifTrue:[ |
|
914 |
inGeneratorHolder value at:idx put:aParameter. |
|
915 |
self updateListsFor:aParameter. |
|
916 |
"/ self enqueueDelayedUpdateList. |
|
917 |
] |
|
918 |
] ifFalse:[ |
|
919 |
classListValue size > 0 ifTrue:[ |
|
920 |
idx := classListValue findFirst:[:eachClass | eachClass name = aParameter theNonMetaclass name]. |
|
921 |
idx ~~ 0 ifTrue:[ |
|
922 |
listValid ifTrue:[ |
|
923 |
self classDefinitionChanged:aParameter. |
|
924 |
^ self. |
|
925 |
] |
|
926 |
] |
|
927 |
]. |
|
928 |
]. |
|
929 |
]. |
|
5591 | 930 |
]. |
931 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
932 |
changedObject == sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
933 |
self invalidateList. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
934 |
^ self. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
935 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
936 |
|
5591 | 937 |
super update:something with:aParameter from:changedObject |
938 |
||
11561 | 939 |
"Modified: / 05-06-2012 / 23:39:34 / cg" |
5591 | 940 |
! ! |
941 |
||
942 |
!ClassList methodsFor:'drag & drop'! |
|
943 |
||
6468 | 944 |
canDropContext:aDropContext |
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
945 |
|objects| |
5591 | 946 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
947 |
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
|
948 |
(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
|
949 |
|methods cls| |
5591 | 950 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
951 |
methods := objects. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
952 |
cls := self classAtTargetPointOf:aDropContext. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
953 |
cls isNil ifTrue:[^ false]. |
5591 | 954 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
955 |
^ 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
|
956 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
957 |
(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
|
958 |
^ false. |
7121 | 959 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
960 |
"Modified: / 17-10-2006 / 18:26:07 / cg" |
5591 | 961 |
! |
962 |
||
963 |
classAtTargetPointOf:aDropContext |
|
964 |
|p classListView lineNr cls| |
|
965 |
||
966 |
p := aDropContext targetPoint. |
|
967 |
||
968 |
classListView := aDropContext targetWidget. |
|
969 |
||
970 |
lineNr := classListView lineAtY:p y. |
|
971 |
lineNr isNil ifTrue:[^ nil]. |
|
972 |
||
973 |
cls := classList value at:lineNr. |
|
974 |
^ cls |
|
975 |
! |
|
976 |
||
6468 | 977 |
doDropContext:aDropContext |
8598 | 978 |
|objects browser| |
979 |
||
980 |
browser := self masterApplication. |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
981 |
|
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
982 |
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
|
983 |
(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
|
984 |
|cls methods| |
5591 | 985 |
|
7436 | 986 |
methods := objects. |
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
987 |
cls := self classAtTargetPointOf:aDropContext. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
988 |
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
|
989 |
cls := cls theMetaclass |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
990 |
]. |
5591 | 991 |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
992 |
cls notNil ifTrue:[ |
8945 | 993 |
methods := methods reject:[:mthd | mthd mclass theNonMetaclass == cls theNonMetaclass]. |
994 |
methods notEmpty ifTrue:[ |
|
995 |
aDropContext dragType == DropContext dragTypeCopy ifTrue:[ |
|
996 |
browser copyMethods:methods toClass:cls. |
|
997 |
] ifFalse:[ |
|
998 |
browser moveMethods:methods toClass:cls. |
|
999 |
]. |
|
1000 |
] |
|
7424
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
1001 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
1002 |
^ self |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
1003 |
]. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
1004 |
(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
|
1005 |
self dropClassFiles:objects. |
cb6c951e5728
drag&drop:allow dropping st-files from the windows explorer
Claus Gittinger <cg@exept.de>
parents:
7121
diff
changeset
|
1006 |
^ self |
5591 | 1007 |
]. |
1008 |
||
7436 | 1009 |
"Modified: / 21-10-2006 / 20:39:55 / cg" |
5591 | 1010 |
! ! |
1011 |
||
1012 |
!ClassList methodsFor:'generators'! |
|
1013 |
||
1014 |
makeGenerator |
|
1015 |
"return a generator which enumerates the method categories from the selected class; |
|
1016 |
that generator generates 2-element elements (includes the class), in order |
|
1017 |
to make the consumers only depend on one input (i.e. no need for another |
|
1018 |
classHolder in the methodList)." |
|
1019 |
||
8752 | 1020 |
^ Iterator |
1021 |
on:[:whatToDo | |
|
12466 | 1022 |
|allEntry classes cls already anyMethod packages classIsInPackage |
1023 |
showChanged changedClasses| |
|
5591 | 1024 |
|
8752 | 1025 |
allEntry := self class nameListEntryForALL. |
5591 | 1026 |
|
8752 | 1027 |
classes := self selectedClasses value ? #(). |
1028 |
packages := packageFilter value value. |
|
12466 | 1029 |
|
8752 | 1030 |
(packages notNil and:[packages includes:allEntry]) ifTrue:[packages := nil]. |
12466 | 1031 |
|
8752 | 1032 |
showChanged := packages notNil and:[packages includes:NavigatorModel nameListEntryForChanged]. |
12466 | 1033 |
showChanged ifTrue:[ |
1034 |
changedClasses := ChangeSet current changedClasses. |
|
1035 |
]. |
|
5591 | 1036 |
|
8752 | 1037 |
classes do:[:cls | |
1038 |
(cls notNil and:[cls ~~ allEntry]) ifTrue:[ |
|
1039 |
anyMethod := false. |
|
1040 |
classIsInPackage := packages isNil |
|
1041 |
or:[(packages includes:cls package) |
|
11938 | 1042 |
or:[ showChanged and:[changedClasses includes:cls]] ]. |
5591 | 1043 |
|
8752 | 1044 |
cls theNonMetaclass isJavaClass ifTrue:[ |
1045 |
cls isMeta ifTrue:[ |
|
1046 |
whatToDo value:cls theNonMetaclass value:(self class nameListEntryForStatic). |
|
1047 |
] ifFalse:[ |
|
1048 |
whatToDo value:cls value:(self class nameListEntryForNonStatic). |
|
1049 |
] |
|
1050 |
] ifFalse:[ |
|
12466 | 1051 |
cls supportsMethodCategories ifFalse:[ |
1052 |
whatToDo value:cls value:(self class nameListEntryForNILCategory). |
|
1053 |
] ifTrue:[ |
|
8752 | 1054 |
already := Set new. |
1055 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
|
1056 |
|cat| |
|
5591 | 1057 |
|
8752 | 1058 |
cat := mthd category. |
1059 |
(already includes:cat) ifFalse:[ |
|
1060 |
(classIsInPackage |
|
12466 | 1061 |
or:[packages isNil |
1062 |
or:[(packages includes:mthd package) ]]) |
|
8752 | 1063 |
ifTrue:[ |
1064 |
already add:cat. |
|
1065 |
whatToDo value:cls value:cat. |
|
1066 |
] |
|
1067 |
] |
|
1068 |
]. |
|
1069 |
]. |
|
1070 |
]. |
|
1071 |
||
1072 |
anyMethod ifFalse:[ |
|
1073 |
"/ tell the one below, which classes are seen here, |
|
1074 |
"/ (even if no method is present) |
|
1075 |
"/ to allow him to decide if the className is to be shown in the list |
|
1076 |
whatToDo value:cls value:nil. |
|
1077 |
]. |
|
1078 |
]. |
|
1079 |
]. |
|
1080 |
] |
|
5591 | 1081 |
|
1082 |
"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
|
1083 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1084 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1085 |
makeGeneratorForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1086 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1087 |
^ Iterator |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1088 |
on:[:whatToDo | |
12466 | 1089 |
|allEntry classes cls already packages classIsInPackage |
1090 |
showChanged changedClasses cat | |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1091 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1092 |
allEntry := self class nameListEntryForALL. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1093 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1094 |
classes := self selectedClasses value ? #(). |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1095 |
packages := packageFilter value value. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1096 |
(packages notNil and:[packages includes:allEntry]) ifTrue:[packages := nil]. |
12466 | 1097 |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1098 |
showChanged := packages notNil and:[packages includes:NavigatorModel nameListEntryForChanged]. |
12466 | 1099 |
showChanged ifTrue:[ |
1100 |
changedClasses := ChangeSet current changedClasses. |
|
1101 |
]. |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1102 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1103 |
classes do:[:cls | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1104 |
(cls notNil and:[cls ~~ allEntry]) ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1105 |
classIsInPackage := packages isNil |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1106 |
or:[(packages includes:cls package) |
12466 | 1107 |
or:[ showChanged and:[changedClasses includes:cls]] ]. |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1108 |
cls isMeta ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1109 |
cat := self class nameListEntryForStatic. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1110 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1111 |
cat := self class nameListEntryForNonStatic. |
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 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1114 |
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
|
1115 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1116 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1117 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1118 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1119 |
] |
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 |
"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
|
1122 |
"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
|
1123 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1124 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1125 |
outGeneratorHolderForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1126 |
^ outGeneratorHolderForMethods |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1127 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1128 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1129 |
outGeneratorHolderForMethods:something |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1130 |
outGeneratorHolderForMethods := something. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1131 |
! |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1132 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1133 |
updateOutputGenerator |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1134 |
"create a generator which enumerates my elements, |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1135 |
and place it into the outputGenerator holder" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1136 |
|
11918
46ef9b23af7a
fixes to allow viewing all vs extensions in a
Claus Gittinger <cg@exept.de>
parents:
11881
diff
changeset
|
1137 |
super updateOutputGenerator. |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1138 |
outGeneratorHolderForMethods notNil ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1139 |
outGeneratorHolderForMethods value: self makeGeneratorForMethods. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1140 |
]. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1141 |
|
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1142 |
"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
|
1143 |
"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
|
1144 |
"Created: / 07-08-2011 / 18:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1145 |
! ! |
1146 |
||
11259 | 1147 |
!ClassList methodsFor:'initialize-release'! |
1148 |
||
1149 |
release |
|
1150 |
super release. |
|
1151 |
||
1152 |
currentNamespace removeDependent:self. |
|
1153 |
sortByNameAndInheritance removeDependent:self. |
|
1154 |
hidePrivateClasses removeDependent:self. |
|
1155 |
markApplicationsHolder removeDependent:self. |
|
1156 |
meta removeDependent:self. |
|
1157 |
selectedClassNameIndices removeDependent:self. |
|
1158 |
showClassPackages removeDependent:self. |
|
1159 |
||
1160 |
"Created: / 05-02-2000 / 13:42:18 / cg" |
|
1161 |
! ! |
|
1162 |
||
5591 | 1163 |
!ClassList methodsFor:'private'! |
1164 |
||
1165 |
listOfClasses |
|
1166 |
|classesAlready classesOrdered generator nameSpaceFilter packageFilter allName hidePrivate |
|
9761 | 1167 |
privateClassesPerClass nameFilterIncludesMatchCharacters lcNameFilter| |
5591 | 1168 |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1169 |
self sortByNameAndInheritance value ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1170 |
^ self listOfClassesByInheritance |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1171 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1172 |
|
5591 | 1173 |
allName := self class nameListEntryForALL. |
7708 | 1174 |
(self showAllClassesInNameSpaceOrganisation value) ifFalse:[ |
1175 |
nameSpaceFilter := self nameSpaceFilter value. |
|
1176 |
nameSpaceFilter notNil ifTrue:[ |
|
1177 |
(nameSpaceFilter includes:allName) ifTrue:[ |
|
1178 |
nameSpaceFilter := nil |
|
1179 |
]. |
|
1180 |
]. |
|
5591 | 1181 |
]. |
8752 | 1182 |
"/ packageFilter := self packageFilter value. |
1183 |
"/ packageFilter notNil ifTrue:[ |
|
1184 |
"/ (packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
|
1185 |
"/ ]. |
|
5591 | 1186 |
|
1187 |
inGeneratorHolder isNil ifTrue:[ |
|
6879 | 1188 |
"/ for standAlone testing |
1189 |
generator := Smalltalk allClasses. |
|
1190 |
(self hideUnloadedClasses value) ifTrue:[ |
|
1191 |
generator := generator select:[:cls | cls isLoaded] |
|
1192 |
]. |
|
5591 | 1193 |
] ifFalse:[ |
6879 | 1194 |
generator := inGeneratorHolder value. |
1195 |
generator isNil ifTrue:[^ #() ]. |
|
5591 | 1196 |
]. |
1197 |
||
1198 |
classesAlready := IdentitySet new. |
|
1199 |
classesOrdered := OrderedCollection new. |
|
1200 |
hidePrivate := self hidePrivateClasses value. |
|
1201 |
||
1202 |
privateClassesPerClass := IdentityDictionary new. |
|
9759 | 1203 |
nameFilterIncludesMatchCharacters := nameFilter notNil and:[nameFilter includesMatchCharacters]. |
9761 | 1204 |
nameFilter notNil ifTrue:[ lcNameFilter := nameFilter asLowercase]. |
5591 | 1205 |
|
1206 |
generator do:[:cls | |
|
6879 | 1207 |
|owner bucket| |
5591 | 1208 |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1209 |
"JV@2011-08-07: FIXME: Ugly code, hard to extend!! And duplicated in listOfClassesByInheritance !!!!!!!!" |
6879 | 1210 |
(hidePrivate not or:[cls isPrivate not]) |
1211 |
ifTrue:[ |
|
1212 |
(nameSpaceFilter isNil |
|
1213 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
|
1214 |
(packageFilter isNil |
|
1215 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
|
1216 |
(classesAlready includes:cls) ifFalse:[ |
|
8167 | 1217 |
(classFilterBlock isNil |
1218 |
or:[(classFilterBlock value:cls)]) ifTrue:[ |
|
8166
f90857fb2227
added a rejectedPackages filter
Claus Gittinger <cg@exept.de>
parents:
8072
diff
changeset
|
1219 |
classesAlready add:cls. |
9759 | 1220 |
(nameFilter isNil |
9761 | 1221 |
or:[ (nameFilterIncludesMatchCharacters not and:[ cls name asLowercase startsWith:lcNameFilter]) |
1222 |
or:[ (nameFilterIncludesMatchCharacters and:[nameFilter match:cls name ignoreCase:true]) ]]) ifTrue:[ |
|
9759 | 1223 |
(owner := cls owningClass) notNil ifTrue:[ |
1224 |
bucket := privateClassesPerClass |
|
1225 |
at:owner |
|
1226 |
ifAbsentPut:[SortedCollection new |
|
1227 |
sortBlock:[:a :b | (a name ? '?') < (b name ? '?')] ]. |
|
1228 |
bucket add:cls. |
|
1229 |
] ifFalse:[ |
|
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1230 |
"Do not show Java anonymous classes" |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1231 |
cls isJavaClass ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1232 |
cls isAnonymous ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1233 |
classesOrdered add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1234 |
] |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1235 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1236 |
classesOrdered add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1237 |
] |
9759 | 1238 |
] |
8166
f90857fb2227
added a rejectedPackages filter
Claus Gittinger <cg@exept.de>
parents:
8072
diff
changeset
|
1239 |
] |
6879 | 1240 |
] |
1241 |
] |
|
1242 |
] |
|
1243 |
] |
|
1244 |
] |
|
5591 | 1245 |
]. |
1246 |
||
8263
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1247 |
"/ 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
|
1248 |
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
|
1249 |
(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
|
1250 |
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
|
1251 |
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
|
1252 |
"/ 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
|
1253 |
"/ (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
|
1254 |
"/ 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
|
1255 |
"/ ]. |
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1256 |
"/ ]. |
8263
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1257 |
]. |
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1258 |
]. |
aa99dcc68272
oops - care for private classes in the list, for
Michael Beyl <mb@exept.de>
parents:
8167
diff
changeset
|
1259 |
|
5591 | 1260 |
classesOrdered size == 1 ifTrue:[ |
6879 | 1261 |
self classLabelHolder value:(classesOrdered first name) |
5591 | 1262 |
] ifFalse:[ |
1263 |
"/ self classLabelHolder value:(classes size printString , ' classes'). |
|
6879 | 1264 |
sortBy value ~~ #doNotSort ifTrue:[ |
1265 |
classesOrdered sort:[:a :b | a name < b name]. |
|
1266 |
] |
|
5591 | 1267 |
]. |
1268 |
||
1269 |
privateClassesPerClass notEmpty ifTrue:[ |
|
6879 | 1270 |
|stream action| |
5591 | 1271 |
|
6879 | 1272 |
stream := WriteStream on:(Array new). |
5591 | 1273 |
|
8752 | 1274 |
action := |
1275 |
[:eachClass | |
|
6879 | 1276 |
|bucket| |
5591 | 1277 |
|
6879 | 1278 |
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
|
1279 |
|
6879 | 1280 |
bucket := privateClassesPerClass at:eachClass ifAbsent:nil. |
1281 |
bucket notNil ifTrue:[ |
|
1282 |
bucket do:action. |
|
1283 |
] |
|
8752 | 1284 |
]. |
5591 | 1285 |
|
6879 | 1286 |
classesOrdered do:action. |
1287 |
classesOrdered := stream contents. |
|
5591 | 1288 |
]. |
1289 |
||
1290 |
"/ |
|
1291 |
"/ does not work (yet) |
|
1292 |
"/ classes addFirst:AllEntry. |
|
1293 |
^ classesOrdered |
|
1294 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1295 |
"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
|
1296 |
"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
|
1297 |
! |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1298 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1299 |
listOfClassesByInheritance |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1300 |
"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
|
1301 |
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
|
1302 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1303 |
|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
|
1304 |
privateClassesPerClass nameFilterIncludesMatchCharacters lcNameFilter| |
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 |
allName := self class nameListEntryForALL. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1307 |
nameSpaceFilter := self nameSpaceFilter value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1308 |
nameSpaceFilter notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1309 |
(nameSpaceFilter includes:allName) ifTrue:[nameSpaceFilter := nil]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1310 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1311 |
packageFilter := self packageFilter value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1312 |
packageFilter notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1313 |
(packageFilter includes:allName) ifTrue:[packageFilter := nil]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1314 |
]. |
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 |
inGeneratorHolder isNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1317 |
"/ for standAlone testing |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1318 |
generator := Smalltalk allClasses. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1319 |
(self hideUnloadedClasses value) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1320 |
generator := generator select:[:cls | cls isLoaded] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1321 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1322 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1323 |
generator := inGeneratorHolder value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1324 |
generator isNil ifTrue:[^ #() ]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1325 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1326 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1327 |
classesAlready := IdentitySet new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1328 |
classes := Set new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1329 |
classesOrdered := OrderedCollection new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1330 |
hidePrivate := self hidePrivateClasses value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1331 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1332 |
privateClassesPerClass := IdentityDictionary new. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1333 |
nameFilterIncludesMatchCharacters := nameFilter notNil and:[nameFilter includesMatchCharacters]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1334 |
nameFilter notNil ifTrue:[ lcNameFilter := nameFilter asLowercase]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1335 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1336 |
generator do:[:cls | |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1337 |
|owner bucket| |
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 |
(hidePrivate not or:[cls isPrivate not]) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1340 |
ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1341 |
(nameSpaceFilter isNil |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1342 |
or:[self isClass:cls shownWithNameSpaceFilter:nameSpaceFilter]) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1343 |
(packageFilter isNil |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1344 |
or:[self isClass:cls shownWithPackageFilter:packageFilter]) ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1345 |
(classesAlready includes:cls) ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1346 |
classesAlready add:cls. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1347 |
(owner := cls owningClass) notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1348 |
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
|
1349 |
bucket add:cls. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1350 |
] ifFalse:[ |
10529
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1351 |
cls isJavaClass ifTrue:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1352 |
cls isAnonymous ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1353 |
classes add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1354 |
] |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1355 |
] ifFalse:[ |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1356 |
classes add:cls. |
bf7dcbf92471
Improvement in system browser: when no one of selected classes supports
vrany
parents:
10421
diff
changeset
|
1357 |
] |
10134
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 |
] |
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 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1363 |
]. |
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 |
privateClassesPerClass keysAndValuesDo: |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1366 |
[:owner :privateClasses| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1367 |
(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
|
1368 |
ifTrue:[classes addAll: privateClasses]]. |
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 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1371 |
classes size == 1 ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1372 |
classesOrdered := classes asArray. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1373 |
self classLabelHolder value:(classes first name) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1374 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1375 |
"/ self classLabelHolder value:(classes size printString , ' classes'). |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1376 |
" sortBy value ~~ #doNotSort ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1377 |
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
|
1378 |
]" |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1379 |
classesOrdered := ClassSorter sort: classes. |
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 |
privateClassesPerClass notEmpty ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1383 |
|stream action| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1384 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1385 |
stream := WriteStream on:(Array new). |
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 |
action := [:eachClass | |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1388 |
|bucket| |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1389 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1390 |
stream nextPut:eachClass. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1391 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1392 |
bucket := privateClassesPerClass at:eachClass ifAbsent:nil. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1393 |
bucket notNil ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1394 |
bucket do:action. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1395 |
] |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1396 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1397 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1398 |
classesOrdered do:action. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1399 |
classesOrdered := stream contents. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1400 |
]. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1401 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1402 |
"/ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1403 |
"/ does not work (yet) |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1404 |
"/ classes addFirst:AllEntry. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1405 |
^ classesOrdered |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1406 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1407 |
"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
|
1408 |
"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
|
1409 |
"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
|
1410 |
"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
|
1411 |
"Modified: / 07-08-2011 / 16:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1412 |
! |
1413 |
||
1414 |
makeDependent |
|
1415 |
Smalltalk addDependent:self. |
|
1416 |
ChangeSet addDependent:self. |
|
1417 |
||
1418 |
"Created: / 5.2.2000 / 13:42:17 / cg" |
|
1419 |
! |
|
1420 |
||
1421 |
makeIndependent |
|
1422 |
Smalltalk removeDependent:self. |
|
1423 |
ChangeSet removeDependent:self. |
|
1424 |
! |
|
1425 |
||
1426 |
nameListForClasses:aClassList |
|
1427 |
|orgMode namespaces showNamespaces fullNameList nameList |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1428 |
filteredPackages filteredNameSpaces classesInRemoteChangeSet |
7708 | 1429 |
classNamesInChangeSet classNamesInRemoteChangeSet| |
5591 | 1430 |
|
1431 |
showNamespaces := false. |
|
1432 |
||
1433 |
filteredNameSpaces := nameSpaceFilter value. |
|
1434 |
(filteredNameSpaces isNil |
|
6738
8226c7e2907b
magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents:
6716
diff
changeset
|
1435 |
and:[self organizerMode value ~~ OrganizerCanvas organizerModeNamespace]) ifTrue:[ |
5950 | 1436 |
showNamespaces := true. "/ if no filter, always show the namespace. |
5591 | 1437 |
] ifFalse:[ |
5950 | 1438 |
(filteredNameSpaces size > 1 |
1439 |
or:[(filteredNameSpaces size > 0) |
|
1440 |
and:[filteredNameSpaces includes:(self class nameListEntryForALL)]]) ifTrue:[ |
|
1441 |
showNamespaces := true |
|
1442 |
] ifFalse:[ |
|
1443 |
"/ if there are classes from multiple namespaces, |
|
1444 |
"/ show the full name |
|
5591 | 1445 |
|
5950 | 1446 |
namespaces := IdentitySet new. |
1447 |
fullNameList := OrderedCollection new. |
|
5591 | 1448 |
|
5950 | 1449 |
aClassList |
1450 |
do:[:cls | |nm| |
|
1451 |
nm := cls nameInBrowser. |
|
1452 |
fullNameList add:nm. |
|
1453 |
namespaces add:cls topNameSpace. |
|
1454 |
]. |
|
1455 |
showNamespaces := namespaces size > 1 |
|
1456 |
]. |
|
5591 | 1457 |
]. |
1458 |
||
1459 |
orgMode := organizerMode value. |
|
1460 |
filteredPackages := packageFilter value value. |
|
1461 |
||
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1462 |
classNamesInChangeSet := ChangeSet current changedClasses |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1463 |
collect:[:each | each theNonMetaclass name]. |
5591 | 1464 |
|
7503 | 1465 |
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ]. |
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1466 |
classNamesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass name]. |
7503 | 1467 |
|
5591 | 1468 |
nameList := aClassList |
5950 | 1469 |
collect:[:cls | |
5591 | 1470 |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1471 |
|className nm pkg emPkg hasExtensions isInChangeSet isInRemoteChangeSet icon |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1472 |
clr| |
5591 | 1473 |
|
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1474 |
className := cls theNonMetaclass name. |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1475 |
isInChangeSet := classNamesInChangeSet includes:className. |
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1476 |
isInRemoteChangeSet := classNamesInRemoteChangeSet includes:className. |
5591 | 1477 |
|
5950 | 1478 |
nm := self nameListEntryFor:cls withNameSpace:showNamespaces. |
9431 | 1479 |
|
9437 | 1480 |
self showCoverageInformation value ifTrue:[ |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1481 |
clr := self colorForCoverageInformationOfClass:cls. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1482 |
clr notNil ifTrue:[ |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1483 |
nm := self colorize:nm with:#color -> clr |
9431 | 1484 |
]. |
11955
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1485 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1486 |
clr isNil ifTrue:[ |
9431 | 1487 |
isInChangeSet ifTrue:[ |
1488 |
nm := self emphasizeForChangedCode:nm |
|
1489 |
]. |
|
1490 |
isInRemoteChangeSet ifTrue:[ |
|
1491 |
nm := (self colorizeForChangedCodeInSmallTeam:'!! '),nm |
|
1492 |
]. |
|
7503 | 1493 |
]. |
5591 | 1494 |
|
6916 | 1495 |
pkg := cls package ? '-'. |
5950 | 1496 |
hasExtensions := cls hasExtensions. |
1497 |
hasExtensions ifTrue:[ |
|
1498 |
emPkg := self emphasizeForDifferentPackage:'+'. "/ self emphasizeForDifferentPackage:pkg. |
|
1499 |
]. |
|
5591 | 1500 |
|
6738
8226c7e2907b
magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents:
6716
diff
changeset
|
1501 |
orgMode == OrganizerCanvas organizerModeProject ifTrue:[ |
5950 | 1502 |
(filteredPackages notNil |
1503 |
and:[(filteredPackages includes:cls package) not]) ifTrue:[ |
|
1504 |
"/ class is in another packae; |
|
1505 |
"/ however, class is listed due to methods |
|
1506 |
"/ in the filtered package |
|
1507 |
hasExtensions ifTrue:[ |
|
1508 |
nm := nm , emPkg. |
|
1509 |
] ifFalse:[ |
|
1510 |
nm := nm , ' [ ' , pkg, ' ]'. |
|
1511 |
]. |
|
1512 |
] ifFalse:[ |
|
1513 |
"/ any methods from other packages in this class ? |
|
1514 |
hasExtensions ifTrue:[ |
|
1515 |
nm := nm , (self emphasizeForDifferentPackage:'+'). |
|
1516 |
]. |
|
1517 |
]. |
|
1518 |
] ifFalse:[ |
|
1519 |
showClassPackages value == true ifTrue:[ |
|
1520 |
"/ add the package; |
|
1521 |
hasExtensions ifTrue:[ |
|
6006 | 1522 |
nm := nm , ' [ ' , pkg, ' ]' , (self emphasizeForDifferentPackage:'+'). |
5950 | 1523 |
"/ isInChangeSet ifFalse:[ |
1524 |
"/ nm := self colorizeForDifferentPackage:nm |
|
1525 |
"/ ]. |
|
1526 |
] ifFalse:[ |
|
1527 |
nm := nm , (self colorizeGrey:(' [ ' , pkg, ' ]')). |
|
1528 |
]. |
|
1529 |
] ifFalse:[ |
|
1530 |
hasExtensions ifTrue:[ |
|
1531 |
nm := nm , emPkg. |
|
1532 |
"/ isInChangeSet ifFalse:[ |
|
1533 |
"/ nm := self colorizeForDifferentPackage:nm |
|
1534 |
"/ ] |
|
1535 |
]. |
|
1536 |
] |
|
1537 |
]. |
|
6879 | 1538 |
|
1539 |
isInChangeSet ifTrue:[ |
|
7055 | 1540 |
nm := nm , self class markForBeingInChangeList |
6879 | 1541 |
]. |
5591 | 1542 |
"/ cls isVisualStartable ifTrue:[ |
1543 |
"/ nm := LabelAndIcon icon:((SystemBrowser visualStartableClassIcon) |
|
1544 |
"/ onDevice:self window device) |
|
1545 |
"/ string:nm |
|
1546 |
"/ ]. |
|
5950 | 1547 |
markApplicationsHolder value== true ifTrue:[ |
6902 | 1548 |
icon := self iconForClass:cls theNonMetaclass. |
5950 | 1549 |
icon isNil ifTrue:[ |
1550 |
icon := SystemBrowser emptyIcon |
|
1551 |
]. |
|
1552 |
nm := LabelAndIcon icon:icon string:nm |
|
5591 | 1553 |
|
5950 | 1554 |
]. |
1555 |
nm |
|
1556 |
]. |
|
5591 | 1557 |
|
1558 |
^ nameList |
|
1559 |
||
11945
cf6443ca4542
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11938
diff
changeset
|
1560 |
"Modified: / 27-10-2012 / 12:32:20 / cg" |
5591 | 1561 |
! |
1562 |
||
1563 |
reconstructNameList |
|
8274
31eb11f780e7
ST/X Bug 830 - Private class in private class list of SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
8263
diff
changeset
|
1564 |
"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
|
1565 |
Invoked when the organizerMode mode changes" |
5591 | 1566 |
|
1567 |
|prevMode listView oldNameList newNameList sav| |
|
1568 |
||
1569 |
self classList value isNil ifTrue:[ |
|
8072 | 1570 |
self updateList |
5591 | 1571 |
]. |
1572 |
||
1573 |
newNameList := self nameListForClasses:(classList value ? #()). |
|
1574 |
oldNameList := self classNameList value ? #(). |
|
1575 |
(newNameList |
|
8072 | 1576 |
sameContentsAs: oldNameList |
1577 |
whenComparedWith:[:a :b | (a sameStringAndEmphasisAs: b) |
|
1578 |
and:[ a hasImage == b hasImage |
|
1579 |
and:[ a hasIcon == b hasIcon ]]] |
|
5591 | 1580 |
) |
1581 |
ifTrue:[ |
|
8072 | 1582 |
"/ no need to update |
5591 | 1583 |
] ifFalse:[ |
8072 | 1584 |
builder notNil ifTrue:[ |
1585 |
listView := builder componentAt:#List. |
|
1586 |
]. |
|
1587 |
(listView isNil or:[listView scrolledView isNil]) ifTrue:[ |
|
1588 |
"/ invoked very early during setup |
|
1589 |
self classNameList value:newNameList |
|
1590 |
] ifFalse:[ |
|
1591 |
"/ avoid flicker and useless redraws |
|
5591 | 1592 |
|
8072 | 1593 |
prevMode := listView scrollWhenUpdating. |
1594 |
listView scrollWhenUpdating:nil. |
|
5591 | 1595 |
|
8072 | 1596 |
"/ this will lead to a selectionIndex change (done by the selListView); |
1597 |
"/ however, we dont want this here, since it recurses into |
|
1598 |
"/ a selectionChange. Therefore, temporarily disconnect the selectionIndexHolder... |
|
1599 |
[ |
|
1600 |
self selectedClassNameIndices removeDependent:self. |
|
1601 |
"/ also, dont want a callback (selectionChangedByClick) |
|
1602 |
sav := listView action. |
|
1603 |
listView action:nil. |
|
1604 |
self classNameList value:newNameList. |
|
1605 |
] ensure:[ |
|
1606 |
listView action:sav. |
|
1607 |
self selectedClassNameIndices addDependent:self. |
|
1608 |
listView scrollWhenUpdating:prevMode. |
|
1609 |
]. |
|
1610 |
] |
|
5591 | 1611 |
]. |
1612 |
||
1613 |
"Modified: / 31.10.2001 / 11:33:21 / cg" |
|
1614 |
! |
|
1615 |
||
1616 |
updateClassesIn:aCollection |
|
1617 |
"replace any obsolete class in aCollection; |
|
1618 |
return true, if any was found" |
|
1619 |
||
1620 |
|found meta classes| |
|
1621 |
||
1622 |
found := false. |
|
1623 |
||
1624 |
aCollection isSequenceable ifFalse:[ |
|
1625 |
classes := aCollection copy. |
|
1626 |
aCollection removeAll. |
|
1627 |
classes do:[:cls | |
|
1628 |
|newClass| |
|
1629 |
||
1630 |
meta := cls isMeta. |
|
1631 |
newClass := Smalltalk at:(cls theNonMetaclass name). |
|
1632 |
newClass isNil ifTrue:[ |
|
1633 |
newClass := cls |
|
1634 |
] ifFalse:[ |
|
1635 |
meta ifTrue:[ |
|
1636 |
newClass := newClass class |
|
1637 |
] |
|
1638 |
]. |
|
1639 |
found := cls ~~ newClass. |
|
1640 |
aCollection add:newClass. |
|
1641 |
]. |
|
1642 |
] ifTrue:[ |
|
1643 |
aCollection keysAndValuesDo:[:idx :cls | |
|
1644 |
|newClass| |
|
1645 |
||
1646 |
cls notNil ifTrue:[ |
|
1647 |
meta := cls isMeta. |
|
1648 |
newClass := Smalltalk at:(cls theNonMetaclass name). |
|
1649 |
newClass isNil ifTrue:[ |
|
1650 |
newClass := cls |
|
1651 |
] ifFalse:[ |
|
1652 |
meta ifTrue:[ |
|
1653 |
newClass := newClass class |
|
1654 |
] |
|
1655 |
]. |
|
1656 |
found := cls ~~ newClass. |
|
1657 |
aCollection at:idx put:newClass. |
|
1658 |
] |
|
1659 |
]. |
|
1660 |
]. |
|
1661 |
^ found |
|
1662 |
! |
|
1663 |
||
1664 |
updateList |
|
1665 |
|prevSelection oldList newList newSelectionIndices |
|
6712 | 1666 |
forceSelectionChange selectedClassNameIndicesHolder classList |
1667 |
classesAddedToList classesRemovedFromList newSet oldSet| |
|
5591 | 1668 |
|
1669 |
newList := self listOfClasses. |
|
1670 |
classList := self classList. |
|
1671 |
oldList := classList value ? #(). |
|
1672 |
||
6712 | 1673 |
autoSelect == true ifTrue:[ |
1674 |
classesRemovedFromList := OrderedCollection new. |
|
1675 |
newSet := newList asSet. |
|
1676 |
oldSet := oldList asSet. |
|
1677 |
classesAddedToList := newSet select:[:eachNewClass | (oldSet includes:eachNewClass) not]. |
|
1678 |
classesRemovedFromList := oldSet select:[:eachOldClass | (newSet includes:eachOldClass) not]. |
|
1679 |
]. |
|
1680 |
||
5591 | 1681 |
(newList ~= oldList |
1682 |
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
|
1683 |
prevSelection := lastSelectedClasses ? #(). |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1684 |
prevSelection := prevSelection select:[:each | each notNil]. |
5591 | 1685 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1686 |
(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
|
1687 |
"/ no need to tell anybody |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1688 |
classList setValue:newList. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1689 |
] ifFalse:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1690 |
classList value:newList. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1691 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1692 |
self reconstructNameList. |
5591 | 1693 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1694 |
(prevSelection size == 0 |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1695 |
and:[self selectedClasses value size ~~ 0]) ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1696 |
"/ this happens during early startup time, |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1697 |
"/ when the selection is already (pre-)set, |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1698 |
"/ 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
|
1699 |
"/ (i.e. when opened with preset selection) |
5591 | 1700 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1701 |
"/ 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
|
1702 |
prevSelection := self selectedClasses value. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1703 |
prevSelection := prevSelection select:[:cls | cls notNil]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1704 |
"/ 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
|
1705 |
forceSelectionChange := true. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1706 |
]. |
5591 | 1707 |
|
6712 | 1708 |
autoSelect == true ifTrue:[ |
1709 |
prevSelection isNil ifTrue:[ |
|
1710 |
prevSelection := OrderedCollection new |
|
1711 |
]. |
|
1712 |
prevSelection := prevSelection asOrderedCollection. |
|
1713 |
||
1714 |
classesAddedToList do:[:eachNewClass | |
|
1715 |
(prevSelection includes:eachNewClass) ifFalse:[ |
|
1716 |
prevSelection add:eachNewClass. |
|
1717 |
]. |
|
1718 |
]. |
|
1719 |
classesRemovedFromList do:[:eachOldClass | |
|
1720 |
prevSelection remove:eachOldClass ifAbsent:[]. |
|
1721 |
]. |
|
1722 |
]. |
|
1723 |
||
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1724 |
newSelectionIndices := prevSelection |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1725 |
collect:[:item | |cls| |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1726 |
cls := Smalltalk at:item theNonMetaclass name. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1727 |
newList identityIndexOf:cls] |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1728 |
thenSelect:[:index | index ~~ 0]. |
5591 | 1729 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1730 |
selectedClassNameIndicesHolder := self selectedClassNameIndices. |
6749
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1731 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1732 |
((selectedClassNameIndicesHolder value size ~~ self selectedClasses value size) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1733 |
or:[newSelectionIndices ~= selectedClassNameIndicesHolder value]) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1734 |
ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1735 |
newSelectionIndices notEmpty ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1736 |
"/ force change (for dependents) |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1737 |
"/ selectedClassNameIndicesHolder value:newSelectionIndices. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1738 |
] ifFalse:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1739 |
prevSelection := self selectedClasses value. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1740 |
newSelectionIndices := #(). |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1741 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1742 |
selectedClassNameIndicesHolder value:newSelectionIndices. |
5591 | 1743 |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1744 |
prevSelection notNil ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1745 |
lastSelectedClasses := prevSelection. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1746 |
]. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1747 |
self updateOutputGenerator. |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1748 |
]. |
5591 | 1749 |
|
1750 |
] ifFalse:[ |
|
6318
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1751 |
"/ 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
|
1752 |
newList size > 0 ifTrue:[ |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1753 |
self reconstructNameList |
9a3fc13f86be
care for non-existing class in selection
Claus Gittinger <cg@exept.de>
parents:
6208
diff
changeset
|
1754 |
] |
5591 | 1755 |
]. |
1756 |
listValid := true. |
|
1757 |
||
1758 |
"Created: / 5.2.2000 / 13:42:18 / cg" |
|
1759 |
"Modified: / 31.10.2001 / 11:35:39 / cg" |
|
1760 |
! |
|
1761 |
||
1762 |
updateListsFor:aClass |
|
1763 |
|classes found foundInSelection| |
|
1764 |
||
1765 |
found := foundInSelection := false. |
|
1766 |
||
1767 |
"/ update for a changed class in the classList |
|
1768 |
(classes := classList value) size > 0 ifTrue:[ |
|
7984 | 1769 |
(self updateClassesIn:classes) ifTrue:[ |
1770 |
found := true |
|
1771 |
]. |
|
1772 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1773 |
"/ self halt:'should not happen'. |
7984 | 1774 |
classList value:(classes := classes select:[:each | each notNil]). |
1775 |
]. |
|
5591 | 1776 |
]. |
1777 |
"/ possibly in the generator |
|
1778 |
((classes := inGeneratorHolder value) isOrderedCollection |
|
1779 |
and:[classes size > 0]) ifTrue:[ |
|
7984 | 1780 |
(self updateClassesIn:classes) ifTrue:[ |
1781 |
found := true |
|
1782 |
]. |
|
1783 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1784 |
"/ self halt:'should not happen'. |
7984 | 1785 |
inGeneratorHolder value:(classes select:[:each | each notNil]). |
1786 |
] |
|
5591 | 1787 |
]. |
1788 |
"/ and in the selection |
|
1789 |
(classes := self selectedClasses value) size > 0 ifTrue:[ |
|
7984 | 1790 |
(self updateClassesIn:classes) ifTrue:[ |
1791 |
found := true. |
|
1792 |
foundInSelection := true. |
|
1793 |
]. |
|
1794 |
(classes includes:nil) ifTrue:[ |
|
7985 | 1795 |
"/ self halt:'should not happen'. |
7984 | 1796 |
self selectedClasses value:(classes select:[:each | each notNil]). |
1797 |
] |
|
5591 | 1798 |
]. |
1799 |
"/ and in the last selection |
|
1800 |
(classes := lastSelectedClasses) size > 0 ifTrue:[ |
|
7984 | 1801 |
(self updateClassesIn:classes) ifTrue:[ |
1802 |
found := true |
|
1803 |
]. |
|
1804 |
(classes includes:nil) ifTrue:[ |
|
1805 |
"/ self halt:'should not happen'. |
|
1806 |
lastSelectedClasses := (classes select:[:each | each notNil]). |
|
1807 |
] |
|
5591 | 1808 |
]. |
1809 |
||
1810 |
found ifFalse:[ |
|
7984 | 1811 |
"/ could be a new class (or no-longer autolaoded one). |
1812 |
listValid ifTrue:[ |
|
1813 |
self enqueueDelayedUpdateList. |
|
1814 |
]. |
|
5591 | 1815 |
]. |
1816 |
foundInSelection ifTrue:[ |
|
7984 | 1817 |
"/ force update of output generator |
1818 |
self selectedClasses |
|
1819 |
removeDependent:self; |
|
1820 |
changed; |
|
1821 |
addDependent:self. |
|
5591 | 1822 |
]. |
1823 |
||
11561 | 1824 |
"Modified: / 05-06-2012 / 23:39:25 / cg" |
5591 | 1825 |
! ! |
1826 |
||
9431 | 1827 |
!ClassList methodsFor:'private-presentation'! |
1828 |
||
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1829 |
colorForCoverageInformationOfClass:aClass |
9431 | 1830 |
|instrumented anyPartiallyCovered anyCalled anyNotCalled| |
1831 |
||
1832 |
instrumented := anyPartiallyCovered := anyCalled := anyNotCalled := false. |
|
1833 |
aClass instAndClassMethodsDo:[:m | |
|
9447
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1834 |
m category = 'documentation' ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1835 |
m isInstrumented ifTrue:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1836 |
instrumented := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1837 |
m hasBeenCalled ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1838 |
anyNotCalled := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1839 |
] ifTrue:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1840 |
anyCalled := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1841 |
m haveAllBlocksBeenExecuted ifFalse:[ |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1842 |
anyPartiallyCovered := true. |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1843 |
"/ no need to search further... |
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1844 |
^ UserPreferences current colorForInstrumentedPartiallyCoveredCode |
9447
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1845 |
] |
3c3126346495
changed: #emphasisForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9437
diff
changeset
|
1846 |
]. |
9431 | 1847 |
]. |
1848 |
]. |
|
1849 |
]. |
|
1850 |
instrumented ifFalse:[ ^ nil]. |
|
1851 |
||
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1852 |
anyCalled ifFalse:[ ^ UserPreferences current colorForInstrumentedNeverCalledCode ]. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1853 |
anyNotCalled ifFalse:[ ^ UserPreferences current colorForInstrumentedFullyCoveredCode ]. |
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1854 |
^ UserPreferences current colorForInstrumentedPartiallyCoveredCode |
9431 | 1855 |
|
9453
af1dff01c1d0
added: #colorForCoverageInformationOfClass:
Claus Gittinger <cg@exept.de>
parents:
9447
diff
changeset
|
1856 |
"Created: / 28-04-2010 / 14:05:27 / cg" |
9431 | 1857 |
! |
1858 |
||
1859 |
iconForClass:aClass |
|
1860 |
^ SystemBrowser iconForClass:aClass |
|
1861 |
||
1862 |
"Created: / 17-08-2006 / 09:12:32 / cg" |
|
1863 |
! |
|
1864 |
||
1865 |
indentPerPrivacyLevel |
|
1866 |
^ 4 |
|
1867 |
! |
|
1868 |
||
1869 |
nameListEntryFor:aClass withNameSpace:useFullName |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1870 |
|sortByNameAndInheritance nm indent owner orgMode indentString javaPackage| |
9431 | 1871 |
|
1872 |
aClass == (self class nameListEntryForALL) ifTrue:[ ^ aClass ]. |
|
1873 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1874 |
sortByNameAndInheritance := self sortByNameAndInheritance value. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1875 |
|
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1876 |
sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1877 |
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
|
1878 |
] ifFalse:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1879 |
nm := aClass nameInBrowser. |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1880 |
]. |
9431 | 1881 |
|
1882 |
aClass isLoaded ifFalse:[ |
|
1883 |
unloadedClassesColor notNil ifTrue:[ |
|
1884 |
nm := nm colorizeAllWith:unloadedClassesColor |
|
1885 |
] |
|
1886 |
]. |
|
1887 |
||
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1888 |
aClass isLoaded ifFalse:[ |
11881
fe2d88632160
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11864
diff
changeset
|
1889 |
"/ nm := nm,(' (?) ' colorizeAllWith:Color grey). |
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1890 |
] ifTrue:[ |
11952
2f2b5c6e81f7
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11945
diff
changeset
|
1891 |
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
|
1892 |
colorizeAllWith:self class pseudoEntryForegroundColor). |
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1893 |
]. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1894 |
|
9431 | 1895 |
orgMode := organizerMode value. |
1896 |
orgMode == OrganizerCanvas organizerModeHierarchy ifTrue:[ |
|
1897 |
"/ always show the full name |
|
1898 |
^ nm |
|
1899 |
]. |
|
1900 |
orgMode == OrganizerCanvas organizerModeClassHierarchy ifTrue:[ |
|
1901 |
"/ always show the full name |
|
1902 |
^ nm |
|
1903 |
]. |
|
1904 |
||
1905 |
aClass isJavaClass ifTrue:[ |
|
1906 |
"/ only show the last name, unless multiple packages are shown in the list |
|
1907 |
javaPackage := aClass package. |
|
1908 |
(self classList value contains:[:cls | cls package ~= javaPackage]) ifTrue:[ |
|
1909 |
^ nm |
|
1910 |
]. |
|
1911 |
^ aClass lastName |
|
1912 |
]. |
|
1913 |
||
1914 |
useFullName ifFalse:[ |
|
1915 |
aClass isPrivate ifFalse:[ |
|
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1916 |
sortByNameAndInheritance ifTrue:[ |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1917 |
^ (self nameListIndentStringFor: aClass withNameSpace: useFullName) , aClass nameWithoutNameSpacePrefix |
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1918 |
]. |
9431 | 1919 |
^ aClass nameWithoutNameSpacePrefix |
1920 |
] |
|
1921 |
]. |
|
1922 |
||
1923 |
"/ full name required if owner is not in the list |
|
1924 |
owner := aClass owningClass. |
|
1925 |
(owner isNil |
|
11864
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1926 |
or:[(self classList value includesIdentical:owner) not]) ifFalse:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1927 |
|
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1928 |
"/ namespace |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1929 |
indent := (nm count:[:char | char == $:]) // 2. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1930 |
indent > 0 ifTrue:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1931 |
indent := indent * self indentPerPrivacyLevel. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1932 |
indentString := String new:indent withAll:Character space. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1933 |
sortByNameAndInheritance ifTrue:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1934 |
nm := (self nameListIndentStringFor:owner withNameSpace:useFullName) |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1935 |
, indentString , '::' , aClass nameWithoutPrefix. |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1936 |
] ifFalse:[ |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1937 |
nm := indentString , '::' , aClass nameWithoutPrefix |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1938 |
] |
614bca1b265a
changed: #nameListEntryFor:withNameSpace:
Claus Gittinger <cg@exept.de>
parents:
11561
diff
changeset
|
1939 |
]. |
9431 | 1940 |
]. |
1941 |
||
1942 |
^ nm |
|
1943 |
||
10134
ffe89750eaf1
configurable \"Indent by inheritance\" behavior in classlist
Claus Gittinger <cg@exept.de>
parents:
9761
diff
changeset
|
1944 |
"Modified: / 04-07-2011 / 19:00:45 / cg" |
11955
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 |
nameListIndentStringFor:aClass withNameSpace:useFullName |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1948 |
| indent indentString cls | |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1949 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1950 |
indent := 0. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1951 |
indentString := ''. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1952 |
cls := aClass superclass. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1953 |
[self classList value includesIdentical:cls] |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1954 |
whileTrue: |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1955 |
[indent := indent + 1. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1956 |
cls := cls superclass]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1957 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1958 |
indent == 0 ifFalse:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1959 |
indent <= 5 ifTrue:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1960 |
indentString := #( |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1961 |
'' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1962 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1963 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1964 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1965 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1966 |
' ' |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1967 |
) at:indent+1. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1968 |
] ifFalse:[ |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1969 |
indentString := String new:indent*2 withAll:Character space. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1970 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1971 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1972 |
]. |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1973 |
^indentString |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1974 |
|
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1975 |
"Modified: / 24-02-2000 / 17:52:28 / cg" |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1976 |
"Created: / 21-01-2008 / 19:02:07 / janfrog" |
91a668e03acf
changed: #nameListForClasses:
Claus Gittinger <cg@exept.de>
parents:
11952
diff
changeset
|
1977 |
"Modified (format): / 04-07-2011 / 18:30:20 / cg" |
9431 | 1978 |
! ! |
1979 |
||
10421 | 1980 |
!ClassList methodsFor:'queries'! |
1981 |
||
1982 |
supportsSearch |
|
1983 |
||
1984 |
^(self componentAt: #List) notNil |
|
1985 |
||
1986 |
"Created: / 28-07-2011 / 17:46:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1987 |
! ! |
|
1988 |
||
5591 | 1989 |
!ClassList methodsFor:'setup'! |
1990 |
||
6749
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1991 |
autoSelect:aBoolean |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1992 |
autoSelect ~~ aBoolean ifTrue:[ |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1993 |
autoSelect := aBoolean. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1994 |
classList value:nil. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1995 |
]. |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1996 |
! |
7ba97d579490
fixes for use in MetricViewer
Claus Gittinger <cg@exept.de>
parents:
6738
diff
changeset
|
1997 |
|
8167 | 1998 |
classFilterBlock:aBlock |
1999 |
"use this to filter away unwanted packages" |
|
2000 |
||
2001 |
classFilterBlock := aBlock |
|
2002 |
! |
|
2003 |
||
5591 | 2004 |
postBuildWith:aBuilder |
2005 |
|classListView| |
|
2006 |
||
2007 |
super postBuildWith:aBuilder. |
|
2008 |
||
2009 |
classListView := aBuilder componentAt:'List'. |
|
2010 |
classListView notNil ifTrue:[ |
|
2011 |
classListView allowDrag:true. |
|
2012 |
classListView dragObjectConverter:[:obj | |
|
2013 |
|nm class idx| |
|
2014 |
||
2015 |
nm := obj theObject asString. |
|
2016 |
idx := classNameList value indexOf:nm. |
|
2017 |
idx == 0 ifTrue:[ |
|
2018 |
idx := classNameList value indexOf:nm string. |
|
2019 |
]. |
|
2020 |
class := classList value at:idx. |
|
2021 |
DropObject newClass:class. |
|
2022 |
]. |
|
2023 |
] |
|
2024 |
! ! |
|
2025 |
||
2026 |
!ClassList class methodsFor:'documentation'! |
|
2027 |
||
11561 | 2028 |
version |
12466 | 2029 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.71 2013-03-13 23:56:35 cg Exp $' |
11561 | 2030 |
! |
2031 |
||
8945 | 2032 |
version_CVS |
12466 | 2033 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.71 2013-03-13 23:56:35 cg Exp $' |
5591 | 2034 |
! ! |
12466 | 2035 |