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