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