author | Claus Gittinger <cg@exept.de> |
Sat, 03 Oct 2009 13:00:13 +0200 | |
changeset 8860 | d8ce6a00a43f |
parent 8848 | 1bc3db6d2e50 |
child 8867 | c926be235b4b |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 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:#MethodCategoryList |
|
17 |
instanceVariableNames:'variableFilter filterClassVars lastSelectedProtocols classes |
|
18 |
leafClasses protocolList rawProtocolList selectedProtocolIndices |
|
8694 | 19 |
lastGeneratedProtocols packageFilterOnInput |
20 |
methodVisibilityHolder noAllItem noPseudoItems |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
21 |
showPseudoProtocols' |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
22 |
classVariableNames:'AdditionalEmptyCategoriesPerClassName MethodInfoCache |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
23 |
MethodInfoCacheAccessLock' |
5591 | 24 |
poolDictionaries:'' |
25 |
category:'Interface-Browsers-New' |
|
26 |
! |
|
27 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
28 |
Object subclass:#CachedMethodInfo |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
29 |
instanceVariableNames:'flags' |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
30 |
classVariableNames:'FlagObsolete FlagSendsSuper FlagIsUncommented |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
31 |
FlagIsDocumentationMethod' |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
32 |
poolDictionaries:'' |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
33 |
privateIn:MethodCategoryList |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
34 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
35 |
|
5591 | 36 |
!MethodCategoryList class methodsFor:'documentation'! |
37 |
||
38 |
copyright |
|
39 |
" |
|
40 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
41 |
All Rights Reserved |
|
42 |
||
43 |
This software is furnished under a license and may be used |
|
44 |
only in accordance with the terms of that license and with the |
|
45 |
inclusion of the above copyright notice. This software may not |
|
46 |
be provided or otherwise made available to, or used by, any |
|
47 |
other person. No title to or ownership of the software is |
|
48 |
hereby transferred. |
|
49 |
" |
|
50 |
! ! |
|
51 |
||
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
52 |
!MethodCategoryList class methodsFor:'initialization'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
53 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
54 |
flushMethodInfo |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
55 |
MethodInfoCache := Dictionary new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
56 |
! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
57 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
58 |
initialize |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
59 |
MethodInfoCache := Dictionary new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
60 |
MethodInfoCacheAccessLock := RecursionLock new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
61 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
62 |
|
5591 | 63 |
!MethodCategoryList class methodsFor:'interface specs'! |
64 |
||
65 |
singleProtocolWindowSpec |
|
66 |
"This resource specification was automatically generated |
|
67 |
by the UIPainter of ST/X." |
|
68 |
||
69 |
"Do not manually edit this!! If it is corrupted, |
|
70 |
the UIPainter may not be able to read the specification." |
|
71 |
||
72 |
" |
|
73 |
UIPainter new openOnClass:MethodCategoryList andSelector:#singleProtocolWindowSpec |
|
74 |
MethodCategoryList new openInterface:#singleProtocolWindowSpec |
|
75 |
" |
|
76 |
||
77 |
<resource: #canvas> |
|
78 |
||
79 |
^ |
|
80 |
#(#FullSpec |
|
5592 | 81 |
#name: #singleProtocolWindowSpec |
82 |
#window: |
|
5591 | 83 |
#(#WindowSpec |
5592 | 84 |
#label: 'ProtocolList' |
85 |
#name: 'ProtocolList' |
|
86 |
#min: #(#Point 0 0) |
|
87 |
#max: #(#Point 1024 721) |
|
88 |
#bounds: #(#Rectangle 12 22 312 322) |
|
89 |
) |
|
90 |
#component: |
|
5591 | 91 |
#(#SpecCollection |
5592 | 92 |
#collection: #( |
93 |
#(#LabelSpec |
|
94 |
#label: 'ProtocolName' |
|
95 |
#name: 'ProtocolLabel' |
|
96 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
97 |
#translateLabel: true |
|
98 |
#labelChannel: #protocolLabelHolder |
|
99 |
#menu: #menuHolder |
|
100 |
) |
|
101 |
) |
|
5591 | 102 |
|
5592 | 103 |
) |
5591 | 104 |
) |
105 |
! |
|
106 |
||
107 |
windowSpec |
|
108 |
"This resource specification was automatically generated |
|
109 |
by the UIPainter of ST/X." |
|
110 |
||
111 |
"Do not manually edit this!! If it is corrupted, |
|
112 |
the UIPainter may not be able to read the specification." |
|
113 |
||
114 |
" |
|
115 |
UIPainter new openOnClass:MethodCategoryList andSelector:#windowSpec |
|
116 |
MethodCategoryList new openInterface:#windowSpec |
|
117 |
MethodCategoryList open |
|
118 |
" |
|
119 |
||
120 |
<resource: #canvas> |
|
121 |
||
122 |
^ |
|
123 |
#(#FullSpec |
|
6469 | 124 |
#name: #windowSpec |
125 |
#window: |
|
5591 | 126 |
#(#WindowSpec |
6469 | 127 |
#label: 'ProtocolList' |
128 |
#name: 'ProtocolList' |
|
129 |
#min: #(#Point 0 0) |
|
130 |
#max: #(#Point 1024 721) |
|
131 |
#bounds: #(#Rectangle 16 46 316 346) |
|
132 |
) |
|
133 |
#component: |
|
5591 | 134 |
#(#SpecCollection |
6469 | 135 |
#collection: #( |
136 |
#(#SequenceViewSpec |
|
137 |
#name: 'List' |
|
138 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
139 |
#tabable: true |
|
140 |
#model: #selectedProtocolIndices |
|
141 |
#menu: #menuHolder |
|
142 |
#hasHorizontalScrollBar: true |
|
143 |
#hasVerticalScrollBar: true |
|
144 |
#miniScrollerHorizontal: true |
|
145 |
#isMultiSelect: true |
|
146 |
#valueChangeSelector: #selectionChangedByClick |
|
147 |
#useIndex: true |
|
148 |
#sequenceList: #protocolList |
|
149 |
#doubleClickChannel: #doubleClickChannel |
|
150 |
#properties: |
|
151 |
#(#PropertyListDictionary |
|
152 |
#dragArgument: nil |
|
153 |
#dropArgument: nil |
|
154 |
#canDropSelector: #canDropContext: |
|
155 |
#dropSelector: #doDropContext: |
|
156 |
) |
|
157 |
) |
|
158 |
) |
|
5591 | 159 |
|
6469 | 160 |
) |
5591 | 161 |
) |
162 |
! ! |
|
163 |
||
164 |
!MethodCategoryList class methodsFor:'plugIn spec'! |
|
165 |
||
166 |
aspectSelectors |
|
167 |
"This resource specification was automatically generated |
|
168 |
by the UIPainter of ST/X." |
|
169 |
||
170 |
"Do not manually edit this. If it is corrupted, |
|
171 |
the UIPainter may not be able to read the specification." |
|
172 |
||
173 |
"Return a description of exported aspects; |
|
174 |
these can be connected to aspects of an embedding application |
|
175 |
(if this app is embedded in a subCanvas)." |
|
176 |
||
177 |
^ #( |
|
8694 | 178 |
#(#doubleClickChannel #action ) |
179 |
#filterClassVars |
|
180 |
#forceGeneratorTrigger |
|
181 |
#immediateUpdate |
|
182 |
#inGeneratorHolder |
|
183 |
#menuHolder |
|
184 |
#noAllItem |
|
185 |
#showPseudoProtocols |
|
186 |
#outGeneratorHolder |
|
187 |
#packageFilter |
|
188 |
#packageFilterOnInput |
|
189 |
#selectedProtocols |
|
190 |
#selectionChangeCondition |
|
191 |
#updateTrigger |
|
192 |
#variableFilter |
|
193 |
#methodVisibilityHolder |
|
5591 | 194 |
). |
195 |
! ! |
|
196 |
||
197 |
!MethodCategoryList methodsFor:'aspects'! |
|
198 |
||
199 |
browserNameList |
|
200 |
^ self protocolList |
|
201 |
! |
|
202 |
||
203 |
defaultSlaveModeValue |
|
204 |
^ false. |
|
205 |
! |
|
206 |
||
207 |
filterClassVars |
|
208 |
filterClassVars isNil ifTrue:[ |
|
209 |
filterClassVars := false asValue. |
|
210 |
filterClassVars addDependent:self |
|
211 |
]. |
|
212 |
^ filterClassVars |
|
213 |
||
214 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
215 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
216 |
! |
|
217 |
||
218 |
filterClassVars:aValueHolder |
|
219 |
filterClassVars notNil ifTrue:[ |
|
220 |
filterClassVars removeDependent:self |
|
221 |
]. |
|
222 |
filterClassVars := aValueHolder. |
|
223 |
filterClassVars notNil ifTrue:[ |
|
224 |
filterClassVars addDependent:self |
|
225 |
]. |
|
226 |
||
227 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
228 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
229 |
! |
|
230 |
||
231 |
methodVisibilityHolder |
|
232 |
methodVisibilityHolder isNil ifTrue:[ |
|
233 |
methodVisibilityHolder := false asValue. |
|
234 |
methodVisibilityHolder addDependent:self |
|
235 |
]. |
|
236 |
^ methodVisibilityHolder |
|
237 |
! |
|
238 |
||
239 |
methodVisibilityHolder:aValueHolder |
|
240 |
methodVisibilityHolder notNil ifTrue:[ |
|
241 |
methodVisibilityHolder removeDependent:self |
|
242 |
]. |
|
243 |
methodVisibilityHolder := aValueHolder. |
|
244 |
methodVisibilityHolder notNil ifTrue:[ |
|
245 |
methodVisibilityHolder addDependent:self |
|
246 |
]. |
|
247 |
||
248 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
249 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
250 |
! |
|
251 |
||
252 |
noAllItem |
|
253 |
noAllItem isNil ifTrue:[ |
|
254 |
noAllItem := false asValue. |
|
255 |
noAllItem addDependent:self |
|
256 |
]. |
|
257 |
^ noAllItem |
|
258 |
! |
|
259 |
||
260 |
noAllItem:aValueHolder |
|
261 |
noAllItem notNil ifTrue:[ |
|
262 |
noAllItem removeDependent:self |
|
263 |
]. |
|
264 |
noAllItem := aValueHolder. |
|
265 |
noAllItem notNil ifTrue:[ |
|
266 |
noAllItem addDependent:self |
|
267 |
]. |
|
268 |
! |
|
269 |
||
270 |
packageFilterOnInput |
|
271 |
packageFilterOnInput isNil ifTrue:[ |
|
272 |
packageFilterOnInput := nil asValue. |
|
273 |
packageFilterOnInput addDependent:self |
|
274 |
]. |
|
275 |
^ packageFilterOnInput |
|
276 |
! |
|
277 |
||
278 |
packageFilterOnInput:aValueHolder |
|
279 |
|prevFilter| |
|
280 |
||
281 |
prevFilter := packageFilterOnInput value. |
|
282 |
packageFilterOnInput notNil ifTrue:[ |
|
283 |
packageFilterOnInput removeDependent:self |
|
284 |
]. |
|
285 |
packageFilterOnInput := aValueHolder. |
|
286 |
packageFilterOnInput notNil ifTrue:[ |
|
287 |
packageFilterOnInput addDependent:self |
|
288 |
]. |
|
289 |
prevFilter ~= packageFilterOnInput value ifTrue:[ |
|
290 |
self enqueueDelayedUpdateList |
|
291 |
]. |
|
292 |
! |
|
293 |
||
294 |
protocolLabelHolder |
|
295 |
^ self pseudoListLabelHolder |
|
296 |
! |
|
297 |
||
298 |
protocolList |
|
299 |
protocolList isNil ifTrue:[ |
|
300 |
protocolList := List new. "/ ValueHolder new |
|
301 |
]. |
|
302 |
^ protocolList |
|
303 |
||
304 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
305 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
306 |
! |
|
307 |
||
308 |
rawProtocolList |
|
309 |
rawProtocolList isNil ifTrue:[ |
|
310 |
rawProtocolList := List new. |
|
311 |
]. |
|
312 |
^ rawProtocolList |
|
313 |
! |
|
314 |
||
315 |
selectedProtocolIndices |
|
316 |
selectedProtocolIndices isNil ifTrue:[ |
|
317 |
selectedProtocolIndices := ValueHolder new. |
|
318 |
selectedProtocolIndices addDependent:self |
|
319 |
]. |
|
320 |
^ selectedProtocolIndices. |
|
321 |
! |
|
322 |
||
323 |
selectedProtocols |
|
324 |
^ self selectionHolder |
|
325 |
! |
|
326 |
||
327 |
selectedProtocols:aValueHolder |
|
328 |
^ self selectionHolder:aValueHolder |
|
329 |
! |
|
330 |
||
8694 | 331 |
showPseudoProtocols |
332 |
showPseudoProtocols isNil ifTrue:[ |
|
333 |
showPseudoProtocols := true asValue. |
|
334 |
showPseudoProtocols addDependent:self |
|
335 |
]. |
|
336 |
^ showPseudoProtocols |
|
337 |
! |
|
338 |
||
339 |
showPseudoProtocols:aValueHolder |
|
340 |
showPseudoProtocols notNil ifTrue:[ |
|
341 |
showPseudoProtocols removeDependent:self |
|
342 |
]. |
|
343 |
showPseudoProtocols := aValueHolder. |
|
344 |
showPseudoProtocols notNil ifTrue:[ |
|
345 |
showPseudoProtocols addDependent:self |
|
346 |
]. |
|
347 |
! |
|
348 |
||
5591 | 349 |
variableFilter |
350 |
variableFilter isNil ifTrue:[ |
|
351 |
variableFilter := false asValue. |
|
352 |
variableFilter addDependent:self |
|
353 |
]. |
|
354 |
^ variableFilter |
|
355 |
||
356 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
357 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
358 |
! |
|
359 |
||
360 |
variableFilter:aValueHolder |
|
361 |
variableFilter notNil ifTrue:[ |
|
362 |
variableFilter removeDependent:self |
|
363 |
]. |
|
364 |
variableFilter := aValueHolder. |
|
365 |
variableFilter notNil ifTrue:[ |
|
366 |
variableFilter addDependent:self |
|
367 |
]. |
|
368 |
||
369 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
370 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
371 |
! ! |
|
372 |
||
373 |
!MethodCategoryList methodsFor:'change & update'! |
|
374 |
||
375 |
classDefinitionChanged:aClass |
|
376 |
|refetch anyChange| |
|
377 |
||
378 |
anyChange := false. |
|
379 |
refetch := [:oldClass | |
|
380 |
|nm cls newClass| |
|
381 |
||
382 |
nm := oldClass theNonMetaclass name. |
|
383 |
oldClass isMeta ifTrue:[ |
|
384 |
newClass := Smalltalk at:nm. |
|
385 |
newClass isNil ifTrue:[ |
|
386 |
Transcript showCR:'oops - browser lost class ' , nm. |
|
387 |
newClass := oldClass |
|
388 |
] ifFalse:[ |
|
389 |
newClass := newClass theMetaclass |
|
390 |
] |
|
391 |
] ifFalse:[ |
|
392 |
newClass := Smalltalk at:nm |
|
393 |
]. |
|
394 |
newClass ~~ oldClass ifTrue:[ |
|
395 |
anyChange := true. |
|
396 |
]. |
|
397 |
newClass |
|
398 |
]. |
|
399 |
||
400 |
classes := classes collect:refetch. |
|
401 |
leafClasses := leafClasses collect:refetch. |
|
402 |
anyChange ifTrue:[ |
|
403 |
self updateOutputGenerator |
|
404 |
]. |
|
405 |
! |
|
406 |
||
407 |
delayedUpdate:something with:aParameter from:changedObject |
|
408 |
|sel oldMethod newMethod mthd selectedCategories selectedProtocolsHolder oldProtocol newProtocol |
|
409 |
rawProtocolListHolder rawProtocolList oldSelectedProtocols newSelectedProtocols newIndices idx cls listView| |
|
410 |
||
411 |
selectedProtocolsHolder := self selectedProtocols. |
|
412 |
rawProtocolListHolder := self rawProtocolList. |
|
413 |
||
414 |
changedObject == Smalltalk ifTrue:[ |
|
6412 | 415 |
classes notNil ifTrue:[ |
416 |
something == #methodCategory ifTrue:[ |
|
417 |
cls := aParameter at:1. |
|
418 |
(cls notNil and:[classes includesIdentical:cls]) ifTrue:[ |
|
419 |
mthd := aParameter at:2. |
|
420 |
newProtocol := mthd category. |
|
421 |
oldProtocol := aParameter at:3. |
|
5591 | 422 |
|
6412 | 423 |
self invalidateList. |
5591 | 424 |
|
6412 | 425 |
selectedCategories := selectedProtocolsHolder value. |
426 |
selectedCategories size > 0 ifTrue:[ |
|
427 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
428 |
selectedCategories := selectedCategories collect:[:each | each string]. |
|
5591 | 429 |
|
6412 | 430 |
((selectedCategories includes:oldProtocol) |
431 |
or:[ (selectedCategories includes:newProtocol) |
|
432 |
or:[ selectedCategories includes:(self class nameListEntryForALL) ]]) |
|
433 |
ifTrue:[ |
|
434 |
self updateOutputGenerator. |
|
435 |
]. |
|
436 |
]. |
|
5591 | 437 |
|
6412 | 438 |
]. |
439 |
^ self |
|
440 |
]. |
|
5591 | 441 |
|
6412 | 442 |
something == #methodInClass ifTrue:[ |
443 |
"/ a method has been added/removed/changed |
|
444 |
cls := aParameter at:1. |
|
445 |
(classes includesIdentical:cls) ifTrue:[ |
|
446 |
sel := aParameter at:2. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
447 |
self flushMethodInfoForClassNamed:cls name selector:sel. |
6412 | 448 |
oldMethod := aParameter at:3. |
449 |
newMethod := cls compiledMethodAt:sel. |
|
450 |
oldMethod notNil ifTrue:[ |
|
451 |
variableFilter value size > 0 ifTrue:[ |
|
452 |
"/ sigh - must invalidate |
|
453 |
self invalidateList. |
|
454 |
]. |
|
455 |
^ self. |
|
456 |
]. |
|
457 |
"/ method was added - update the methodList |
|
458 |
"/ Q: is this needed (methodCategoryList should send me a new inGenerator) |
|
459 |
self invalidateList. |
|
5591 | 460 |
|
6412 | 461 |
"/ if its category is selected, updateOutputGenerator |
462 |
selectedCategories := selectedProtocolsHolder value. |
|
463 |
selectedCategories size > 0 ifTrue:[ |
|
464 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
465 |
selectedCategories := selectedCategories collect:[:each | each string]. |
|
5591 | 466 |
|
6412 | 467 |
((oldMethod notNil and:[selectedCategories includes:(oldMethod category)]) |
468 |
or:[ (newMethod notNil and:[selectedCategories includes:(newMethod category)])]) |
|
469 |
ifTrue:[ |
|
470 |
self updateOutputGenerator. |
|
471 |
]. |
|
472 |
]. |
|
473 |
]. |
|
474 |
^ self. |
|
475 |
]. |
|
5591 | 476 |
|
6412 | 477 |
something == #methodInClassRemoved ifTrue:[ |
478 |
cls := aParameter at:1. |
|
479 |
(classes includesIdentical:cls) ifTrue:[ |
|
480 |
sel := aParameter at:2. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
481 |
self flushMethodInfoForClassNamed:cls name selector:sel. |
6412 | 482 |
"/ method was removed - update the list and output generator |
483 |
self invalidateList. |
|
484 |
"/ self updateOutputGenerator. |
|
485 |
self slaveMode value == true ifFalse:[ |
|
486 |
self enqueueDelayedUpdateOutputGenerator. |
|
487 |
] |
|
488 |
]. |
|
489 |
^ self. |
|
490 |
]. |
|
5591 | 491 |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
492 |
(something == #classOrganization |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
493 |
or:[ something == #methodCategoryAdded |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
494 |
or:[ something == #methodCategoryRemoved |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
495 |
or:[ something == #methodCategoriesRemoved |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
496 |
or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[ |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
497 |
cls := (something == #classOrganization) ifTrue:aParameter ifFalse:[aParameter first]. |
6412 | 498 |
(classes includesIdentical:cls) ifTrue:[ |
499 |
self invalidateList. |
|
500 |
] ifFalse:[ |
|
501 |
(classes contains:[:aClass | aClass name = cls name]) ifTrue:[ |
|
502 |
self invalidateList. |
|
503 |
"/ self error:'obsolete class: should not happen'. |
|
504 |
] |
|
505 |
]. |
|
506 |
^ self. |
|
507 |
]. |
|
5591 | 508 |
|
6412 | 509 |
something == #projectOrganization ifTrue:[ |
510 |
aParameter notNil ifTrue:[ |
|
511 |
cls := aParameter at:1. |
|
512 |
cls notNil ifTrue:[ |
|
513 |
((classes includes:cls theMetaclass) |
|
514 |
or:[(classes includes:cls theNonMetaclass)]) ifTrue:[ |
|
515 |
self invalidateList. |
|
516 |
self slaveMode value == true ifFalse:[ |
|
517 |
self enqueueDelayedUpdateOutputGenerator. |
|
518 |
] |
|
519 |
]. |
|
520 |
]. |
|
521 |
] ifFalse:[ |
|
522 |
self invalidateList. |
|
523 |
]. |
|
524 |
^ self |
|
525 |
]. |
|
5591 | 526 |
|
6412 | 527 |
(something == #classDefinition or:[something == #classVariables]) |
528 |
ifTrue:[ |
|
529 |
self classDefinitionChanged:aParameter. |
|
530 |
^ self |
|
531 |
]. |
|
5591 | 532 |
|
6412 | 533 |
"/ everything else is ignored |
534 |
"/ self halt. |
|
535 |
]. |
|
536 |
^ self |
|
5591 | 537 |
]. |
538 |
||
539 |
changedObject == self selectedProtocolIndices ifTrue:[ |
|
6412 | 540 |
oldSelectedProtocols := selectedProtocolsHolder value ? #(). |
541 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
542 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each string]. |
|
543 |
newSelectedProtocols := self getSelectedProtocolsFromIndices. |
|
544 |
oldSelectedProtocols ~= newSelectedProtocols ifTrue:[ |
|
545 |
selectedProtocolsHolder value:newSelectedProtocols. |
|
546 |
]. |
|
547 |
newSelectedProtocols size > 1 ifTrue:[ |
|
548 |
(newSelectedProtocols includes:(self class nameListEntryForALL)) ifTrue:[ |
|
549 |
rawProtocolList := rawProtocolListHolder value. |
|
550 |
idx := rawProtocolList indexOf: (newSelectedProtocols copy remove:(self class nameListEntryForALL); yourself) first. |
|
551 |
idx ~~ 0 ifTrue:[ |
|
8742 | 552 |
(listView := self componentAt:#List) notNil ifTrue:[ |
6412 | 553 |
listView makeLineVisible:idx. |
554 |
] |
|
555 |
] |
|
556 |
] |
|
557 |
]. |
|
5591 | 558 |
|
6412 | 559 |
^ self |
5591 | 560 |
]. |
561 |
||
562 |
changedObject == selectedProtocolsHolder ifTrue:[ |
|
6412 | 563 |
rawProtocolList := rawProtocolListHolder value. |
564 |
rawProtocolList size == 0 ifTrue:[ |
|
565 |
self updateList. |
|
566 |
rawProtocolList := rawProtocolListHolder value. |
|
567 |
]. |
|
568 |
rawProtocolList notNil ifTrue:[ |
|
569 |
selectedCategories := selectedProtocolsHolder value ? #(). |
|
570 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
571 |
newIndices := selectedCategories |
|
572 |
collect:[:each | rawProtocolList findFirst:[:p | p string = each string]]. |
|
573 |
newIndices := newIndices select:[:each | each ~~ 0]. |
|
574 |
newIndices ~= self selectedProtocolIndices value ifTrue:[ |
|
575 |
self selectedProtocolIndices setValue:nil. "/ to force update |
|
576 |
self selectedProtocolIndices value:newIndices |
|
577 |
]. |
|
578 |
(lastGeneratedProtocols notNil |
|
579 |
and:[(lastGeneratedProtocols includes:self class nameListEntryForALL) |
|
580 |
and:[(selectedProtocolsHolder value ? #()) includes:self class nameListEntryForALL]]) |
|
581 |
ifTrue:[ |
|
582 |
"/ no need to update generator |
|
583 |
] ifFalse:[ |
|
584 |
self updateOutputGenerator. |
|
585 |
] |
|
586 |
]. |
|
587 |
^ self |
|
5591 | 588 |
]. |
589 |
||
590 |
(changedObject == variableFilter |
|
591 |
or:[changedObject == filterClassVars |
|
592 |
or:[changedObject == packageFilterOnInput]]) ifTrue:[ |
|
6412 | 593 |
self invalidateList. |
594 |
^ self |
|
5591 | 595 |
]. |
596 |
||
597 |
changedObject == methodVisibilityHolder ifTrue:[ |
|
6412 | 598 |
self invalidateList. |
599 |
self updateOutputGenerator. |
|
600 |
^ self |
|
5591 | 601 |
]. |
602 |
||
603 |
lastGeneratedProtocols := nil. |
|
604 |
||
605 |
changedObject == inGeneratorHolder ifTrue:[ |
|
6412 | 606 |
selectedCategories := selectedProtocolsHolder value. |
5591 | 607 |
|
6412 | 608 |
selectedCategories size > 0 ifTrue:[ |
609 |
oldSelectedProtocols := selectedCategories ? #(). |
|
610 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
611 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each string]. |
|
612 |
self updateList. |
|
613 |
rawProtocolList := rawProtocolListHolder value. |
|
614 |
newSelectedProtocols := oldSelectedProtocols select:[:each | rawProtocolList includes:each]. |
|
5591 | 615 |
"/ selectedProtocolsHolder setValue:nil. "/ to force update |
6412 | 616 |
selectedProtocolsHolder value:newSelectedProtocols. |
617 |
^ self |
|
618 |
]. |
|
5591 | 619 |
]. |
620 |
||
621 |
super delayedUpdate:something with:aParameter from:changedObject |
|
622 |
||
623 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
624 |
"Modified: / 29.2.2000 / 11:11:39 / cg" |
|
625 |
! |
|
626 |
||
627 |
getSelectedProtocolsFromIndices |
|
628 |
|l| |
|
629 |
||
630 |
l := self rawProtocolList value. |
|
631 |
^ self selectedProtocolIndices value collect:[:idx | l at:idx]. |
|
632 |
! |
|
633 |
||
634 |
selectionChanged |
|
635 |
|newSelectedCategories allEntry| |
|
636 |
||
637 |
newSelectedCategories := self selectedProtocols value. |
|
638 |
||
639 |
"/ the outputGenerator is only to be updated, if the output would really |
|
640 |
"/ change ... |
|
641 |
allEntry := self class nameListEntryForALL. |
|
642 |
||
643 |
(lastSelectedProtocols notNil |
|
644 |
and:[newSelectedCategories notNil |
|
645 |
and:[(lastSelectedProtocols includes:(allEntry)) |
|
646 |
and:[newSelectedCategories includes:(allEntry)]]]) ifTrue:[ |
|
647 |
"/ no change ... |
|
648 |
^ self |
|
649 |
]. |
|
650 |
||
651 |
super selectionChanged. |
|
652 |
||
653 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
654 |
"Modified: / 24.2.2000 / 14:12:12 / cg" |
|
655 |
! |
|
656 |
||
657 |
selectionChangedByClick |
|
658 |
"we are not interested in that - get another notification |
|
659 |
via the changed valueHolder" |
|
660 |
||
661 |
lastSelectedProtocols := self getSelectedProtocolsFromIndices |
|
662 |
! |
|
663 |
||
664 |
update:something with:aParameter from:changedObject |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
665 |
|cls sel oldMethod newMethod| |
5591 | 666 |
|
667 |
"/ some can be ignored immediately |
|
668 |
changedObject == Smalltalk ifTrue:[ |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
669 |
something isNil ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
670 |
"/ self halt "/ huh - Smalltalk changed - so what ? |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
671 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
672 |
]. |
6880 | 673 |
|
674 |
something == #currentChangeSet ifTrue:[ |
|
675 |
self invalidateList. |
|
676 |
^ self. |
|
677 |
]. |
|
678 |
||
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
679 |
something == #methodInClass ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
680 |
"/ a method has been added/removed/changed |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
681 |
cls := aParameter at:1. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
682 |
(classes notNil and:[classes includesIdentical:cls]) ifFalse:[^ self]. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
683 |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
684 |
sel := aParameter at:2. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
685 |
self flushMethodInfoForClassNamed:cls name selector:sel. |
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
686 |
oldMethod := aParameter at:3. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
687 |
newMethod := cls compiledMethodAt:sel. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
688 |
oldMethod notNil ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
689 |
variableFilter value size > 0 ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
690 |
"/ sigh - must invalidate |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
691 |
self invalidateList. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
692 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
693 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
694 |
oldMethod category ~= newMethod category ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
695 |
self invalidateList. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
696 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
697 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
698 |
"/ mhmh - its now changed (so coloring will change). |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
699 |
self invalidateList. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
700 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
701 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
702 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
703 |
|
5591 | 704 |
"/ something == #classDefinition ifTrue:[ |
705 |
"/ ^ self. |
|
706 |
"/ ]. |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
707 |
something == #newClass ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
708 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
709 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
710 |
something == #classRemove ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
711 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
712 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
713 |
something == #classRename ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
714 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
715 |
]. |
5591 | 716 |
"/ something == #classVariables ifTrue:[ |
717 |
"/ ^ self. |
|
718 |
"/ ]. |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
719 |
something == #classComment ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
720 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
721 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
722 |
something == #organization ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
723 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
724 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
725 |
something == #methodTrap ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
726 |
^ self |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
727 |
]. |
5591 | 728 |
]. |
729 |
||
730 |
super update:something with:aParameter from:changedObject. |
|
6880 | 731 |
|
732 |
"Modified: / 10-08-2006 / 17:23:48 / cg" |
|
5591 | 733 |
! ! |
734 |
||
735 |
!MethodCategoryList methodsFor:'drag & drop'! |
|
736 |
||
6469 | 737 |
canDropContext:aDropContext |
5591 | 738 |
|cat methods| |
739 |
||
740 |
methods := aDropContext dropObjects collect:[:obj | obj theObject]. |
|
7123 | 741 |
(methods conform:[:aMethod | aMethod isMethod]) ifFalse:[^ false]. |
5591 | 742 |
|
743 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
6492 | 744 |
cat isNil ifTrue:[^ false]. |
5591 | 745 |
|
746 |
(methods contains:[:aMethod | aMethod category ~= cat]) ifFalse:[^ false]. |
|
6492 | 747 |
^ true |
7123 | 748 |
|
749 |
"Modified: / 13-09-2006 / 11:44:02 / cg" |
|
5591 | 750 |
! |
751 |
||
752 |
categoryAtTargetPointOf:aDropContext |
|
753 |
|p methodListView lineNr cat| |
|
754 |
||
755 |
p := aDropContext targetPoint. |
|
756 |
||
757 |
methodListView := aDropContext targetWidget. |
|
758 |
||
759 |
lineNr := methodListView lineAtY:p y. |
|
760 |
lineNr isNil ifTrue:[^ nil]. |
|
761 |
||
762 |
cat := rawProtocolList at:lineNr. |
|
763 |
cat := cat string. |
|
764 |
cat = self class nameListEntryForALL ifTrue:[^ nil]. |
|
765 |
||
766 |
^ cat |
|
767 |
! |
|
768 |
||
6469 | 769 |
doDropContext:aDropContext |
5591 | 770 |
|cat methods| |
771 |
||
772 |
methods := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
|
7123 | 773 |
(methods conform:[:something | something isMethod]) ifFalse:[^ self]. |
5591 | 774 |
|
775 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
776 |
cat notNil ifTrue:[ |
|
6469 | 777 |
self masterApplication moveMethods:methods toProtocol:cat. |
5591 | 778 |
]. |
7123 | 779 |
|
780 |
"Modified: / 13-09-2006 / 11:43:23 / cg" |
|
5591 | 781 |
! ! |
782 |
||
783 |
!MethodCategoryList methodsFor:'generators'! |
|
784 |
||
785 |
makeGenerator |
|
786 |
"return a generator which enumerates the methods from the selected protocol; |
|
787 |
that generator generates 4-element elements (includes the class and protocol), |
|
788 |
in order to make the consumers only depend on one input |
|
789 |
(i.e. to pass multiple-class and multiple-protocol info |
|
790 |
without a need for another classHolder/protocolHolder in the methodList)." |
|
791 |
||
8694 | 792 |
^ Iterator |
793 |
on:[:whatToDo | |
|
794 |
|protocols |
|
8733 | 795 |
allProtocols superSendProtocols uncommentedProtocols obsoleteProtocols documentationProtocols |
8694 | 796 |
noCat static notStatic classSelectorPairsAlreadyDone |
797 |
packages remainingClasses remainingCategories classesAlreadyDone noPackage| |
|
5591 | 798 |
|
8694 | 799 |
noPackage := Project noProjectID. |
800 |
noCat := (self class nameListEntryForNILCategory). |
|
801 |
static := (self class nameListEntryForStatic). |
|
802 |
notStatic := (self class nameListEntryForNonStatic). |
|
5591 | 803 |
|
8694 | 804 |
protocols := self selectedProtocols value ? #(). |
805 |
protocols := protocols collect:[:each | (each ifNil:[noCat]) string]. |
|
806 |
lastGeneratedProtocols := protocols. |
|
807 |
protocols := protocols asSet. |
|
808 |
||
809 |
(leafClasses size > 0 and:[protocols size > 0]) ifTrue:[ |
|
810 |
allProtocols := protocols includes:(self class nameListEntryForALL). |
|
811 |
superSendProtocols := protocols includes:(self class nameListEntryForSuperSend). |
|
812 |
uncommentedProtocols := protocols includes:(self class nameListEntryForUncommented). |
|
8718 | 813 |
obsoleteProtocols := protocols includes:(self class nameListEntryForObsolete). |
8733 | 814 |
documentationProtocols := protocols includes:(self class nameListEntryForDocumentation). |
5591 | 815 |
|
8694 | 816 |
"/ packages := packageFilter value value. |
817 |
"/ (packages notNil and:[packages includes:(self class nameListEntryForALL)]) ifTrue:[ |
|
818 |
"/ packages := nil. |
|
819 |
"/ ]. |
|
5591 | 820 |
|
8694 | 821 |
remainingClasses := leafClasses copy asIdentitySet. |
822 |
remainingCategories := protocols copy asSet. |
|
5591 | 823 |
|
8694 | 824 |
classesAlreadyDone := IdentitySet new. |
825 |
classSelectorPairsAlreadyDone := Set new. |
|
5591 | 826 |
|
8694 | 827 |
leafClasses do:[:aLeafClass | |
828 |
(self classesToProcessForClasses:(Array with:aLeafClass)) do:[:aClass | |
|
829 |
|supportsMethodCategories isJavaClass anyInThisClass| |
|
5591 | 830 |
|
8694 | 831 |
(classesAlreadyDone includes:aClass) ifFalse:[ |
832 |
classesAlreadyDone add:aClass. |
|
5591 | 833 |
|
8694 | 834 |
supportsMethodCategories := aClass supportsMethodCategories. |
835 |
isJavaClass := aClass isJavaClass. |
|
836 |
anyInThisClass := false. |
|
5591 | 837 |
|
8694 | 838 |
aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
839 |
|cat mPkg includeIt info| |
5591 | 840 |
|
8694 | 841 |
supportsMethodCategories ifTrue:[ |
842 |
cat := mthd category. |
|
843 |
] ifFalse:[ |
|
844 |
isJavaClass ifTrue:[ |
|
845 |
cat := mthd isStatic ifTrue:[static] ifFalse:[notStatic] |
|
846 |
] ifFalse:[ |
|
847 |
cat := noCat. |
|
848 |
] |
|
849 |
]. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
850 |
mPkg := mthd package. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
851 |
(packages isNil or:[mPkg = noPackage or:[packages includes:mPkg]]) |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
852 |
ifTrue:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
853 |
"/ used to be a more readable or, but to reuse info, I've splitted it. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
854 |
"/ because we should use the parser only once, we reuse the same methodInfo. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
855 |
"/ otherwise, the list update becomes too slow for long classes (NewSystemBrowser) |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
856 |
includeIt := allProtocols. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
857 |
includeIt ifFalse:[ includeIt := protocols includes:cat ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
858 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
859 |
superSendProtocols ifTrue:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
860 |
info isNil ifTrue:[ info := self methodInfoFor:mthd ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
861 |
includeIt := info sendsSuper ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
862 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
863 |
uncommentedProtocols ifTrue:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
864 |
info isNil ifTrue:[ info := self methodInfoFor:mthd ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
865 |
includeIt := info isUncommented ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
866 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
867 |
obsoleteProtocols ifTrue:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
868 |
info isNil ifTrue:[ info := self methodInfoFor:mthd ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
869 |
includeIt := info isObsolete ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
870 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
871 |
documentationProtocols ifTrue:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
872 |
info isNil ifTrue:[ info := self methodInfoFor:mthd ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
873 |
includeIt := info isDocumentationMethod ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
874 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
875 |
includeIt ifTrue:[ |
8694 | 876 |
(methodVisibilityHolder value == #class) ifTrue:[ |
877 |
whatToDo value:aClass value:cat value:sel value:mthd. |
|
878 |
] ifFalse:[ |
|
879 |
(classSelectorPairsAlreadyDone includes:(aLeafClass->sel)) ifFalse:[ |
|
880 |
classSelectorPairsAlreadyDone add:(aLeafClass->sel). |
|
881 |
whatToDo value:aClass value:cat value:sel value:mthd. |
|
882 |
]. |
|
883 |
]. |
|
884 |
anyInThisClass := true. |
|
885 |
remainingCategories remove:cat ifAbsent:nil. |
|
886 |
] |
|
887 |
] |
|
7296
dfea12500274
do not suppress loose methods
Claus Gittinger <cg@exept.de>
parents:
7123
diff
changeset
|
888 |
]. |
8694 | 889 |
anyInThisClass ifTrue:[ remainingClasses remove:aClass ifAbsent:nil. ]. |
890 |
]. |
|
891 |
]. |
|
892 |
]. |
|
893 |
remainingClasses do:[:aClass | |
|
894 |
whatToDo value:aClass value:nil value:nil value:nil. |
|
895 |
]. |
|
896 |
remainingCategories do:[:cat | |
|
897 |
whatToDo value:nil value:cat value:nil value:nil. |
|
898 |
] |
|
899 |
] |
|
900 |
] |
|
5591 | 901 |
|
7296
dfea12500274
do not suppress loose methods
Claus Gittinger <cg@exept.de>
parents:
7123
diff
changeset
|
902 |
"Created: / 05-02-2000 / 13:42:10 / cg" |
7398
8a3a5fac2001
also show methods for other packages in the generated list
Claus Gittinger <cg@exept.de>
parents:
7296
diff
changeset
|
903 |
"Modified: / 13-10-2006 / 01:16:17 / cg" |
5591 | 904 |
! ! |
905 |
||
906 |
!MethodCategoryList methodsFor:'private'! |
|
907 |
||
908 |
class:cls protocol:cat includesMethodsInAnyPackage:packageFilter |
|
909 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
|
910 |
mthd category == cat ifTrue:[ |
|
911 |
(packageFilter includes:mthd package) ifTrue:[ |
|
912 |
^ true |
|
913 |
] |
|
914 |
] |
|
915 |
]. |
|
916 |
^ false |
|
917 |
! |
|
918 |
||
919 |
class:cls protocol:cat includesModsOfClassVariable:variablesToHighLight |
|
920 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#modifiedClassVars |
|
921 |
! |
|
922 |
||
923 |
class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighLight |
|
924 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#modifiedInstVars |
|
925 |
! |
|
926 |
||
927 |
class:cls protocol:cat includesRefsToClassVariable:variablesToHighLight |
|
928 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#usedClassVars |
|
929 |
! |
|
930 |
||
931 |
class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighLight |
|
932 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#usedInstVars |
|
933 |
! |
|
934 |
||
935 |
class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:querySelector |
|
936 |
|anyVarNameAccessable| |
|
937 |
||
938 |
anyVarNameAccessable := cls allInstVarNames includesAny:variablesToHighLight. |
|
939 |
anyVarNameAccessable ifFalse:[ |
|
940 |
anyVarNameAccessable := cls theNonMetaclass allClassVarNames includesAny:variablesToHighLight. |
|
941 |
]. |
|
942 |
anyVarNameAccessable ifFalse:[ |
|
943 |
"/ no need to parse |
|
944 |
^ false |
|
945 |
]. |
|
946 |
||
947 |
cls selectorsAndMethodsDo:[:sel :mthd | |
|
948 |
|src parser usedVars| |
|
949 |
||
950 |
mthd category = cat ifTrue:[ |
|
951 |
src := mthd source. |
|
952 |
src notNil ifTrue:[ |
|
953 |
" |
|
954 |
before doing a slow parse, quickly scan the |
|
955 |
methods source for the variables name ... |
|
956 |
" |
|
957 |
(variablesToHighLight contains:[:varName | (src findString:varName) ~~ 0]) ifTrue:[ |
|
958 |
parser := Parser |
|
959 |
parseMethod:src |
|
960 |
in:cls |
|
961 |
ignoreErrors:true |
|
962 |
ignoreWarnings:true. |
|
963 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
964 |
usedVars := parser perform:querySelector. |
|
965 |
(usedVars includesAny:variablesToHighLight) |
|
966 |
ifTrue:[ |
|
967 |
^ true |
|
968 |
] |
|
969 |
] |
|
970 |
] |
|
971 |
] ifFalse:[ |
|
972 |
Transcript showCR:'Oops - cannot access methods source'. |
|
973 |
] |
|
974 |
] |
|
975 |
]. |
|
976 |
^ false |
|
977 |
! |
|
978 |
||
979 |
classesToProcessForClasses:classes |
|
980 |
^ self classesToProcessForClasses:classes withVisibility:methodVisibilityHolder value. |
|
981 |
! |
|
982 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
983 |
flushMethodInfoForClassNamed:className selector:selector |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
984 |
MethodInfoCacheAccessLock critical:[ |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
985 |
MethodInfoCache |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
986 |
removeKey:(className,'>>',selector) |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
987 |
ifAbsent:[] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
988 |
] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
989 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
990 |
|
5591 | 991 |
listOfMethodCategories |
992 |
|categoryList plainCategories classesProcessed leafClassesProcessed |
|
993 |
generator nm variablesToHighlight classVarsToHighLight |
|
994 |
itemsWithVarRefs itemsWithVarMods itemsWithExtensions itemsWithSuppressedExtensions |
|
7501 | 995 |
itemsInChangeSet itemsInRemoteChangeSet |
8723 | 996 |
packageFilterOnInput packageFilter nameListEntryForALL changeSet |
997 |
emphasizedPlus emphasisForRef emphasisForMod |
|
8733 | 998 |
numObsolete numSuper numUncommented numDocumentation| |
5591 | 999 |
|
1000 |
generator := inGeneratorHolder value. |
|
1001 |
generator isNil ifTrue:[ ^ #() ]. |
|
1002 |
||
1003 |
nameListEntryForALL := self class nameListEntryForALL. |
|
1004 |
||
1005 |
packageFilterOnInput := self packageFilterOnInput value. |
|
1006 |
(packageFilterOnInput notNil and:[packageFilterOnInput includes:nameListEntryForALL]) ifTrue:[ |
|
5814 | 1007 |
packageFilterOnInput := nil |
5591 | 1008 |
]. |
1009 |
packageFilter := self packageFilter value. |
|
1010 |
(packageFilter notNil and:[packageFilter includes:nameListEntryForALL]) ifTrue:[ |
|
5814 | 1011 |
packageFilter := nil |
5591 | 1012 |
]. |
1013 |
||
1014 |
categoryList := Set new. |
|
1015 |
itemsWithVarRefs := Set new. |
|
1016 |
itemsWithVarMods := Set new. |
|
1017 |
itemsWithExtensions := Set new. |
|
1018 |
itemsWithSuppressedExtensions := Set new. |
|
1019 |
itemsInChangeSet := Set new. |
|
7501 | 1020 |
itemsInRemoteChangeSet := Set new. |
5591 | 1021 |
plainCategories := Set new. |
1022 |
classesProcessed := IdentitySet new. |
|
1023 |
leafClassesProcessed := IdentitySet new. |
|
1024 |
variablesToHighlight := variableFilter value. |
|
1025 |
classVarsToHighLight := filterClassVars value. |
|
8733 | 1026 |
numObsolete := numSuper := numUncommented := numDocumentation := 0. |
5591 | 1027 |
|
1028 |
generator do:[:clsIn :catIn | |
|
5814 | 1029 |
|emptyProtocols clsName doHighLight doHighLightRed suppress| |
5591 | 1030 |
|
5814 | 1031 |
leafClassesProcessed add:clsIn. |
1032 |
(self classesToProcessForClasses:(Array with:clsIn)) do:[:cls | |
|
1033 |
|cats| |
|
5591 | 1034 |
|
5814 | 1035 |
classesProcessed add:cls. |
5591 | 1036 |
|
5814 | 1037 |
cls ~~ clsIn ifTrue:[ |
1038 |
cats := cls categories |
|
1039 |
] ifFalse:[ |
|
1040 |
cats := Array with:catIn. |
|
1041 |
]. |
|
1042 |
cats do:[:cat | |
|
1043 |
cat notNil ifTrue:[ |
|
1044 |
suppress := packageFilterOnInput notNil |
|
1045 |
and:[ (self class:cls protocol:cat includesMethodsInAnyPackage:packageFilterOnInput) not ]. |
|
5591 | 1046 |
|
5814 | 1047 |
suppress ifFalse:[ |
8723 | 1048 |
variablesToHighlight notEmptyOrNil ifTrue:[ |
5814 | 1049 |
(itemsWithVarRefs includes:cat) ifFalse:[ |
1050 |
classVarsToHighLight ifTrue:[ |
|
1051 |
doHighLight := self class:cls protocol:cat includesRefsToClassVariable:variablesToHighlight. |
|
1052 |
doHighLight ifTrue:[ |
|
1053 |
doHighLightRed := self class:cls protocol:cat includesModsOfClassVariable:variablesToHighlight. |
|
1054 |
]. |
|
1055 |
] ifFalse:[ |
|
1056 |
doHighLight := self class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighlight. |
|
1057 |
doHighLight ifTrue:[ |
|
1058 |
doHighLightRed := self class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighlight. |
|
1059 |
]. |
|
1060 |
]. |
|
1061 |
doHighLight ifTrue:[ |
|
1062 |
itemsWithVarRefs add:cat. |
|
1063 |
doHighLightRed ifTrue:[ |
|
1064 |
itemsWithVarMods add:cat. |
|
1065 |
]. |
|
1066 |
] |
|
1067 |
] |
|
8733 | 1068 |
]. |
8742 | 1069 |
self showPseudoProtocols value ifTrue:[ |
1070 |
cls selectorsAndMethodsDo:[:sel :mthd | |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1071 |
|info| |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1072 |
|
8742 | 1073 |
mthd category = cat ifTrue:[ |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1074 |
info := self methodInfoFor:mthd. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1075 |
info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1076 |
info sendsSuper ifTrue:[ numSuper := numSuper + 1 ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1077 |
info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1078 |
info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ]. |
8742 | 1079 |
] |
1080 |
]. |
|
8723 | 1081 |
]. |
1082 |
||
5814 | 1083 |
categoryList add:cat. |
5591 | 1084 |
|
5814 | 1085 |
AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
1086 |
clsName := cls name. |
|
1087 |
emptyProtocols := AdditionalEmptyCategoriesPerClassName at:clsName ifAbsent:nil. |
|
1088 |
emptyProtocols size > 0 ifTrue:[ |
|
1089 |
emptyProtocols remove:cat ifAbsent:nil. |
|
1090 |
]. |
|
1091 |
emptyProtocols size == 0 ifTrue:[ |
|
1092 |
AdditionalEmptyCategoriesPerClassName removeKey:clsName ifAbsent:nil |
|
1093 |
]. |
|
1094 |
]. |
|
1095 |
] |
|
1096 |
] |
|
1097 |
] |
|
1098 |
] |
|
1099 |
]. |
|
1100 |
||
1101 |
changeSet := ChangeSet current. |
|
5591 | 1102 |
|
1103 |
classesProcessed do:[:eachClass | |
|
5814 | 1104 |
|classPackage| |
5591 | 1105 |
|
5814 | 1106 |
classPackage := eachClass package. |
6706 | 1107 |
eachClass methodDictionary keysAndValuesDo:[:mSelector :mthd | |
5814 | 1108 |
|mPackage mCategory| |
5591 | 1109 |
|
5814 | 1110 |
mPackage := mthd package. |
1111 |
mCategory := mthd category. |
|
5591 | 1112 |
|
5814 | 1113 |
#fixme. |
1114 |
mPackage = classPackage ifTrue:[ |
|
1115 |
mPackage ~~ classPackage ifTrue:[ |
|
1116 |
mthd setPackage:(mPackage := mPackage string asSymbol). |
|
1117 |
] |
|
1118 |
]. |
|
1119 |
mPackage ~~ classPackage ifTrue:[ |
|
6877 | 1120 |
mPackage ~= Project noProjectID ifTrue:[ |
1121 |
itemsWithExtensions add:mCategory. |
|
5591 | 1122 |
|
6877 | 1123 |
(packageFilter notNil |
1124 |
and:[ (packageFilter includes:mPackage) not]) |
|
1125 |
ifTrue:[ |
|
1126 |
itemsWithSuppressedExtensions add:mCategory. |
|
1127 |
]. |
|
5814 | 1128 |
]. |
1129 |
]. |
|
6706 | 1130 |
(changeSet includesChangeForClass:eachClass selector:mSelector) ifTrue:[ |
1131 |
itemsInChangeSet add:mCategory. |
|
7501 | 1132 |
]. |
1133 |
(SmallTeam notNil and:[ SmallTeam includesChangeForClass:eachClass selector:mSelector] ) ifTrue:[ |
|
1134 |
itemsInRemoteChangeSet add:mCategory. |
|
1135 |
]. |
|
5814 | 1136 |
] |
5591 | 1137 |
]. |
1138 |
||
1139 |
categoryList := categoryList asOrderedCollection. |
|
1140 |
self rawProtocolList removeAll. |
|
1141 |
rawProtocolList addAll:categoryList. |
|
1142 |
||
6698 | 1143 |
emphasizedPlus := (self colorizeForDifferentPackage:' [ + ]'). |
1144 |
emphasisForRef := UserPreferences current emphasisForReadVariable. |
|
1145 |
emphasisForMod := UserPreferences current emphasisForWrittenVariable. |
|
1146 |
||
6704 | 1147 |
(itemsInChangeSet notEmpty |
7501 | 1148 |
or:[itemsInRemoteChangeSet notEmpty |
6704 | 1149 |
or:[itemsWithExtensions notEmpty |
7501 | 1150 |
or:[itemsWithVarRefs notEmpty]] ]) ifTrue:[ |
6698 | 1151 |
rawProtocolList keysAndValuesDo:[:idx :cat | |
7501 | 1152 |
|item inChangeSet inRemoteChangeSet hasExtensions hasVarRef hasVarMod| |
5591 | 1153 |
|
6698 | 1154 |
item := cat. |
7501 | 1155 |
|
6701 | 1156 |
inChangeSet := itemsInChangeSet includes:cat. |
1157 |
inChangeSet ifTrue:[ |
|
1158 |
item := self colorizeForChangedCode:cat. |
|
1159 |
]. |
|
1160 |
||
7501 | 1161 |
inRemoteChangeSet := itemsInRemoteChangeSet includes:cat. |
1162 |
inRemoteChangeSet ifTrue:[ |
|
1163 |
item := (self colorizeForChangedCodeInSmallTeam:'!! '),item. |
|
1164 |
]. |
|
1165 |
||
6698 | 1166 |
hasVarRef := itemsWithVarRefs includes:cat. |
1167 |
hasVarRef ifTrue:[ |
|
1168 |
hasVarMod := itemsWithVarMods includes:cat. |
|
6701 | 1169 |
item := item asText |
1170 |
emphasisAllAdd:(hasVarMod ifTrue:emphasisForMod ifFalse:emphasisForRef). |
|
1171 |
]. |
|
5591 | 1172 |
|
6701 | 1173 |
hasExtensions := itemsWithExtensions includes:cat. |
1174 |
hasExtensions ifTrue:[ |
|
1175 |
item := item , emphasizedPlus. |
|
6698 | 1176 |
]. |
6877 | 1177 |
inChangeSet ifTrue:[ |
7056 | 1178 |
item := item , self class markForBeingInChangeList. |
6877 | 1179 |
]. |
6698 | 1180 |
categoryList at:idx put:item. |
1181 |
] |
|
5591 | 1182 |
]. |
1183 |
||
1184 |
classesProcessed size > 0 ifTrue:[ |
|
5814 | 1185 |
"/ those are simulated - in ST/X, empty categories do not |
1186 |
"/ really exist; however, during browsing, it makes sense. |
|
1187 |
AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
|
1188 |
AdditionalEmptyCategoriesPerClassName keysAndValuesDo:[:clsName :protocols | |
|
1189 |
(classesProcessed contains:[:cls | cls name = clsName]) ifTrue:[ |
|
1190 |
categoryList addAll:protocols. |
|
1191 |
rawProtocolList addAll:protocols. |
|
1192 |
] |
|
1193 |
] |
|
1194 |
]. |
|
5591 | 1195 |
]. |
1196 |
||
1197 |
self makeIndependent. |
|
1198 |
classes := classesProcessed. |
|
1199 |
leafClasses := leafClassesProcessed. |
|
1200 |
self makeDependent. |
|
1201 |
||
1202 |
rawProtocolList sortWith:categoryList. |
|
1203 |
categoryList size == 1 ifTrue:[ |
|
5814 | 1204 |
nm := categoryList first string. |
1205 |
classes size == 1 ifTrue:[ |
|
1206 |
nm := classes first name , '-' , nm |
|
1207 |
]. |
|
1208 |
self protocolLabelHolder value:nm |
|
5591 | 1209 |
]. |
1210 |
categoryList notEmpty ifTrue:[ |
|
5814 | 1211 |
noAllItem value ~~ true ifTrue:[ |
8694 | 1212 |
categoryList addFirst:(nameListEntryForALL asText allItalic). |
5814 | 1213 |
rawProtocolList addFirst:nameListEntryForALL. |
8694 | 1214 |
]. |
1215 |
self showPseudoProtocols value ifTrue:[ |
|
8723 | 1216 |
numSuper > 0 ifTrue:[ |
1217 |
categoryList add:((self class nameListEntryForSuperSend bindWith:numSuper) asText allItalic). |
|
1218 |
rawProtocolList add:self class nameListEntryForSuperSend. |
|
1219 |
]. |
|
8733 | 1220 |
numDocumentation > 0 ifTrue:[ |
1221 |
categoryList add:((self class nameListEntryForDocumentation bindWith:numDocumentation) asText allItalic). |
|
1222 |
rawProtocolList add:self class nameListEntryForDocumentation. |
|
1223 |
]. |
|
8723 | 1224 |
numUncommented > 0 ifTrue:[ |
1225 |
categoryList add:((self class nameListEntryForUncommented bindWith:numUncommented) asText allItalic). |
|
1226 |
rawProtocolList add:self class nameListEntryForUncommented. |
|
1227 |
]. |
|
1228 |
numObsolete > 0 ifTrue:[ |
|
1229 |
categoryList add:((self class nameListEntryForObsolete bindWith:numObsolete) asText allItalic). |
|
1230 |
rawProtocolList add:self class nameListEntryForObsolete. |
|
8733 | 1231 |
]. |
8694 | 1232 |
]. |
5591 | 1233 |
]. |
1234 |
^ categoryList |
|
1235 |
||
6877 | 1236 |
"Created: / 05-02-2000 / 13:42:11 / cg" |
7501 | 1237 |
"Modified: / 10-11-2006 / 17:35:53 / cg" |
5591 | 1238 |
! |
1239 |
||
1240 |
makeDependent |
|
7501 | 1241 |
Smalltalk addDependent:self. |
1242 |
"/ ChangeSet addDependent:self. |
|
1243 |
||
1244 |
"Modified: / 10-11-2006 / 17:57:13 / cg" |
|
5591 | 1245 |
! |
1246 |
||
1247 |
makeIndependent |
|
1248 |
Smalltalk removeDependent:self. |
|
8219 | 1249 |
"/ ChangeSet removeDependent:self. |
5591 | 1250 |
! |
1251 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1252 |
methodInfoFor:aMethod |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1253 |
|info| |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1254 |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1255 |
MethodInfoCacheAccessLock critical:[ |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1256 |
info := MethodInfoCache |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1257 |
at:(aMethod mclass name,'>>',aMethod selector) |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1258 |
ifAbsentPut:[ |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1259 |
|info| |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1260 |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1261 |
true "aMethod mclass language isSmalltalk" ifTrue:[ |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1262 |
info := CachedMethodInfo new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1263 |
info isObsolete:(aMethod isObsolete). |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1264 |
info sendsSuper:(aMethod superMessages notEmptyOrNil). |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1265 |
info isUncommented:(aMethod comment isEmptyOrNil and:[aMethod isVersionMethod not]). |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1266 |
info isDocumentationMethod:( aMethod isDocumentationMethod). |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1267 |
]. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1268 |
info |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1269 |
] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1270 |
]. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1271 |
^ info |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1272 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1273 |
|
5591 | 1274 |
release |
1275 |
super release. |
|
1276 |
||
1277 |
filterClassVars removeDependent:self. |
|
1278 |
methodVisibilityHolder removeDependent:self. |
|
1279 |
noAllItem removeDependent:self. |
|
1280 |
packageFilterOnInput removeDependent:self. |
|
1281 |
selectedProtocolIndices removeDependent:self. |
|
1282 |
variableFilter removeDependent:self. |
|
1283 |
! |
|
1284 |
||
1285 |
updateList |
|
1286 |
|prevClasses prevSelection newSelection newList oldList sameContents selectedProtocolsHolder rawList| |
|
1287 |
||
1288 |
selectedProtocolsHolder := self selectedProtocols. |
|
1289 |
||
1290 |
prevClasses := classes ifNil:[ #() ] ifNotNil:[ classes copy ]. |
|
1291 |
oldList := self protocolList value copy. |
|
1292 |
newList := self listOfMethodCategories. |
|
1293 |
||
1294 |
"/ oldListSize := self browserNameList size. |
|
1295 |
"/ newListSize := newList size. |
|
1296 |
self selectedProtocolIndices removeDependent:self. |
|
1297 |
sameContents := self updateListFor:newList. |
|
1298 |
self selectedProtocolIndices addDependent:self. |
|
1299 |
sameContents ifFalse:[ |
|
1300 |
prevSelection := lastSelectedProtocols ? (selectedProtocolsHolder value) ? #(). |
|
1301 |
"/ prevSelection := selectedProtocolsHolder value ? lastSelectedProtocols ? #(). |
|
1302 |
||
1303 |
rawList := self rawProtocolList value. |
|
1304 |
newSelection := prevSelection select:[:item | rawList includes:item string]. |
|
1305 |
||
1306 |
newSelection size > 0 ifTrue:[ |
|
1307 |
"/ force change (for dependents) |
|
1308 |
"/ selectedProtocolsHolder value:nil. |
|
1309 |
"/ selectedProtocolsHolder value:newSelection. |
|
1310 |
selectedProtocolsHolder setValue:newSelection. |
|
1311 |
selectedProtocolsHolder changed:#value. |
|
1312 |
] ifFalse:[ |
|
1313 |
prevSelection := selectedProtocolsHolder value. |
|
1314 |
selectedProtocolsHolder value:nil. |
|
1315 |
]. |
|
1316 |
(prevSelection size > 0 or:[newSelection size > 0]) ifTrue:[ |
|
1317 |
self enqueueDelayedUpdateOutputGenerator. |
|
1318 |
"/ self updateOutputGenerator. |
|
1319 |
]. |
|
1320 |
||
1321 |
"/ prevSelection notNil ifTrue:[ |
|
1322 |
"/ lastSelectedProtocols := prevSelection. |
|
1323 |
"/ ]. |
|
1324 |
] ifTrue:[ |
|
1325 |
"/ same list - but classes might have changed |
|
1326 |
"/ that is the case, if the class selection has been changed, |
|
1327 |
"/ to another class which has the same categories. |
|
1328 |
(prevClasses size ~= classes size |
|
1329 |
or:[prevClasses asOrderedCollection ~= (classes ? #()) asOrderedCollection ]) ifTrue:[ |
|
1330 |
(newList size > 0 or:[oldList size > 0]) ifTrue:[ |
|
1331 |
self updateOutputGenerator |
|
1332 |
] |
|
1333 |
] ifFalse:[ |
|
1334 |
"/ self protocolList value:newList. |
|
1335 |
] |
|
1336 |
]. |
|
1337 |
listValid := true. |
|
1338 |
||
1339 |
"Created: / 5.2.2000 / 13:42:11 / cg" |
|
1340 |
"Modified: / 29.2.2000 / 11:08:55 / cg" |
|
1341 |
! ! |
|
1342 |
||
1343 |
!MethodCategoryList methodsFor:'special'! |
|
1344 |
||
1345 |
addAdditionalProtocol:aProtocol forClass:aClass |
|
1346 |
|categories| |
|
1347 |
||
1348 |
"/ those are simulated - in ST/X, empty categories do not |
|
1349 |
"/ really exist; however, during browsing, it makes sense. |
|
1350 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1351 |
AdditionalEmptyCategoriesPerClassName := Dictionary new. |
5591 | 1352 |
]. |
1353 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1354 |
categories isNil ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1355 |
categories := Set new. |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1356 |
AdditionalEmptyCategoriesPerClassName at:aClass name put:categories. |
5591 | 1357 |
]. |
1358 |
categories add:aProtocol. |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1359 |
aClass changed:#organization. "/ not really ... to force update |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1360 |
Smalltalk changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol). "/ not really ... to force update |
5591 | 1361 |
! |
1362 |
||
1363 |
additionalProtocolForClass:aClass |
|
1364 |
"/ those are simulated - in ST/X, empty categories do not |
|
1365 |
"/ really exist; however, during browsing, it makes sense. |
|
1366 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ ^ #() ]. |
|
1367 |
^ AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:[ #() ]. |
|
1368 |
! |
|
1369 |
||
1370 |
clearLastSelectedProtocol |
|
1371 |
lastSelectedProtocols := nil |
|
1372 |
! |
|
1373 |
||
6342
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1374 |
lastSelectedProtocols |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1375 |
^ lastSelectedProtocols |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1376 |
! |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1377 |
|
5591 | 1378 |
removeAdditionalProtocol:aListOfProtocols forClass:aClass |
1379 |
|categories| |
|
1380 |
||
1381 |
"/ those are simulated - in ST/X, empty categories do not |
|
1382 |
"/ really exist; however, during browsing, it makes sense. |
|
1383 |
||
1384 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
|
1385 |
||
1386 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1387 |
categories isNil ifTrue:[^ self]. |
|
1388 |
categories removeAllFoundIn:aListOfProtocols. |
|
1389 |
categories isEmpty ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1390 |
AdditionalEmptyCategoriesPerClassName removeKey:aClass name. |
5591 | 1391 |
]. |
1392 |
||
1393 |
aClass changed:#organization. "/ not really ... to force update |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1394 |
Smalltalk changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols). "/ not really ... to force update |
5591 | 1395 |
! |
1396 |
||
1397 |
removeAllAdditionalProtocol |
|
1398 |
"/ those are simulated - in ST/X, empty categories do not |
|
1399 |
"/ really exist; however, during browsing, it makes sense. |
|
1400 |
AdditionalEmptyCategoriesPerClassName := nil |
|
1401 |
||
1402 |
||
1403 |
! |
|
1404 |
||
1405 |
removeAllAdditionalProtocolForClass:aClass |
|
1406 |
"/ those are simulated - in ST/X, empty categories do not |
|
1407 |
"/ really exist; however, during browsing, it makes sense. |
|
1408 |
AdditionalEmptyCategoriesPerClassName notNil ifTrue:[ |
|
1409 |
AdditionalEmptyCategoriesPerClassName removeKey:aClass name ifAbsent:nil |
|
1410 |
]. |
|
1411 |
||
1412 |
||
1413 |
! |
|
1414 |
||
1415 |
renameAdditionalProtocol:oldName to:newName forClass:aClass |
|
1416 |
|categories| |
|
1417 |
||
1418 |
"/ those are simulated - in ST/X, empty categories do not |
|
1419 |
"/ really exist; however, during browsing, it makes sense. |
|
1420 |
||
1421 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
|
1422 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1423 |
categories isNil ifTrue:[^ self]. |
|
1424 |
categories remove:oldName ifAbsent:nil. |
|
1425 |
categories add:newName. |
|
1426 |
||
1427 |
aClass changed:#organization. "/ not really ... to force update |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1428 |
Smalltalk changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName). "/ not really ... to force update |
5591 | 1429 |
! ! |
1430 |
||
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1431 |
!MethodCategoryList::CachedMethodInfo class methodsFor:'initialization'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1432 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1433 |
initialize |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1434 |
FlagObsolete := 1. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1435 |
FlagSendsSuper := 2. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1436 |
FlagIsUncommented := 4. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1437 |
FlagIsDocumentationMethod := 8. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1438 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1439 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1440 |
!MethodCategoryList::CachedMethodInfo class methodsFor:'instance creation'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1441 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1442 |
new |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1443 |
^ self basicNew flags:0. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1444 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1445 |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1446 |
!MethodCategoryList::CachedMethodInfo methodsFor:'accessing'! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1447 |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1448 |
flags:something |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1449 |
flags := something. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1450 |
! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1451 |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1452 |
isDocumentationMethod |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1453 |
^ (flags ? 0) bitTest: FlagIsDocumentationMethod |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1454 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1455 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1456 |
isDocumentationMethod:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1457 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1458 |
ifTrue:[ flags bitOr: FlagIsDocumentationMethod ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1459 |
ifFalse:[ flags bitClear: FlagIsDocumentationMethod] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1460 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1461 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1462 |
isObsolete |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1463 |
^ (flags ? 0) bitTest: FlagObsolete |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1464 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1465 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1466 |
isObsolete:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1467 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1468 |
ifTrue:[ flags bitOr: FlagObsolete ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1469 |
ifFalse:[ flags bitClear: FlagObsolete] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1470 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1471 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1472 |
isUncommented |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1473 |
^ (flags ? 0) bitTest: FlagIsUncommented |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1474 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1475 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1476 |
isUncommented:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1477 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1478 |
ifTrue:[ flags bitOr: FlagIsUncommented ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1479 |
ifFalse:[ flags bitClear: FlagIsUncommented] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1480 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1481 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1482 |
sendsSuper |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1483 |
^ (flags ? 0) bitTest: FlagSendsSuper |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1484 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1485 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1486 |
sendsSuper:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1487 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1488 |
ifTrue:[ flags bitOr: FlagSendsSuper ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1489 |
ifFalse:[ flags bitClear: FlagSendsSuper] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1490 |
! ! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1491 |
|
5591 | 1492 |
!MethodCategoryList class methodsFor:'documentation'! |
1493 |
||
1494 |
version |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1495 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.33 2009-10-03 11:00:13 cg Exp $' |
8848 | 1496 |
! |
1497 |
||
1498 |
version_CVS |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1499 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.33 2009-10-03 11:00:13 cg Exp $' |
5591 | 1500 |
! ! |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1501 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1502 |
MethodCategoryList initialize! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1503 |
MethodCategoryList::CachedMethodInfo initialize! |