author | Claus Gittinger <cg@exept.de> |
Fri, 23 Sep 2011 20:56:37 +0200 | |
changeset 10720 | 82b4939aafc5 |
parent 10712 | da12d4dac8b9 |
child 11462 | c4aea6f0722e |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
3 |
All Rights Reserved |
5591 | 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 |
|
9243 | 17 |
instanceVariableNames:'variableFilter filterClassVars lastSelectedProtocols classes |
18 |
leafClasses protocolList rawProtocolList selectedProtocolIndices |
|
19 |
lastGeneratedProtocols packageFilterOnInput |
|
20 |
methodVisibilityHolder noAllItem noPseudoItems |
|
10231 | 21 |
showPseudoProtocols' |
9243 | 22 |
classVariableNames:'AdditionalEmptyCategoriesPerClassName MethodInfoCache |
23 |
MethodInfoCacheAccessLock' |
|
24 |
poolDictionaries:'' |
|
25 |
category:'Interface-Browsers-New' |
|
5591 | 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 |
9243 | 29 |
instanceVariableNames:'flags' |
30 |
classVariableNames:'FlagObsolete FlagSendsSuper FlagIsUncommented |
|
31 |
FlagIsDocumentationMethod FlagIsLongMethod FlagIsExtension |
|
10250 | 32 |
FlagIsRedefine FlagIsOverride FlagIsSubclassResponsibility |
10679 | 33 |
FlagIsTest FlagIsAnnotated' |
9243 | 34 |
poolDictionaries:'' |
35 |
privateIn:MethodCategoryList |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
36 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
37 |
|
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
38 |
Method variableSubclass:#MissingMethod |
9243 | 39 |
instanceVariableNames:'selector' |
40 |
classVariableNames:'' |
|
41 |
poolDictionaries:'' |
|
42 |
privateIn:MethodCategoryList |
|
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
43 |
! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
44 |
|
5591 | 45 |
!MethodCategoryList class methodsFor:'documentation'! |
46 |
||
47 |
copyright |
|
48 |
" |
|
49 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
50 |
All Rights Reserved |
5591 | 51 |
|
52 |
This software is furnished under a license and may be used |
|
53 |
only in accordance with the terms of that license and with the |
|
54 |
inclusion of the above copyright notice. This software may not |
|
55 |
be provided or otherwise made available to, or used by, any |
|
56 |
other person. No title to or ownership of the software is |
|
57 |
hereby transferred. |
|
58 |
" |
|
59 |
! ! |
|
60 |
||
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
61 |
!MethodCategoryList class methodsFor:'initialization'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
62 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
63 |
flushMethodInfo |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
64 |
MethodInfoCache := Dictionary new. |
8867 | 65 |
|
66 |
" |
|
67 |
self flushMethodInfo |
|
68 |
" |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
69 |
! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
70 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
71 |
initialize |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
72 |
MethodInfoCache := Dictionary new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
73 |
MethodInfoCacheAccessLock := RecursionLock new. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
74 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
75 |
|
10551 | 76 |
!MethodCategoryList class methodsFor:'cleanup'! |
77 |
||
78 |
lowSpaceCleanup |
|
10552 | 79 |
self flushMethodInfo |
10551 | 80 |
|
81 |
"Created: / 08-08-2011 / 19:15:25 / cg" |
|
82 |
! ! |
|
83 |
||
5591 | 84 |
!MethodCategoryList class methodsFor:'interface specs'! |
85 |
||
86 |
singleProtocolWindowSpec |
|
87 |
"This resource specification was automatically generated |
|
88 |
by the UIPainter of ST/X." |
|
89 |
||
90 |
"Do not manually edit this!! If it is corrupted, |
|
91 |
the UIPainter may not be able to read the specification." |
|
92 |
||
93 |
" |
|
94 |
UIPainter new openOnClass:MethodCategoryList andSelector:#singleProtocolWindowSpec |
|
95 |
MethodCategoryList new openInterface:#singleProtocolWindowSpec |
|
96 |
" |
|
97 |
||
98 |
<resource: #canvas> |
|
99 |
||
100 |
^ |
|
101 |
#(#FullSpec |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
102 |
#name: #singleProtocolWindowSpec |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
103 |
#window: |
5591 | 104 |
#(#WindowSpec |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
105 |
#label: 'ProtocolList' |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
106 |
#name: 'ProtocolList' |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
107 |
#min: #(#Point 0 0) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
108 |
#max: #(#Point 1024 721) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
109 |
#bounds: #(#Rectangle 12 22 312 322) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
110 |
) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
111 |
#component: |
5591 | 112 |
#(#SpecCollection |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
113 |
#collection: #( |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
114 |
#(#LabelSpec |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
115 |
#label: 'ProtocolName' |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
116 |
#name: 'ProtocolLabel' |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
117 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
118 |
#translateLabel: true |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
119 |
#labelChannel: #protocolLabelHolder |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
120 |
#menu: #menuHolder |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
121 |
) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
122 |
) |
5591 | 123 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
124 |
) |
5591 | 125 |
) |
126 |
! |
|
127 |
||
128 |
windowSpec |
|
129 |
"This resource specification was automatically generated |
|
130 |
by the UIPainter of ST/X." |
|
131 |
||
132 |
"Do not manually edit this!! If it is corrupted, |
|
133 |
the UIPainter may not be able to read the specification." |
|
134 |
||
135 |
" |
|
136 |
UIPainter new openOnClass:MethodCategoryList andSelector:#windowSpec |
|
137 |
MethodCategoryList new openInterface:#windowSpec |
|
138 |
MethodCategoryList open |
|
139 |
" |
|
140 |
||
141 |
<resource: #canvas> |
|
142 |
||
143 |
^ |
|
144 |
#(#FullSpec |
|
6469 | 145 |
#name: #windowSpec |
146 |
#window: |
|
5591 | 147 |
#(#WindowSpec |
6469 | 148 |
#label: 'ProtocolList' |
149 |
#name: 'ProtocolList' |
|
150 |
#min: #(#Point 0 0) |
|
151 |
#bounds: #(#Rectangle 16 46 316 346) |
|
152 |
) |
|
153 |
#component: |
|
5591 | 154 |
#(#SpecCollection |
6469 | 155 |
#collection: #( |
156 |
#(#SequenceViewSpec |
|
157 |
#name: 'List' |
|
158 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
159 |
#tabable: true |
|
160 |
#model: #selectedProtocolIndices |
|
161 |
#menu: #menuHolder |
|
162 |
#hasHorizontalScrollBar: true |
|
163 |
#hasVerticalScrollBar: true |
|
164 |
#miniScrollerHorizontal: true |
|
165 |
#isMultiSelect: true |
|
166 |
#valueChangeSelector: #selectionChangedByClick |
|
167 |
#useIndex: true |
|
168 |
#sequenceList: #protocolList |
|
169 |
#doubleClickChannel: #doubleClickChannel |
|
170 |
#properties: |
|
171 |
#(#PropertyListDictionary |
|
172 |
#dragArgument: nil |
|
173 |
#dropArgument: nil |
|
174 |
#canDropSelector: #canDropContext: |
|
175 |
#dropSelector: #doDropContext: |
|
176 |
) |
|
177 |
) |
|
178 |
) |
|
5591 | 179 |
|
6469 | 180 |
) |
5591 | 181 |
) |
182 |
! ! |
|
183 |
||
184 |
!MethodCategoryList class methodsFor:'plugIn spec'! |
|
185 |
||
186 |
aspectSelectors |
|
187 |
"This resource specification was automatically generated |
|
188 |
by the UIPainter of ST/X." |
|
189 |
||
190 |
"Do not manually edit this. If it is corrupted, |
|
191 |
the UIPainter may not be able to read the specification." |
|
192 |
||
193 |
"Return a description of exported aspects; |
|
194 |
these can be connected to aspects of an embedding application |
|
195 |
(if this app is embedded in a subCanvas)." |
|
196 |
||
197 |
^ #( |
|
8694 | 198 |
#(#doubleClickChannel #action ) |
199 |
#filterClassVars |
|
200 |
#forceGeneratorTrigger |
|
201 |
#immediateUpdate |
|
202 |
#inGeneratorHolder |
|
203 |
#menuHolder |
|
204 |
#noAllItem |
|
205 |
#showPseudoProtocols |
|
206 |
#outGeneratorHolder |
|
207 |
#packageFilter |
|
208 |
#packageFilterOnInput |
|
209 |
#selectedProtocols |
|
210 |
#selectionChangeCondition |
|
211 |
#updateTrigger |
|
212 |
#variableFilter |
|
213 |
#methodVisibilityHolder |
|
9445 | 214 |
#showCoverageInformation |
5591 | 215 |
). |
9445 | 216 |
|
217 |
"Modified: / 27-04-2010 / 16:40:39 / cg" |
|
5591 | 218 |
! ! |
219 |
||
220 |
!MethodCategoryList methodsFor:'aspects'! |
|
221 |
||
222 |
browserNameList |
|
223 |
^ self protocolList |
|
224 |
! |
|
225 |
||
226 |
defaultSlaveModeValue |
|
227 |
^ false. |
|
228 |
! |
|
229 |
||
230 |
filterClassVars |
|
231 |
filterClassVars isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
232 |
filterClassVars := false asValue. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
233 |
filterClassVars addDependent:self |
5591 | 234 |
]. |
235 |
^ filterClassVars |
|
236 |
||
237 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
238 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
239 |
! |
|
240 |
||
241 |
filterClassVars:aValueHolder |
|
242 |
filterClassVars notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
243 |
filterClassVars removeDependent:self |
5591 | 244 |
]. |
245 |
filterClassVars := aValueHolder. |
|
246 |
filterClassVars notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
247 |
filterClassVars addDependent:self |
5591 | 248 |
]. |
249 |
||
250 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
251 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
252 |
! |
|
253 |
||
254 |
methodVisibilityHolder |
|
255 |
methodVisibilityHolder isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
256 |
methodVisibilityHolder := false asValue. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
257 |
methodVisibilityHolder addDependent:self |
5591 | 258 |
]. |
259 |
^ methodVisibilityHolder |
|
260 |
! |
|
261 |
||
262 |
methodVisibilityHolder:aValueHolder |
|
263 |
methodVisibilityHolder notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
264 |
methodVisibilityHolder removeDependent:self |
5591 | 265 |
]. |
266 |
methodVisibilityHolder := aValueHolder. |
|
267 |
methodVisibilityHolder notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
268 |
methodVisibilityHolder addDependent:self |
5591 | 269 |
]. |
270 |
||
271 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
272 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
273 |
! |
|
274 |
||
275 |
noAllItem |
|
276 |
noAllItem isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
277 |
noAllItem := false asValue. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
278 |
noAllItem addDependent:self |
5591 | 279 |
]. |
280 |
^ noAllItem |
|
281 |
! |
|
282 |
||
283 |
noAllItem:aValueHolder |
|
284 |
noAllItem notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
285 |
noAllItem removeDependent:self |
5591 | 286 |
]. |
287 |
noAllItem := aValueHolder. |
|
288 |
noAllItem notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
289 |
noAllItem addDependent:self |
5591 | 290 |
]. |
291 |
! |
|
292 |
||
293 |
packageFilterOnInput |
|
294 |
packageFilterOnInput isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
295 |
packageFilterOnInput := nil asValue. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
296 |
packageFilterOnInput addDependent:self |
5591 | 297 |
]. |
298 |
^ packageFilterOnInput |
|
299 |
! |
|
300 |
||
301 |
packageFilterOnInput:aValueHolder |
|
302 |
|prevFilter| |
|
303 |
||
304 |
prevFilter := packageFilterOnInput value. |
|
305 |
packageFilterOnInput notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
306 |
packageFilterOnInput removeDependent:self |
5591 | 307 |
]. |
308 |
packageFilterOnInput := aValueHolder. |
|
309 |
packageFilterOnInput notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
310 |
packageFilterOnInput addDependent:self |
5591 | 311 |
]. |
312 |
prevFilter ~= packageFilterOnInput value ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
313 |
self enqueueDelayedUpdateList |
5591 | 314 |
]. |
315 |
! |
|
316 |
||
317 |
protocolLabelHolder |
|
318 |
^ self pseudoListLabelHolder |
|
319 |
! |
|
320 |
||
321 |
protocolList |
|
322 |
protocolList isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
323 |
protocolList := List new. "/ ValueHolder new |
5591 | 324 |
]. |
325 |
^ protocolList |
|
326 |
||
327 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
328 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
329 |
! |
|
330 |
||
331 |
rawProtocolList |
|
332 |
rawProtocolList isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
333 |
rawProtocolList := List new. |
5591 | 334 |
]. |
335 |
^ rawProtocolList |
|
336 |
! |
|
337 |
||
338 |
selectedProtocolIndices |
|
339 |
selectedProtocolIndices isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
340 |
selectedProtocolIndices := ValueHolder new. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
341 |
selectedProtocolIndices addDependent:self |
5591 | 342 |
]. |
343 |
^ selectedProtocolIndices. |
|
344 |
! |
|
345 |
||
346 |
selectedProtocols |
|
347 |
^ self selectionHolder |
|
348 |
! |
|
349 |
||
350 |
selectedProtocols:aValueHolder |
|
351 |
^ self selectionHolder:aValueHolder |
|
352 |
! |
|
353 |
||
8694 | 354 |
showPseudoProtocols |
355 |
showPseudoProtocols isNil ifTrue:[ |
|
356 |
showPseudoProtocols := true asValue. |
|
357 |
showPseudoProtocols addDependent:self |
|
358 |
]. |
|
359 |
^ showPseudoProtocols |
|
360 |
! |
|
361 |
||
362 |
showPseudoProtocols:aValueHolder |
|
363 |
showPseudoProtocols notNil ifTrue:[ |
|
364 |
showPseudoProtocols removeDependent:self |
|
365 |
]. |
|
366 |
showPseudoProtocols := aValueHolder. |
|
367 |
showPseudoProtocols notNil ifTrue:[ |
|
368 |
showPseudoProtocols addDependent:self |
|
369 |
]. |
|
370 |
! |
|
371 |
||
5591 | 372 |
variableFilter |
373 |
variableFilter isNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
374 |
variableFilter := false asValue. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
375 |
variableFilter addDependent:self |
5591 | 376 |
]. |
377 |
^ variableFilter |
|
378 |
||
379 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
380 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
381 |
! |
|
382 |
||
383 |
variableFilter:aValueHolder |
|
384 |
variableFilter notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
385 |
variableFilter removeDependent:self |
5591 | 386 |
]. |
387 |
variableFilter := aValueHolder. |
|
388 |
variableFilter notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
389 |
variableFilter addDependent:self |
5591 | 390 |
]. |
391 |
||
392 |
"Modified: / 31.1.2000 / 00:56:31 / cg" |
|
393 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
394 |
! ! |
|
395 |
||
396 |
!MethodCategoryList methodsFor:'change & update'! |
|
397 |
||
398 |
classDefinitionChanged:aClass |
|
399 |
|refetch anyChange| |
|
400 |
||
401 |
anyChange := false. |
|
402 |
refetch := [:oldClass | |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
403 |
|nm cls newClass| |
5591 | 404 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
405 |
nm := oldClass theNonMetaclass name. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
406 |
oldClass isMeta ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
407 |
newClass := Smalltalk at:nm. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
408 |
newClass isNil ifTrue:[ |
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
409 |
"/ Transcript showCR:'oops - browser lost class ' , nm. |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
410 |
newClass := oldClass |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
411 |
] ifFalse:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
412 |
newClass := newClass theMetaclass |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
413 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
414 |
] ifFalse:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
415 |
newClass := Smalltalk at:nm |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
416 |
]. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
417 |
newClass ~~ oldClass ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
418 |
anyChange := true. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
419 |
]. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
420 |
newClass |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
421 |
]. |
5591 | 422 |
|
423 |
classes := classes collect:refetch. |
|
424 |
leafClasses := leafClasses collect:refetch. |
|
425 |
anyChange ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
426 |
self updateOutputGenerator |
5591 | 427 |
]. |
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
428 |
|
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
429 |
"Modified: / 06-07-2011 / 11:44:13 / cg" |
5591 | 430 |
! |
431 |
||
432 |
delayedUpdate:something with:aParameter from:changedObject |
|
433 |
|sel oldMethod newMethod mthd selectedCategories selectedProtocolsHolder oldProtocol newProtocol |
|
434 |
rawProtocolListHolder rawProtocolList oldSelectedProtocols newSelectedProtocols newIndices idx cls listView| |
|
435 |
||
436 |
selectedProtocolsHolder := self selectedProtocols. |
|
437 |
rawProtocolListHolder := self rawProtocolList. |
|
438 |
||
439 |
changedObject == Smalltalk ifTrue:[ |
|
6412 | 440 |
classes notNil ifTrue:[ |
441 |
something == #methodCategory ifTrue:[ |
|
442 |
cls := aParameter at:1. |
|
443 |
(cls notNil and:[classes includesIdentical:cls]) ifTrue:[ |
|
444 |
mthd := aParameter at:2. |
|
445 |
newProtocol := mthd category. |
|
446 |
oldProtocol := aParameter at:3. |
|
5591 | 447 |
|
10356 | 448 |
listValid == true ifTrue:[ self invalidateList ]. |
5591 | 449 |
|
6412 | 450 |
selectedCategories := selectedProtocolsHolder value. |
451 |
selectedCategories size > 0 ifTrue:[ |
|
452 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
453 |
selectedCategories := selectedCategories collect:[:each | each string]. |
|
5591 | 454 |
|
6412 | 455 |
((selectedCategories includes:oldProtocol) |
456 |
or:[ (selectedCategories includes:newProtocol) |
|
457 |
or:[ selectedCategories includes:(self class nameListEntryForALL) ]]) |
|
458 |
ifTrue:[ |
|
10720
82b4939aafc5
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10712
diff
changeset
|
459 |
self enqueueDelayedUpdateOutputGenerator "/ updateOutputGenerator. |
6412 | 460 |
]. |
461 |
]. |
|
5591 | 462 |
|
6412 | 463 |
]. |
464 |
^ self |
|
465 |
]. |
|
5591 | 466 |
|
6412 | 467 |
something == #methodInClass ifTrue:[ |
468 |
"/ a method has been added/removed/changed |
|
469 |
cls := aParameter at:1. |
|
470 |
(classes includesIdentical:cls) ifTrue:[ |
|
471 |
sel := aParameter at:2. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
472 |
self flushMethodInfoForClassNamed:cls name selector:sel. |
6412 | 473 |
oldMethod := aParameter at:3. |
474 |
newMethod := cls compiledMethodAt:sel. |
|
475 |
oldMethod notNil ifTrue:[ |
|
476 |
variableFilter value size > 0 ifTrue:[ |
|
477 |
"/ sigh - must invalidate |
|
10356 | 478 |
listValid == true ifTrue:[ self invalidateList ]. |
6412 | 479 |
]. |
480 |
^ self. |
|
481 |
]. |
|
482 |
"/ method was added - update the methodList |
|
483 |
"/ Q: is this needed (methodCategoryList should send me a new inGenerator) |
|
10356 | 484 |
listValid == true ifTrue:[ self invalidateList ]. |
5591 | 485 |
|
6412 | 486 |
"/ if its category is selected, updateOutputGenerator |
487 |
selectedCategories := selectedProtocolsHolder value. |
|
488 |
selectedCategories size > 0 ifTrue:[ |
|
489 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
490 |
selectedCategories := selectedCategories collect:[:each | each string]. |
|
5591 | 491 |
|
6412 | 492 |
((oldMethod notNil and:[selectedCategories includes:(oldMethod category)]) |
493 |
or:[ (newMethod notNil and:[selectedCategories includes:(newMethod category)])]) |
|
494 |
ifTrue:[ |
|
10720
82b4939aafc5
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10712
diff
changeset
|
495 |
self enqueueDelayedUpdateOutputGenerator "/ updateOutputGenerator. |
6412 | 496 |
]. |
497 |
]. |
|
498 |
]. |
|
499 |
^ self. |
|
500 |
]. |
|
5591 | 501 |
|
6412 | 502 |
something == #methodInClassRemoved ifTrue:[ |
503 |
cls := aParameter at:1. |
|
504 |
(classes includesIdentical:cls) ifTrue:[ |
|
505 |
sel := aParameter at:2. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
506 |
self flushMethodInfoForClassNamed:cls name selector:sel. |
6412 | 507 |
"/ method was removed - update the list and output generator |
508 |
self invalidateList. |
|
509 |
"/ self updateOutputGenerator. |
|
510 |
self slaveMode value == true ifFalse:[ |
|
511 |
self enqueueDelayedUpdateOutputGenerator. |
|
512 |
] |
|
513 |
]. |
|
514 |
^ self. |
|
515 |
]. |
|
5591 | 516 |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
517 |
(something == #classOrganization |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
518 |
or:[ something == #methodCategoryAdded |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
519 |
or:[ something == #methodCategoryRemoved |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
520 |
or:[ something == #methodCategoriesRemoved |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
521 |
or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[ |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
522 |
cls := (something == #classOrganization) ifTrue:aParameter ifFalse:[aParameter first]. |
6412 | 523 |
(classes includesIdentical:cls) ifTrue:[ |
10356 | 524 |
listValid == true ifTrue:[ self invalidateList ]. |
6412 | 525 |
] ifFalse:[ |
526 |
(classes contains:[:aClass | aClass name = cls name]) ifTrue:[ |
|
10356 | 527 |
listValid == true ifTrue:[ self invalidateList ]. |
6412 | 528 |
"/ self error:'obsolete class: should not happen'. |
529 |
] |
|
530 |
]. |
|
531 |
^ self. |
|
532 |
]. |
|
5591 | 533 |
|
6412 | 534 |
something == #projectOrganization ifTrue:[ |
535 |
aParameter notNil ifTrue:[ |
|
536 |
cls := aParameter at:1. |
|
537 |
cls notNil ifTrue:[ |
|
538 |
((classes includes:cls theMetaclass) |
|
539 |
or:[(classes includes:cls theNonMetaclass)]) ifTrue:[ |
|
540 |
self invalidateList. |
|
541 |
self slaveMode value == true ifFalse:[ |
|
542 |
self enqueueDelayedUpdateOutputGenerator. |
|
543 |
] |
|
544 |
]. |
|
545 |
]. |
|
546 |
] ifFalse:[ |
|
10356 | 547 |
listValid == true ifTrue:[ self invalidateList ]. |
6412 | 548 |
]. |
549 |
^ self |
|
550 |
]. |
|
5591 | 551 |
|
10356 | 552 |
(something == #methodCoverageInformation) ifTrue:[ |
553 |
"/ already checked if it is one of my classes |
|
554 |
listValid == true ifTrue:[ self invalidateList ]. |
|
555 |
^ self |
|
556 |
]. |
|
557 |
||
6412 | 558 |
(something == #classDefinition or:[something == #classVariables]) |
559 |
ifTrue:[ |
|
560 |
self classDefinitionChanged:aParameter. |
|
561 |
^ self |
|
562 |
]. |
|
5591 | 563 |
|
6412 | 564 |
"/ everything else is ignored |
565 |
"/ self halt. |
|
566 |
]. |
|
567 |
^ self |
|
5591 | 568 |
]. |
569 |
||
570 |
changedObject == self selectedProtocolIndices ifTrue:[ |
|
6412 | 571 |
oldSelectedProtocols := selectedProtocolsHolder value ? #(). |
572 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
573 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each string]. |
|
574 |
newSelectedProtocols := self getSelectedProtocolsFromIndices. |
|
575 |
oldSelectedProtocols ~= newSelectedProtocols ifTrue:[ |
|
576 |
selectedProtocolsHolder value:newSelectedProtocols. |
|
577 |
]. |
|
578 |
newSelectedProtocols size > 1 ifTrue:[ |
|
579 |
(newSelectedProtocols includes:(self class nameListEntryForALL)) ifTrue:[ |
|
580 |
rawProtocolList := rawProtocolListHolder value. |
|
581 |
idx := rawProtocolList indexOf: (newSelectedProtocols copy remove:(self class nameListEntryForALL); yourself) first. |
|
582 |
idx ~~ 0 ifTrue:[ |
|
8742 | 583 |
(listView := self componentAt:#List) notNil ifTrue:[ |
6412 | 584 |
listView makeLineVisible:idx. |
585 |
] |
|
586 |
] |
|
587 |
] |
|
588 |
]. |
|
5591 | 589 |
|
6412 | 590 |
^ self |
5591 | 591 |
]. |
592 |
||
593 |
changedObject == selectedProtocolsHolder ifTrue:[ |
|
6412 | 594 |
rawProtocolList := rawProtocolListHolder value. |
595 |
rawProtocolList size == 0 ifTrue:[ |
|
10712
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
596 |
lastGeneratedProtocols := nil. |
6412 | 597 |
self updateList. |
598 |
rawProtocolList := rawProtocolListHolder value. |
|
599 |
]. |
|
600 |
rawProtocolList notNil ifTrue:[ |
|
601 |
selectedCategories := selectedProtocolsHolder value ? #(). |
|
602 |
selectedCategories := selectedCategories collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
603 |
newIndices := selectedCategories |
|
604 |
collect:[:each | rawProtocolList findFirst:[:p | p string = each string]]. |
|
605 |
newIndices := newIndices select:[:each | each ~~ 0]. |
|
606 |
newIndices ~= self selectedProtocolIndices value ifTrue:[ |
|
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
607 |
self selectedProtocolIndices |
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
608 |
setValue:nil; "/ to force update |
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
609 |
value:newIndices. |
6412 | 610 |
]. |
10712
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
611 |
"/ cg: does not work (selecting all with testcase classes) |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
612 |
"/ don't see why, at the moment, but.... |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
613 |
"/ (lastGeneratedProtocols notNil |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
614 |
"/ and:[(lastGeneratedProtocols includes:self class nameListEntryForALL) |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
615 |
"/ and:[(selectedCategories ? #()) includes:self class nameListEntryForALL]]) |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
616 |
"/ ifTrue:[ |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
617 |
"/ "/ no need to update generator |
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
618 |
"/ ] ifFalse:[ |
6412 | 619 |
self updateOutputGenerator. |
10712
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
620 |
"/ ] |
6412 | 621 |
]. |
622 |
^ self |
|
5591 | 623 |
]. |
624 |
||
625 |
(changedObject == variableFilter |
|
626 |
or:[changedObject == filterClassVars |
|
627 |
or:[changedObject == packageFilterOnInput]]) ifTrue:[ |
|
6412 | 628 |
self invalidateList. |
629 |
^ self |
|
5591 | 630 |
]. |
631 |
||
632 |
changedObject == methodVisibilityHolder ifTrue:[ |
|
6412 | 633 |
self invalidateList. |
634 |
self updateOutputGenerator. |
|
635 |
^ self |
|
5591 | 636 |
]. |
637 |
||
638 |
lastGeneratedProtocols := nil. |
|
639 |
||
640 |
changedObject == inGeneratorHolder ifTrue:[ |
|
6412 | 641 |
selectedCategories := selectedProtocolsHolder value. |
5591 | 642 |
|
6412 | 643 |
selectedCategories size > 0 ifTrue:[ |
644 |
oldSelectedProtocols := selectedCategories ? #(). |
|
645 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each ifNil:[self class nameListEntryForNILCategory]]. |
|
646 |
oldSelectedProtocols := oldSelectedProtocols collect:[:each | each string]. |
|
647 |
self updateList. |
|
648 |
rawProtocolList := rawProtocolListHolder value. |
|
649 |
newSelectedProtocols := oldSelectedProtocols select:[:each | rawProtocolList includes:each]. |
|
5591 | 650 |
"/ selectedProtocolsHolder setValue:nil. "/ to force update |
6412 | 651 |
selectedProtocolsHolder value:newSelectedProtocols. |
652 |
^ self |
|
653 |
]. |
|
5591 | 654 |
]. |
655 |
||
656 |
super delayedUpdate:something with:aParameter from:changedObject |
|
657 |
||
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
658 |
"Created: / 05-02-2000 / 13:42:10 / cg" |
10720
82b4939aafc5
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10712
diff
changeset
|
659 |
"Modified: / 23-09-2011 / 20:37:31 / cg" |
5591 | 660 |
! |
661 |
||
662 |
getSelectedProtocolsFromIndices |
|
663 |
|l| |
|
664 |
||
665 |
l := self rawProtocolList value. |
|
666 |
^ self selectedProtocolIndices value collect:[:idx | l at:idx]. |
|
667 |
! |
|
668 |
||
669 |
selectionChanged |
|
670 |
|newSelectedCategories allEntry| |
|
671 |
||
672 |
newSelectedCategories := self selectedProtocols value. |
|
673 |
||
674 |
"/ the outputGenerator is only to be updated, if the output would really |
|
675 |
"/ change ... |
|
676 |
allEntry := self class nameListEntryForALL. |
|
677 |
||
678 |
(lastSelectedProtocols notNil |
|
679 |
and:[newSelectedCategories notNil |
|
680 |
and:[(lastSelectedProtocols includes:(allEntry)) |
|
681 |
and:[newSelectedCategories includes:(allEntry)]]]) ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
682 |
"/ no change ... |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
683 |
^ self |
5591 | 684 |
]. |
685 |
||
686 |
super selectionChanged. |
|
687 |
||
688 |
"Created: / 5.2.2000 / 13:42:10 / cg" |
|
689 |
"Modified: / 24.2.2000 / 14:12:12 / cg" |
|
690 |
! |
|
691 |
||
692 |
selectionChangedByClick |
|
693 |
"we are not interested in that - get another notification |
|
694 |
via the changed valueHolder" |
|
695 |
||
696 |
lastSelectedProtocols := self getSelectedProtocolsFromIndices |
|
697 |
! |
|
698 |
||
699 |
update:something with:aParameter from:changedObject |
|
10356 | 700 |
|cls sel mthd oldMethod newMethod| |
5591 | 701 |
|
702 |
"/ some can be ignored immediately |
|
703 |
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
|
704 |
something isNil ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
705 |
"/ 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
|
706 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
707 |
]. |
6880 | 708 |
|
709 |
something == #currentChangeSet ifTrue:[ |
|
10356 | 710 |
listValid == true ifTrue:[ self invalidateList ]. |
6880 | 711 |
^ self. |
712 |
]. |
|
713 |
||
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
714 |
something == #methodInClass ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
715 |
"/ 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
|
716 |
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
|
717 |
(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
|
718 |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
719 |
sel := aParameter at:2. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
720 |
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
|
721 |
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
|
722 |
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
|
723 |
oldMethod notNil ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
724 |
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
|
725 |
"/ sigh - must invalidate |
10356 | 726 |
listValid == true ifTrue:[ self invalidateList ]. |
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
727 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
728 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
729 |
oldMethod category ~= newMethod category ifTrue:[ |
10356 | 730 |
listValid == true ifTrue:[ self invalidateList ]. |
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
731 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
732 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
733 |
"/ mhmh - its now changed (so coloring will change). |
10356 | 734 |
listValid == true ifTrue:[ self invalidateList ]. |
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
735 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
736 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
737 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
738 |
|
5591 | 739 |
"/ something == #classDefinition ifTrue:[ |
740 |
"/ ^ self. |
|
741 |
"/ ]. |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
742 |
something == #newClass ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
743 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
744 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
745 |
something == #classRemove ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
746 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
747 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
748 |
something == #classRename ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
749 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
750 |
]. |
5591 | 751 |
"/ something == #classVariables ifTrue:[ |
752 |
"/ ^ self. |
|
753 |
"/ ]. |
|
6855
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
754 |
something == #classComment ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
755 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
756 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
757 |
something == #organization ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
758 |
^ self. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
759 |
]. |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
760 |
something == #methodTrap ifTrue:[ |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
761 |
^ self |
93bacd7fcf14
much faster update (only invalidate once, when multiple methods are compiled)
Claus Gittinger <cg@exept.de>
parents:
6706
diff
changeset
|
762 |
]. |
10356 | 763 |
|
764 |
something == #methodCoverageInfo ifTrue:[ |
|
765 |
self showCoverageInformation value ifFalse:[^ self]. |
|
10368 | 766 |
listValid ifFalse:[^ self ]. |
767 |
||
10356 | 768 |
mthd := aParameter. |
769 |
(classes notNil and:[classes includesIdentical:mthd mclass]) ifFalse:[^ self]. |
|
10368 | 770 |
|
771 |
self enqueueDelayedUpdateList. |
|
772 |
listValid := false. |
|
773 |
^ self |
|
10356 | 774 |
]. |
5591 | 775 |
]. |
776 |
||
777 |
super update:something with:aParameter from:changedObject. |
|
6880 | 778 |
|
10368 | 779 |
"Modified: / 20-07-2011 / 18:54:57 / cg" |
5591 | 780 |
! ! |
781 |
||
782 |
!MethodCategoryList methodsFor:'drag & drop'! |
|
783 |
||
6469 | 784 |
canDropContext:aDropContext |
5591 | 785 |
|cat methods| |
786 |
||
787 |
methods := aDropContext dropObjects collect:[:obj | obj theObject]. |
|
7123 | 788 |
(methods conform:[:aMethod | aMethod isMethod]) ifFalse:[^ false]. |
5591 | 789 |
|
790 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
6492 | 791 |
cat isNil ifTrue:[^ false]. |
5591 | 792 |
|
793 |
(methods contains:[:aMethod | aMethod category ~= cat]) ifFalse:[^ false]. |
|
6492 | 794 |
^ true |
7123 | 795 |
|
796 |
"Modified: / 13-09-2006 / 11:44:02 / cg" |
|
5591 | 797 |
! |
798 |
||
799 |
categoryAtTargetPointOf:aDropContext |
|
800 |
|p methodListView lineNr cat| |
|
801 |
||
802 |
p := aDropContext targetPoint. |
|
803 |
||
804 |
methodListView := aDropContext targetWidget. |
|
805 |
||
806 |
lineNr := methodListView lineAtY:p y. |
|
807 |
lineNr isNil ifTrue:[^ nil]. |
|
808 |
||
809 |
cat := rawProtocolList at:lineNr. |
|
810 |
cat := cat string. |
|
811 |
cat = self class nameListEntryForALL ifTrue:[^ nil]. |
|
812 |
||
813 |
^ cat |
|
814 |
! |
|
815 |
||
6469 | 816 |
doDropContext:aDropContext |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
817 |
"handle dropping of a method as a category change" |
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
818 |
|
5591 | 819 |
|cat methods| |
820 |
||
821 |
methods := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
|
7123 | 822 |
(methods conform:[:something | something isMethod]) ifFalse:[^ self]. |
5591 | 823 |
|
824 |
cat := self categoryAtTargetPointOf:aDropContext. |
|
825 |
cat notNil ifTrue:[ |
|
6469 | 826 |
self masterApplication moveMethods:methods toProtocol:cat. |
5591 | 827 |
]. |
7123 | 828 |
|
829 |
"Modified: / 13-09-2006 / 11:43:23 / cg" |
|
5591 | 830 |
! ! |
831 |
||
832 |
!MethodCategoryList methodsFor:'generators'! |
|
833 |
||
834 |
makeGenerator |
|
835 |
"return a generator which enumerates the methods from the selected protocol; |
|
836 |
that generator generates 4-element elements (includes the class and protocol), |
|
837 |
in order to make the consumers only depend on one input |
|
838 |
(i.e. to pass multiple-class and multiple-protocol info |
|
839 |
without a need for another classHolder/protocolHolder in the methodList)." |
|
840 |
||
8694 | 841 |
^ Iterator |
842 |
on:[:whatToDo | |
|
843 |
|protocols |
|
8867 | 844 |
allProtocols superSendProtocols uncommentedProtocols obsoleteProtocols |
8964 | 845 |
documentationProtocols longProtocols extensionProtocols redefinedProtocols overrideProtocols |
9086 | 846 |
missingRequiredProtocols subclassResponsibilities |
10679 | 847 |
notInstrumentedProtocols annotatedProtocols fullyCoveredProtocols |
848 |
partiallyCoveredProtocols uncoveredProtocols |
|
8694 | 849 |
noCat static notStatic classSelectorPairsAlreadyDone |
10679 | 850 |
packages remainingClasses remainingCategories classesAlreadyDone noPackage |
851 |
catListed| |
|
5591 | 852 |
|
8969 | 853 |
noPackage := PackageId noProjectID. |
8694 | 854 |
noCat := (self class nameListEntryForNILCategory). |
855 |
static := (self class nameListEntryForStatic). |
|
856 |
notStatic := (self class nameListEntryForNonStatic). |
|
5591 | 857 |
|
8694 | 858 |
protocols := self selectedProtocols value ? #(). |
859 |
protocols := protocols collect:[:each | (each ifNil:[noCat]) string]. |
|
860 |
lastGeneratedProtocols := protocols. |
|
861 |
protocols := protocols asSet. |
|
862 |
||
863 |
(leafClasses size > 0 and:[protocols size > 0]) ifTrue:[ |
|
864 |
allProtocols := protocols includes:(self class nameListEntryForALL). |
|
865 |
superSendProtocols := protocols includes:(self class nameListEntryForSuperSend). |
|
866 |
uncommentedProtocols := protocols includes:(self class nameListEntryForUncommented). |
|
8718 | 867 |
obsoleteProtocols := protocols includes:(self class nameListEntryForObsolete). |
8733 | 868 |
documentationProtocols := protocols includes:(self class nameListEntryForDocumentation). |
8867 | 869 |
longProtocols := protocols includes:(self class nameListEntryForLong). |
8931 | 870 |
extensionProtocols := protocols includes:(self class nameListEntryForExtensions). |
8964 | 871 |
redefinedProtocols := protocols includes:(self class nameListEntryForRedefined). |
8931 | 872 |
overrideProtocols := protocols includes:(self class nameListEntryForOverride). |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
873 |
missingRequiredProtocols := protocols includes:(self class nameListEntryForRequired). |
9086 | 874 |
subclassResponsibilities := protocols includes:(self class nameListEntryForMustBeRedefinedInSubclass). |
10679 | 875 |
annotatedProtocols := protocols includes:(self class nameListEntryForAnnotated). |
876 |
||
877 |
fullyCoveredProtocols := protocols includes:(self class nameListEntryForFullyCovered). |
|
878 |
partiallyCoveredProtocols := protocols includes:(self class nameListEntryForPartiallyCovered). |
|
879 |
uncoveredProtocols := protocols includes:(self class nameListEntryForUncovered). |
|
880 |
notInstrumentedProtocols := protocols includes:(self class nameListEntryForNotInstrumented). |
|
10360 | 881 |
|
10679 | 882 |
packages := packageFilter value value. |
883 |
(packages notNil and:[packages includes:(self class nameListEntryForALL)]) ifTrue:[ |
|
884 |
packages := nil. |
|
885 |
]. |
|
5591 | 886 |
|
8694 | 887 |
remainingClasses := leafClasses copy asIdentitySet. |
888 |
remainingCategories := protocols copy asSet. |
|
5591 | 889 |
|
8694 | 890 |
classesAlreadyDone := IdentitySet new. |
891 |
classSelectorPairsAlreadyDone := Set new. |
|
5591 | 892 |
|
8694 | 893 |
leafClasses do:[:aLeafClass | |
894 |
(self classesToProcessForClasses:(Array with:aLeafClass)) do:[:aClass | |
|
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
895 |
|supportsMethodCategories isJavaClass anyInThisClass requiredProtocolForClass| |
5591 | 896 |
|
8694 | 897 |
(classesAlreadyDone includes:aClass) ifFalse:[ |
898 |
classesAlreadyDone add:aClass. |
|
5591 | 899 |
|
8694 | 900 |
supportsMethodCategories := aClass supportsMethodCategories. |
901 |
isJavaClass := aClass isJavaClass. |
|
902 |
anyInThisClass := false. |
|
5591 | 903 |
|
8694 | 904 |
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
|
905 |
|cat mPkg includeIt info| |
5591 | 906 |
|
10679 | 907 |
"/ sel == #metacelloCleanup ifTrue:[self halt]. |
8694 | 908 |
supportsMethodCategories ifTrue:[ |
909 |
cat := mthd category. |
|
910 |
] ifFalse:[ |
|
911 |
isJavaClass ifTrue:[ |
|
912 |
cat := mthd isStatic ifTrue:[static] ifFalse:[notStatic] |
|
913 |
] ifFalse:[ |
|
914 |
cat := noCat. |
|
915 |
] |
|
916 |
]. |
|
10679 | 917 |
catListed := cat. |
918 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
919 |
mPkg := mthd package. |
10679 | 920 |
(packages isNil |
921 |
or:[ mPkg = noPackage |
|
922 |
or:[ (packages includes:mPkg) |
|
923 |
or:[ (extensionProtocols and:[ mthd isExtension ]) |
|
924 |
]]] |
|
925 |
) ifTrue:[ |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
926 |
"/ 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
|
927 |
"/ 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
|
928 |
"/ 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
|
929 |
includeIt := allProtocols. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
930 |
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
|
931 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
932 |
superSendProtocols ifTrue:[ |
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
933 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
934 |
includeIt := info sendsSuper ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
935 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
936 |
uncommentedProtocols ifTrue:[ |
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
937 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
10679 | 938 |
includeIt := info isUncommented. |
939 |
catListed := self class nameListEntryForUncommented ]]. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
940 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
941 |
obsoleteProtocols ifTrue:[ |
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
942 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
943 |
includeIt := info isObsolete ]]. |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
944 |
includeIt ifFalse:[ |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
945 |
documentationProtocols ifTrue:[ |
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
946 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
947 |
includeIt := info isDocumentationMethod ]]. |
8867 | 948 |
includeIt ifFalse:[ |
949 |
longProtocols ifTrue:[ |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
950 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8867 | 951 |
includeIt := info isLongMethod ]]. |
8931 | 952 |
includeIt ifFalse:[ |
953 |
extensionProtocols ifTrue:[ |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
954 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
10679 | 955 |
includeIt := info isExtensionMethod. |
956 |
catListed := self class nameListEntryForExtensions ]]. |
|
8931 | 957 |
includeIt ifFalse:[ |
958 |
overrideProtocols ifTrue:[ |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
959 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8931 | 960 |
includeIt := info isOverride ]]. |
8964 | 961 |
includeIt ifFalse:[ |
962 |
redefinedProtocols ifTrue:[ |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
963 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
8964 | 964 |
includeIt := info isRedefine ]]. |
9086 | 965 |
includeIt ifFalse:[ |
966 |
subclassResponsibilities ifTrue:[ |
|
967 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
|
968 |
includeIt := info isSubclassResponsibility ]]. |
|
10679 | 969 |
includeIt ifFalse:[ |
970 |
annotatedProtocols ifTrue:[ |
|
971 |
info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
|
972 |
includeIt := info isAnnotated ]]. |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
973 |
|
10360 | 974 |
includeIt ifFalse:[ |
975 |
mthd isInstrumented ifTrue:[ |
|
976 |
mthd hasBeenCalled ifTrue:[ |
|
977 |
mthd haveAllBlocksBeenExecuted ifTrue:[ |
|
10679 | 978 |
includeIt := fullyCoveredProtocols. |
10360 | 979 |
] ifFalse:[ |
10679 | 980 |
includeIt := partiallyCoveredProtocols |
10360 | 981 |
] |
982 |
] ifFalse:[ |
|
10679 | 983 |
includeIt := uncoveredProtocols |
10360 | 984 |
]. |
985 |
] ifFalse:[ |
|
10679 | 986 |
includeIt := notInstrumentedProtocols |
10360 | 987 |
]. |
988 |
]. |
|
989 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
990 |
includeIt ifTrue:[ |
8694 | 991 |
(methodVisibilityHolder value == #class) ifTrue:[ |
10679 | 992 |
whatToDo value:aClass value:catListed value:sel value:mthd. |
8694 | 993 |
] ifFalse:[ |
994 |
(classSelectorPairsAlreadyDone includes:(aLeafClass->sel)) ifFalse:[ |
|
995 |
classSelectorPairsAlreadyDone add:(aLeafClass->sel). |
|
10679 | 996 |
whatToDo value:aClass value:catListed value:sel value:mthd. |
8694 | 997 |
]. |
998 |
]. |
|
999 |
anyInThisClass := true. |
|
10679 | 1000 |
remainingCategories remove:catListed ifAbsent:nil. |
9086 | 1001 |
]. |
8694 | 1002 |
] |
7296
dfea12500274
do not suppress loose methods
Claus Gittinger <cg@exept.de>
parents:
7123
diff
changeset
|
1003 |
]. |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1004 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1005 |
missingRequiredProtocols ifTrue:[ |
9729
0d29623f7e10
CodeGeneratorTool->SmalltalkCodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents:
9465
diff
changeset
|
1006 |
requiredProtocolForClass := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:aClass. |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1007 |
requiredProtocolForClass do:[:sel | |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1008 |
|selectorInRed missingMethodPlaceHolder| |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1009 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1010 |
selectorInRed := sel colorizeAllWith:Color red. |
9043 | 1011 |
missingMethodPlaceHolder := MissingMethod mclass:aClass selector:sel. |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1012 |
whatToDo value:aClass value:'required' value:selectorInRed value:missingMethodPlaceHolder. |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1013 |
]. |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1014 |
]. |
8694 | 1015 |
anyInThisClass ifTrue:[ remainingClasses remove:aClass ifAbsent:nil. ]. |
1016 |
]. |
|
1017 |
]. |
|
1018 |
]. |
|
1019 |
remainingClasses do:[:aClass | |
|
1020 |
whatToDo value:aClass value:nil value:nil value:nil. |
|
1021 |
]. |
|
1022 |
remainingCategories do:[:cat | |
|
1023 |
whatToDo value:nil value:cat value:nil value:nil. |
|
1024 |
] |
|
1025 |
] |
|
1026 |
] |
|
5591 | 1027 |
|
7296
dfea12500274
do not suppress loose methods
Claus Gittinger <cg@exept.de>
parents:
7123
diff
changeset
|
1028 |
"Created: / 05-02-2000 / 13:42:10 / cg" |
10712
da12d4dac8b9
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10687
diff
changeset
|
1029 |
"Modified: / 18-09-2011 / 12:51:45 / cg" |
5591 | 1030 |
! ! |
1031 |
||
1032 |
!MethodCategoryList methodsFor:'private'! |
|
1033 |
||
1034 |
class:cls protocol:cat includesMethodsInAnyPackage:packageFilter |
|
1035 |
cls methodDictionary keysAndValuesDo:[:sel :mthd | |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1036 |
mthd category == cat ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1037 |
(packageFilter includes:mthd package) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1038 |
^ true |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1039 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1040 |
] |
5591 | 1041 |
]. |
1042 |
^ false |
|
1043 |
! |
|
1044 |
||
1045 |
class:cls protocol:cat includesModsOfClassVariable:variablesToHighLight |
|
9243 | 1046 |
"are there any methods in the protocol cat which modify any class variable in variablesToHighLight ?" |
1047 |
||
5591 | 1048 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#modifiedClassVars |
1049 |
! |
|
1050 |
||
1051 |
class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighLight |
|
9243 | 1052 |
"are there any methods in the protocol cat which modify any inst variable in variablesToHighLight ?" |
1053 |
||
5591 | 1054 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#modifiedInstVars |
1055 |
! |
|
1056 |
||
1057 |
class:cls protocol:cat includesRefsToClassVariable:variablesToHighLight |
|
9243 | 1058 |
"are there any methods in the protocol cat which reference any class variable in variablesToHighLight ?" |
1059 |
||
5591 | 1060 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#usedClassVars |
1061 |
! |
|
1062 |
||
1063 |
class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighLight |
|
9243 | 1064 |
"are there any methods in the protocol cat which reference any inst variable in variablesToHighLight ?" |
1065 |
||
5591 | 1066 |
^ self class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:#usedInstVars |
1067 |
! |
|
1068 |
||
1069 |
class:cls protocol:cat includesRefsToVariable:variablesToHighLight askParserWith:querySelector |
|
9243 | 1070 |
"are there any methods in the protocol cat which reference/modify any inst/class variable in variablesToHighLight ?" |
1071 |
||
5591 | 1072 |
|anyVarNameAccessable| |
1073 |
||
1074 |
anyVarNameAccessable := cls allInstVarNames includesAny:variablesToHighLight. |
|
1075 |
anyVarNameAccessable ifFalse:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1076 |
anyVarNameAccessable := cls theNonMetaclass allClassVarNames includesAny:variablesToHighLight. |
5591 | 1077 |
]. |
1078 |
anyVarNameAccessable ifFalse:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1079 |
"/ no need to parse |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1080 |
^ false |
5591 | 1081 |
]. |
1082 |
||
1083 |
cls selectorsAndMethodsDo:[:sel :mthd | |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1084 |
|src parser usedVars| |
5591 | 1085 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1086 |
mthd category = cat ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1087 |
src := mthd source. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1088 |
src notNil ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1089 |
" |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1090 |
before doing a slow parse, quickly scan the |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1091 |
methods source for the variables name ... |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1092 |
" |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1093 |
(variablesToHighLight contains:[:varName | (src findString:varName) ~~ 0]) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1094 |
parser := Parser |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1095 |
parseMethod:src |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1096 |
in:cls |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1097 |
ignoreErrors:true |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1098 |
ignoreWarnings:true. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1099 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1100 |
usedVars := parser perform:querySelector. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1101 |
(usedVars includesAny:variablesToHighLight) |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1102 |
ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1103 |
^ true |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1104 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1105 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1106 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1107 |
] ifFalse:[ |
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
1108 |
Transcript showCR:'Oops - cannot access method source'. |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1109 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1110 |
] |
5591 | 1111 |
]. |
1112 |
^ false |
|
10185
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
1113 |
|
6428d75e11bb
comment/format in: #makeGenerator
Claus Gittinger <cg@exept.de>
parents:
10180
diff
changeset
|
1114 |
"Modified: / 06-07-2011 / 11:44:25 / cg" |
5591 | 1115 |
! |
1116 |
||
1117 |
classesToProcessForClasses:classes |
|
1118 |
^ self classesToProcessForClasses:classes withVisibility:methodVisibilityHolder value. |
|
1119 |
! |
|
1120 |
||
8961 | 1121 |
commonPostOpen |
1122 |
super commonPostOpen. |
|
1123 |
||
1124 |
self showPseudoProtocols ifTrue:[ |
|
1125 |
"/ revalidate my list, because it was only shown lazy |
|
1126 |
self invalidateList. |
|
1127 |
]. |
|
1128 |
! |
|
1129 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1130 |
flushMethodInfoForClassNamed:className selector:selector |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1131 |
MethodInfoCacheAccessLock critical:[ |
10552 | 1132 |
MethodInfoCache notNil ifTrue:[ |
1133 |
MethodInfoCache |
|
1134 |
removeKey:(className,'>>',selector) |
|
1135 |
ifAbsent:[] |
|
1136 |
]. |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1137 |
] |
10552 | 1138 |
|
1139 |
"Modified: / 08-08-2011 / 19:16:32 / cg" |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1140 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1141 |
|
5591 | 1142 |
listOfMethodCategories |
1143 |
|categoryList plainCategories classesProcessed leafClassesProcessed |
|
1144 |
generator nm variablesToHighlight classVarsToHighLight |
|
1145 |
itemsWithVarRefs itemsWithVarMods itemsWithExtensions itemsWithSuppressedExtensions |
|
7501 | 1146 |
itemsInChangeSet itemsInRemoteChangeSet |
9445 | 1147 |
itemsWithInstrumentedMethods itemsWithCalledMethods itemsWithUncalledMethods |
1148 |
itemsWithPartiallyCoveredMethods itemsWithFullyCoveredMethods |
|
8723 | 1149 |
packageFilterOnInput packageFilter nameListEntryForALL changeSet |
1150 |
emphasizedPlus emphasisForRef emphasisForMod |
|
9086 | 1151 |
numAll numObsolete numSuper numUncommented numDocumentation numLong numOverride |
10679 | 1152 |
numRedefine numExtension numMissingRequired numSubclassResponsibility |
1153 |
numAnnotated numFullyCovered numPartiallyCovered numUncovered numNotInstrumented |
|
9445 | 1154 |
showPseudoProtocols showCoverageInformation |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1155 |
addPseudoEntry addPseudoEntryWithColor countAll pseudoEntryColor userPreferences |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1156 |
startTime lazyPseudoProtocols| |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1157 |
|
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1158 |
userPreferences := UserPreferences current. |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1159 |
countAll := true. |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1160 |
startTime := Timestamp now. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1161 |
lazyPseudoProtocols := false. |
5591 | 1162 |
|
1163 |
generator := inGeneratorHolder value. |
|
1164 |
generator isNil ifTrue:[ ^ #() ]. |
|
1165 |
||
8982
ac5d734dfedd
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
8969
diff
changeset
|
1166 |
showPseudoProtocols := self showPseudoProtocols value |
9281
249720ced980
changed: #listOfMethodCategories
Stefan Vogel <sv@exept.de>
parents:
9243
diff
changeset
|
1167 |
and:[builder window notNil and:[builder window shown]]. |
10348
523f025190ff
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10297
diff
changeset
|
1168 |
showCoverageInformation := self showCoverageInformation value. |
8961 | 1169 |
|
5591 | 1170 |
nameListEntryForALL := self class nameListEntryForALL. |
1171 |
||
1172 |
packageFilterOnInput := self packageFilterOnInput value. |
|
1173 |
(packageFilterOnInput notNil and:[packageFilterOnInput includes:nameListEntryForALL]) ifTrue:[ |
|
5814 | 1174 |
packageFilterOnInput := nil |
5591 | 1175 |
]. |
1176 |
packageFilter := self packageFilter value. |
|
1177 |
(packageFilter notNil and:[packageFilter includes:nameListEntryForALL]) ifTrue:[ |
|
5814 | 1178 |
packageFilter := nil |
5591 | 1179 |
]. |
1180 |
||
1181 |
categoryList := Set new. |
|
1182 |
itemsWithVarRefs := Set new. |
|
1183 |
itemsWithVarMods := Set new. |
|
1184 |
itemsWithExtensions := Set new. |
|
1185 |
itemsWithSuppressedExtensions := Set new. |
|
1186 |
itemsInChangeSet := Set new. |
|
7501 | 1187 |
itemsInRemoteChangeSet := Set new. |
9445 | 1188 |
|
1189 |
itemsWithInstrumentedMethods := Set new. |
|
1190 |
itemsWithCalledMethods := Set new. |
|
1191 |
itemsWithUncalledMethods := Set new. |
|
1192 |
itemsWithPartiallyCoveredMethods := Set new. |
|
1193 |
itemsWithFullyCoveredMethods := Set new. |
|
1194 |
||
5591 | 1195 |
plainCategories := Set new. |
1196 |
classesProcessed := IdentitySet new. |
|
1197 |
leafClassesProcessed := IdentitySet new. |
|
1198 |
variablesToHighlight := variableFilter value. |
|
1199 |
classVarsToHighLight := filterClassVars value. |
|
8867 | 1200 |
numObsolete := numSuper := numUncommented := numDocumentation := numLong := 0. |
9086 | 1201 |
numRedefine := numOverride := numExtension := numMissingRequired := numSubclassResponsibility := 0. |
10360 | 1202 |
numNotInstrumented := numFullyCovered := numPartiallyCovered := numUncovered := 0. |
10679 | 1203 |
numAnnotated := 0. |
5591 | 1204 |
|
1205 |
generator do:[:clsIn :catIn | |
|
5814 | 1206 |
|emptyProtocols clsName doHighLight doHighLightRed suppress| |
5591 | 1207 |
|
5814 | 1208 |
leafClassesProcessed add:clsIn. |
1209 |
(self classesToProcessForClasses:(Array with:clsIn)) do:[:cls | |
|
1210 |
|cats| |
|
5591 | 1211 |
|
5814 | 1212 |
classesProcessed add:cls. |
5591 | 1213 |
|
5814 | 1214 |
cls ~~ clsIn ifTrue:[ |
1215 |
cats := cls categories |
|
1216 |
] ifFalse:[ |
|
1217 |
cats := Array with:catIn. |
|
1218 |
]. |
|
1219 |
cats do:[:cat | |
|
1220 |
cat notNil ifTrue:[ |
|
1221 |
suppress := packageFilterOnInput notNil |
|
1222 |
and:[ (self class:cls protocol:cat includesMethodsInAnyPackage:packageFilterOnInput) not ]. |
|
5591 | 1223 |
|
5814 | 1224 |
suppress ifFalse:[ |
8723 | 1225 |
variablesToHighlight notEmptyOrNil ifTrue:[ |
5814 | 1226 |
(itemsWithVarRefs includes:cat) ifFalse:[ |
1227 |
classVarsToHighLight ifTrue:[ |
|
1228 |
doHighLight := self class:cls protocol:cat includesRefsToClassVariable:variablesToHighlight. |
|
1229 |
doHighLight ifTrue:[ |
|
1230 |
doHighLightRed := self class:cls protocol:cat includesModsOfClassVariable:variablesToHighlight. |
|
1231 |
]. |
|
1232 |
] ifFalse:[ |
|
1233 |
doHighLight := self class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighlight. |
|
1234 |
doHighLight ifTrue:[ |
|
1235 |
doHighLightRed := self class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighlight. |
|
1236 |
]. |
|
1237 |
]. |
|
1238 |
doHighLight ifTrue:[ |
|
1239 |
itemsWithVarRefs add:cat. |
|
1240 |
doHighLightRed ifTrue:[ |
|
1241 |
itemsWithVarMods add:cat. |
|
1242 |
]. |
|
1243 |
] |
|
1244 |
] |
|
9086 | 1245 |
]. |
1246 |
||
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1247 |
(showPseudoProtocols value) ifTrue:[ |
8742 | 1248 |
cls selectorsAndMethodsDo:[:sel :mthd | |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1249 |
|info| |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1250 |
|
8742 | 1251 |
mthd category = cat ifTrue:[ |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1252 |
info := self methodInfoFor:mthd in:cls selector:sel lazy:lazyPseudoProtocols. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1253 |
info notNil ifTrue:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1254 |
info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1255 |
info sendsSuper ifTrue:[ numSuper := numSuper + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1256 |
info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1257 |
info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1258 |
info isLongMethod ifTrue:[ numLong := numLong + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1259 |
info isExtensionMethod ifTrue:[ numExtension := numExtension + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1260 |
info isOverride ifTrue:[ numOverride := numOverride + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1261 |
info isRedefine ifTrue:[ numRedefine := numRedefine + 1 ]. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1262 |
info isSubclassResponsibility ifTrue:[ numSubclassResponsibility := numSubclassResponsibility + 1]. |
10679 | 1263 |
info isAnnotated ifTrue:[ numAnnotated := numAnnotated + 1]. |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1264 |
] |
10585
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1265 |
]. |
10687
b10e596f7d9b
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10679
diff
changeset
|
1266 |
(Timestamp now deltaFrom:startTime) > 5 seconds ifTrue:[ |
10585
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1267 |
lazyPseudoProtocols := true. |
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1268 |
"/ because we already computed for 10seconds, more and more will be found in |
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1269 |
"/ the cache, and eventually, pseudo protocols will be shown anyway |
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1270 |
masterApplication showInfo:'suppress pseudo protocols - parsing took too long'. |
a7770aa6255d
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10552
diff
changeset
|
1271 |
]. |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1272 |
]. |
8723 | 1273 |
]. |
1274 |
||
5814 | 1275 |
categoryList add:cat. |
5591 | 1276 |
|
5814 | 1277 |
AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
1278 |
clsName := cls name. |
|
1279 |
emptyProtocols := AdditionalEmptyCategoriesPerClassName at:clsName ifAbsent:nil. |
|
1280 |
emptyProtocols size > 0 ifTrue:[ |
|
1281 |
emptyProtocols remove:cat ifAbsent:nil. |
|
1282 |
]. |
|
1283 |
emptyProtocols size == 0 ifTrue:[ |
|
1284 |
AdditionalEmptyCategoriesPerClassName removeKey:clsName ifAbsent:nil |
|
1285 |
]. |
|
1286 |
]. |
|
1287 |
] |
|
1288 |
] |
|
1289 |
] |
|
1290 |
] |
|
1291 |
]. |
|
1292 |
||
9086 | 1293 |
numAll := 0. |
1294 |
||
5814 | 1295 |
changeSet := ChangeSet current. |
5591 | 1296 |
|
1297 |
classesProcessed do:[:eachClass | |
|
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1298 |
|classPackage required| |
5591 | 1299 |
|
5814 | 1300 |
classPackage := eachClass package. |
6706 | 1301 |
eachClass methodDictionary keysAndValuesDo:[:mSelector :mthd | |
5814 | 1302 |
|mPackage mCategory| |
5591 | 1303 |
|
5814 | 1304 |
mPackage := mthd package. |
1305 |
mCategory := mthd category. |
|
5591 | 1306 |
|
5814 | 1307 |
#fixme. |
1308 |
mPackage = classPackage ifTrue:[ |
|
1309 |
mPackage ~~ classPackage ifTrue:[ |
|
1310 |
mthd setPackage:(mPackage := mPackage string asSymbol). |
|
1311 |
] |
|
1312 |
]. |
|
1313 |
mPackage ~~ classPackage ifTrue:[ |
|
10659
4157482b811c
Fix in listOfMethodCategories for methods with nil category (non-smalltalk methods)
vrany
parents:
10652
diff
changeset
|
1314 |
(mCategory notNil and:[mPackage ~= PackageId noProjectID]) ifTrue:[ |
6877 | 1315 |
itemsWithExtensions add:mCategory. |
5591 | 1316 |
|
6877 | 1317 |
(packageFilter notNil |
1318 |
and:[ (packageFilter includes:mPackage) not]) |
|
1319 |
ifTrue:[ |
|
1320 |
itemsWithSuppressedExtensions add:mCategory. |
|
1321 |
]. |
|
5814 | 1322 |
]. |
1323 |
]. |
|
9445 | 1324 |
|
1325 |
showCoverageInformation ifTrue:[ |
|
1326 |
mthd isInstrumented ifTrue:[ |
|
9449
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1327 |
mthd category = 'documentation' ifFalse:[ |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1328 |
itemsWithInstrumentedMethods add:mCategory. |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1329 |
mthd hasBeenCalled ifTrue:[ |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1330 |
itemsWithCalledMethods add:mCategory. |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1331 |
mthd haveAllBlocksBeenExecuted ifTrue:[ |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1332 |
itemsWithFullyCoveredMethods add:mCategory. |
10356 | 1333 |
numFullyCovered := numFullyCovered + 1. |
9449
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1334 |
] ifFalse:[ |
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1335 |
itemsWithPartiallyCoveredMethods add:mCategory. |
10356 | 1336 |
numPartiallyCovered := numPartiallyCovered + 1. |
9449
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1337 |
]. |
9445 | 1338 |
] ifFalse:[ |
9449
db3be2a21d55
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9445
diff
changeset
|
1339 |
itemsWithUncalledMethods add:mCategory. |
10356 | 1340 |
numUncovered := numUncovered + 1. |
9445 | 1341 |
]. |
1342 |
]. |
|
10360 | 1343 |
] ifFalse:[ |
1344 |
numNotInstrumented := numNotInstrumented + 1. |
|
9445 | 1345 |
]. |
1346 |
] ifFalse:[ |
|
1347 |
(changeSet includesChangeForClass:eachClass selector:mSelector) ifTrue:[ |
|
1348 |
itemsInChangeSet add:mCategory. |
|
1349 |
]. |
|
1350 |
(SmallTeam notNil and:[ SmallTeam includesChangeForClass:eachClass selector:mSelector] ) ifTrue:[ |
|
1351 |
itemsInRemoteChangeSet add:mCategory. |
|
1352 |
]. |
|
7501 | 1353 |
]. |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1354 |
]. |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1355 |
(lazyPseudoProtocols not and:[showPseudoProtocols value]) ifTrue:[ |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1356 |
"/ see if there is a subclassResponsibility in a superclass |
9729
0d29623f7e10
CodeGeneratorTool->SmalltalkCodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents:
9465
diff
changeset
|
1357 |
required := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:eachClass. |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1358 |
numMissingRequired := numMissingRequired + required size. |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1359 |
]. |
9086 | 1360 |
numAll := numAll + (eachClass methodDictionary size) |
5591 | 1361 |
]. |
1362 |
||
1363 |
categoryList := categoryList asOrderedCollection. |
|
1364 |
self rawProtocolList removeAll. |
|
1365 |
rawProtocolList addAll:categoryList. |
|
1366 |
||
6698 | 1367 |
emphasizedPlus := (self colorizeForDifferentPackage:' [ + ]'). |
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1368 |
emphasisForRef := userPreferences emphasisForReadVariable. |
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1369 |
emphasisForMod := userPreferences emphasisForWrittenVariable. |
6698 | 1370 |
|
6704 | 1371 |
(itemsInChangeSet notEmpty |
7501 | 1372 |
or:[itemsInRemoteChangeSet notEmpty |
6704 | 1373 |
or:[itemsWithExtensions notEmpty |
9445 | 1374 |
or:[itemsWithVarRefs notEmpty |
1375 |
or:[itemsWithInstrumentedMethods notEmpty |
|
1376 |
or:[itemsWithCalledMethods notEmpty |
|
1377 |
or:[itemsWithUncalledMethods notEmpty |
|
1378 |
or:[itemsWithFullyCoveredMethods notEmpty |
|
1379 |
or:[itemsWithPartiallyCoveredMethods notEmpty |
|
1380 |
]]]]]]]]) ifTrue:[ |
|
6698 | 1381 |
rawProtocolList keysAndValuesDo:[:idx :cat | |
9445 | 1382 |
|item inChangeSet inRemoteChangeSet hasExtensions hasVarRef hasVarMod |
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1383 |
clr| |
5591 | 1384 |
|
6698 | 1385 |
item := cat. |
7501 | 1386 |
|
9445 | 1387 |
inChangeSet := false. |
6701 | 1388 |
|
9445 | 1389 |
showCoverageInformation ifTrue:[ |
1390 |
(itemsWithInstrumentedMethods includes:cat) ifTrue:[ |
|
1391 |
(itemsWithCalledMethods includes:cat) ifTrue:[ |
|
1392 |
(itemsWithPartiallyCoveredMethods includes:cat) ifTrue:[ |
|
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1393 |
clr := (userPreferences colorForInstrumentedPartiallyCoveredCode). |
9445 | 1394 |
] ifFalse:[ |
1395 |
(itemsWithUncalledMethods includes:cat) ifTrue:[ |
|
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1396 |
clr := (userPreferences colorForInstrumentedPartiallyCoveredCode). |
9445 | 1397 |
] ifFalse:[ |
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1398 |
clr := (userPreferences colorForInstrumentedFullyCoveredCode). |
10356 | 1399 |
] |
9445 | 1400 |
] |
1401 |
] ifFalse:[ |
|
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1402 |
clr := (userPreferences colorForInstrumentedNeverCalledCode). |
9445 | 1403 |
]. |
9452
750e55a24967
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9449
diff
changeset
|
1404 |
item := self colorize:cat with:(#color -> clr). |
9445 | 1405 |
] |
1406 |
] ifFalse:[ |
|
1407 |
inChangeSet := itemsInChangeSet includes:cat. |
|
1408 |
inChangeSet ifTrue:[ |
|
1409 |
item := self colorizeForChangedCode:cat. |
|
1410 |
]. |
|
1411 |
||
1412 |
inRemoteChangeSet := itemsInRemoteChangeSet includes:cat. |
|
1413 |
inRemoteChangeSet ifTrue:[ |
|
1414 |
item := (self colorizeForChangedCodeInSmallTeam:'!! '),item. |
|
1415 |
]. |
|
7501 | 1416 |
]. |
1417 |
||
6698 | 1418 |
hasVarRef := itemsWithVarRefs includes:cat. |
1419 |
hasVarRef ifTrue:[ |
|
1420 |
hasVarMod := itemsWithVarMods includes:cat. |
|
6701 | 1421 |
item := item asText |
10180
d765319efec9
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9729
diff
changeset
|
1422 |
emphasisAllAdd:(hasVarMod ifTrue:[emphasisForMod] ifFalse:[emphasisForRef]). |
6701 | 1423 |
]. |
5591 | 1424 |
|
6701 | 1425 |
hasExtensions := itemsWithExtensions includes:cat. |
1426 |
hasExtensions ifTrue:[ |
|
1427 |
item := item , emphasizedPlus. |
|
6698 | 1428 |
]. |
6877 | 1429 |
inChangeSet ifTrue:[ |
7056 | 1430 |
item := item , self class markForBeingInChangeList. |
6877 | 1431 |
]. |
6698 | 1432 |
categoryList at:idx put:item. |
1433 |
] |
|
5591 | 1434 |
]. |
1435 |
||
1436 |
classesProcessed size > 0 ifTrue:[ |
|
5814 | 1437 |
"/ those are simulated - in ST/X, empty categories do not |
1438 |
"/ really exist; however, during browsing, it makes sense. |
|
1439 |
AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
|
1440 |
AdditionalEmptyCategoriesPerClassName keysAndValuesDo:[:clsName :protocols | |
|
1441 |
(classesProcessed contains:[:cls | cls name = clsName]) ifTrue:[ |
|
1442 |
categoryList addAll:protocols. |
|
1443 |
rawProtocolList addAll:protocols. |
|
1444 |
] |
|
1445 |
] |
|
1446 |
]. |
|
5591 | 1447 |
]. |
1448 |
||
1449 |
self makeIndependent. |
|
1450 |
classes := classesProcessed. |
|
1451 |
leafClasses := leafClassesProcessed. |
|
1452 |
self makeDependent. |
|
1453 |
||
1454 |
rawProtocolList sortWith:categoryList. |
|
1455 |
categoryList size == 1 ifTrue:[ |
|
5814 | 1456 |
nm := categoryList first string. |
1457 |
classes size == 1 ifTrue:[ |
|
1458 |
nm := classes first name , '-' , nm |
|
1459 |
]. |
|
1460 |
self protocolLabelHolder value:nm |
|
5591 | 1461 |
]. |
9086 | 1462 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1463 |
pseudoEntryColor := self class pseudoEntryForegroundColor. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1464 |
|
5591 | 1465 |
categoryList notEmpty ifTrue:[ |
5814 | 1466 |
noAllItem value ~~ true ifTrue:[ |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1467 |
|allName| |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1468 |
|
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1469 |
countAll ifTrue:[ |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1470 |
allName := self class nameListEntryForALLWithCount bindWith:numAll. |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1471 |
] ifFalse:[ |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1472 |
allName := nameListEntryForALL. |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1473 |
]. |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1474 |
categoryList addFirst:(allName allItalic colorizeAllWith:pseudoEntryColor). |
5814 | 1475 |
rawProtocolList addFirst:nameListEntryForALL. |
8694 | 1476 |
]. |
9042
90d6e1c9ad5b
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9039
diff
changeset
|
1477 |
]. |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1478 |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1479 |
(lazyPseudoProtocols not and:[showPseudoProtocols value]) ifTrue:[ |
10356 | 1480 |
addPseudoEntryWithColor := [:s :n :clr | |
9086 | 1481 |
n > 0 ifTrue:[ |
9126
9ad8ea73b635
comment/format in: #doDropContext:
Claus Gittinger <cg@exept.de>
parents:
9122
diff
changeset
|
1482 |
categoryList |
10356 | 1483 |
add:((s bindWith:n) allItalic colorizeAllWith:clr). |
9086 | 1484 |
rawProtocolList add:s. |
1485 |
]. |
|
1486 |
]. |
|
1487 |
||
10356 | 1488 |
addPseudoEntry := [:s :n | addPseudoEntryWithColor value:s value:n value:pseudoEntryColor]. |
1489 |
||
9086 | 1490 |
addPseudoEntry value:self class nameListEntryForSuperSend value:numSuper. |
1491 |
addPseudoEntry value:self class nameListEntryForRedefined value:numRedefine. |
|
1492 |
addPseudoEntry value:self class nameListEntryForDocumentation value:numDocumentation. |
|
1493 |
addPseudoEntry value:self class nameListEntryForUncommented value:numUncommented. |
|
1494 |
addPseudoEntry value:self class nameListEntryForLong value:numLong. |
|
1495 |
addPseudoEntry value:self class nameListEntryForObsolete value:numObsolete. |
|
1496 |
addPseudoEntry value:self class nameListEntryForExtensions value:numExtension. |
|
1497 |
addPseudoEntry value:self class nameListEntryForOverride value:numOverride. |
|
1498 |
addPseudoEntry value:self class nameListEntryForMustBeRedefinedInSubclass value:numSubclassResponsibility. |
|
10679 | 1499 |
addPseudoEntry value:self class nameListEntryForAnnotated value:numAnnotated. |
10356 | 1500 |
showCoverageInformation ifTrue:[ |
1501 |
addPseudoEntryWithColor value:self class nameListEntryForPartiallyCovered value:numPartiallyCovered value:userPreferences colorForInstrumentedPartiallyCoveredCode. |
|
1502 |
addPseudoEntryWithColor value:self class nameListEntryForUncovered value:numUncovered value:userPreferences colorForInstrumentedNeverCalledCode. |
|
1503 |
addPseudoEntryWithColor value:self class nameListEntryForFullyCovered value:numFullyCovered value:userPreferences colorForInstrumentedFullyCoveredCode. |
|
10360 | 1504 |
addPseudoEntry value:self class nameListEntryForNotInstrumented value:numNotInstrumented. |
10356 | 1505 |
]. |
9086 | 1506 |
|
1507 |
"/ I think red is too much of an alert color (and we get more of them as we think...) |
|
1508 |
"/ numMissingRequired > 0 ifTrue:[ |
|
1509 |
"/ categoryList add:((self class nameListEntryForRequired bindWith:numMissingRequired) allItalic "colorizeAllWith:Color red"). |
|
1510 |
"/ rawProtocolList add:self class nameListEntryForRequired. |
|
1511 |
"/ ]. |
|
1512 |
addPseudoEntry value:self class nameListEntryForRequired value:numMissingRequired. |
|
5591 | 1513 |
]. |
1514 |
^ categoryList |
|
1515 |
||
6877 | 1516 |
"Created: / 05-02-2000 / 13:42:11 / cg" |
10659
4157482b811c
Fix in listOfMethodCategories for methods with nil category (non-smalltalk methods)
vrany
parents:
10652
diff
changeset
|
1517 |
"Modified: / 31-08-2011 / 16:26:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10687
b10e596f7d9b
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10679
diff
changeset
|
1518 |
"Modified: / 08-09-2011 / 04:56:47 / cg" |
5591 | 1519 |
! |
1520 |
||
1521 |
makeDependent |
|
7501 | 1522 |
Smalltalk addDependent:self. |
1523 |
"/ ChangeSet addDependent:self. |
|
1524 |
||
1525 |
"Modified: / 10-11-2006 / 17:57:13 / cg" |
|
5591 | 1526 |
! |
1527 |
||
1528 |
makeIndependent |
|
1529 |
Smalltalk removeDependent:self. |
|
8219 | 1530 |
"/ ChangeSet removeDependent:self. |
5591 | 1531 |
! |
1532 |
||
1533 |
release |
|
1534 |
super release. |
|
1535 |
||
1536 |
filterClassVars removeDependent:self. |
|
1537 |
methodVisibilityHolder removeDependent:self. |
|
1538 |
noAllItem removeDependent:self. |
|
1539 |
packageFilterOnInput removeDependent:self. |
|
1540 |
selectedProtocolIndices removeDependent:self. |
|
1541 |
variableFilter removeDependent:self. |
|
1542 |
! |
|
1543 |
||
1544 |
updateList |
|
1545 |
|prevClasses prevSelection newSelection newList oldList sameContents selectedProtocolsHolder rawList| |
|
1546 |
||
1547 |
selectedProtocolsHolder := self selectedProtocols. |
|
1548 |
||
10297
69e003b25399
comment/format in: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10250
diff
changeset
|
1549 |
prevClasses := classes isNil ifTrue:[ #() ] ifFalse:[ classes copy ]. |
5591 | 1550 |
oldList := self protocolList value copy. |
1551 |
newList := self listOfMethodCategories. |
|
1552 |
||
1553 |
"/ oldListSize := self browserNameList size. |
|
1554 |
"/ newListSize := newList size. |
|
1555 |
self selectedProtocolIndices removeDependent:self. |
|
1556 |
sameContents := self updateListFor:newList. |
|
1557 |
self selectedProtocolIndices addDependent:self. |
|
1558 |
sameContents ifFalse:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1559 |
prevSelection := lastSelectedProtocols ? (selectedProtocolsHolder value) ? #(). |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1560 |
"/ prevSelection := selectedProtocolsHolder value ? lastSelectedProtocols ? #(). |
5591 | 1561 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1562 |
rawList := self rawProtocolList value. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1563 |
newSelection := prevSelection select:[:item | rawList includes:item string]. |
5591 | 1564 |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1565 |
newSelection size > 0 ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1566 |
"/ force change (for dependents) |
5591 | 1567 |
"/ selectedProtocolsHolder value:nil. |
1568 |
"/ selectedProtocolsHolder value:newSelection. |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1569 |
selectedProtocolsHolder setValue:newSelection. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1570 |
selectedProtocolsHolder changed:#value. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1571 |
] ifFalse:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1572 |
prevSelection := selectedProtocolsHolder value. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1573 |
selectedProtocolsHolder value:nil. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1574 |
]. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1575 |
(prevSelection size > 0 or:[newSelection size > 0]) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1576 |
self enqueueDelayedUpdateOutputGenerator. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1577 |
"/ self updateOutputGenerator. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1578 |
]. |
5591 | 1579 |
|
1580 |
"/ prevSelection notNil ifTrue:[ |
|
1581 |
"/ lastSelectedProtocols := prevSelection. |
|
1582 |
"/ ]. |
|
1583 |
] ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1584 |
"/ same list - but classes might have changed |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1585 |
"/ that is the case, if the class selection has been changed, |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1586 |
"/ to another class which has the same categories. |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1587 |
(prevClasses size ~= classes size |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1588 |
or:[prevClasses asOrderedCollection ~= (classes ? #()) asOrderedCollection ]) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1589 |
(newList size > 0 or:[oldList size > 0]) ifTrue:[ |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1590 |
self updateOutputGenerator |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1591 |
] |
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1592 |
] ifFalse:[ |
5591 | 1593 |
"/ self protocolList value:newList. |
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1594 |
] |
5591 | 1595 |
]. |
1596 |
listValid := true. |
|
1597 |
||
10297
69e003b25399
comment/format in: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
10250
diff
changeset
|
1598 |
"Created: / 05-02-2000 / 13:42:11 / cg" |
10551 | 1599 |
"Modified: / 08-08-2011 / 18:49:31 / cg" |
5591 | 1600 |
! ! |
1601 |
||
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1602 |
!MethodCategoryList methodsFor:'private-info'! |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1603 |
|
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1604 |
methodInfoFor:aMethod in:mclass selector:selector |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1605 |
^ self methodInfoFor:aMethod in:mclass selector:selector lazy:false |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1606 |
|
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1607 |
"Modified: / 08-08-2011 / 18:21:03 / cg" |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1608 |
! |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1609 |
|
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1610 |
methodInfoFor:aMethod in:mclass selector:selector lazy:lazy |
10652
fb29722569ac
changed: #methodInfoFor:in:selector:lazy:
Claus Gittinger <cg@exept.de>
parents:
10585
diff
changeset
|
1611 |
|info isDocumentationMethod isVersionMethod def methodsPackage| |
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1612 |
|
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1613 |
"/ the first at:ifAbsent: is aktually not needed - it is here to |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1614 |
"/ reduce the average blocking time, and to allow for debugging the info generating |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1615 |
"/ code without deadlock |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1616 |
MethodInfoCacheAccessLock critical:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1617 |
info := MethodInfoCache at:(mclass name,'>>',selector) ifAbsent:nil. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1618 |
]. |
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1619 |
info isNil ifTrue:[ |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1620 |
lazy ifTrue:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1621 |
"/ TODO: start a background thread to compute the stuff below, |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1622 |
"/ notify me to update the list, when all the lazy info is avail... |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1623 |
] ifFalse:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1624 |
true "aMethod mclass language isSmalltalk" ifTrue:[ |
10652
fb29722569ac
changed: #methodInfoFor:in:selector:lazy:
Claus Gittinger <cg@exept.de>
parents:
10585
diff
changeset
|
1625 |
methodsPackage := aMethod package. |
fb29722569ac
changed: #methodInfoFor:in:selector:lazy:
Claus Gittinger <cg@exept.de>
parents:
10585
diff
changeset
|
1626 |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1627 |
isVersionMethod := aMethod isVersionMethod. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1628 |
isDocumentationMethod := isVersionMethod not and:[aMethod isDocumentationMethod]. |
10679 | 1629 |
|
1630 |
info := CachedMethodInfo new. |
|
1631 |
info isObsolete:(aMethod isObsolete). "/ (aMethod isObsolete). |
|
1632 |
info sendsSuper:(aMethod superMessages notEmptyOrNil). "/ (aMethod superMessages notEmptyOrNil). |
|
1633 |
info isUncommented:(self methodIsMarkedAsUncommented:aMethod). "/ (self methodIsMarkedAsUncommented:aMethod). |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1634 |
info isDocumentationMethod:isDocumentationMethod. |
10679 | 1635 |
info isLongMethod:(self methodIsMarkedAsLong:aMethod). "/ (self methodIsMarkedAsLong:aMethod). |
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1636 |
|
10652
fb29722569ac
changed: #methodInfoFor:in:selector:lazy:
Claus Gittinger <cg@exept.de>
parents:
10585
diff
changeset
|
1637 |
methodsPackage ~= mclass package ifTrue:[ |
fb29722569ac
changed: #methodInfoFor:in:selector:lazy:
Claus Gittinger <cg@exept.de>
parents:
10585
diff
changeset
|
1638 |
methodsPackage ~= #'__NoProject__' ifTrue:[ |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1639 |
info isExtensionMethod:true. |
10679 | 1640 |
info isOverride:( |
1641 |
((def := methodsPackage asPackageId projectDefinitionClass) notNil |
|
1642 |
and:[ (def methodOverwrittenBy:aMethod ) notNil ]) |
|
1643 |
) |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1644 |
] |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1645 |
] ifFalse:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1646 |
info isExtensionMethod:false. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1647 |
info isOverride:false. |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1648 |
]. |
10679 | 1649 |
info isRedefine:( |
1650 |
( isVersionMethod not |
|
1651 |
and:[ isDocumentationMethod not |
|
1652 |
and:[ mclass superclass notNil |
|
1653 |
and:[ (mclass superclass whichClassIncludesSelector:selector ) notNil ]]]) |
|
1654 |
). |
|
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1655 |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1656 |
info isSubclassResponsibility:( aMethod sends:#subclassResponsibility or:#subclassResponsibility: ). |
10679 | 1657 |
info isAnnotated:(aMethod hasAnnotation). |
9086 | 1658 |
|
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1659 |
MethodInfoCacheAccessLock critical:[ |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1660 |
MethodInfoCache at:(mclass name,'>>',selector) put:info |
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1661 |
]. |
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1662 |
]. |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1663 |
]. |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1664 |
]. |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1665 |
^ info |
10548
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1666 |
|
0797847f51de
for now: skip pseudo categories, if too slow.
Claus Gittinger <cg@exept.de>
parents:
10368
diff
changeset
|
1667 |
"Created: / 08-08-2011 / 18:18:14 / cg" |
8990
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1668 |
! |
437c2f8eb9a5
changed: #methodInfoFor:in:selector:
Claus Gittinger <cg@exept.de>
parents:
8989
diff
changeset
|
1669 |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1670 |
methodIsMarkedAsLong:aMethod |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1671 |
"if true, it will be also categorized under the pseudo category 'long'" |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1672 |
|
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1673 |
|src ast linesWithCode visitor| |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1674 |
|
9122 | 1675 |
src := aMethod source ? ''. |
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1676 |
src asCollectionOfLines size < UserPreferences current numberOfLinesForLongMethod "~~30" ifTrue:[^ false]. |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1677 |
|
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1678 |
"/ ok, it is long; |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1679 |
"/ but do not blame the user for writing documentation (dont count comments), |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1680 |
"/ or using literal arrays |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1681 |
RBParser notNil ifTrue:[ |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1682 |
ast := RBParser parseMethod:src. |
8992 | 1683 |
ast notNil ifTrue:[ |
1684 |
visitor := RBProgramNodeVisitor new. |
|
1685 |
visitor pluggableNodeAction: |
|
1686 |
[:eachNode | |
|
1687 |
|lno| |
|
1688 |
lno := eachNode lineNumber. |
|
1689 |
lno notNil ifTrue:[ linesWithCode add:lno ]. |
|
1690 |
]. |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1691 |
|
8992 | 1692 |
linesWithCode := Set new. |
1693 |
ast acceptVisitor:visitor. |
|
1694 |
linesWithCode size < UserPreferences current numberOfLinesForLongMethod "~~30" ifTrue:[^ false]. |
|
1695 |
]. |
|
8989
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1696 |
]. |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1697 |
^ true. |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1698 |
! |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1699 |
|
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1700 |
methodIsMarkedAsUncommented:aMethod |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1701 |
"if true, it will be also categorized under the pseudo category 'undocumented'" |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1702 |
|
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1703 |
^ aMethod comment isEmptyOrNil |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1704 |
and:[aMethod isVersionMethod not] |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1705 |
! ! |
b0d23a8ca15b
dont count comments when judging a method as being \"long\"
Claus Gittinger <cg@exept.de>
parents:
8982
diff
changeset
|
1706 |
|
5591 | 1707 |
!MethodCategoryList methodsFor:'special'! |
1708 |
||
1709 |
addAdditionalProtocol:aProtocol forClass:aClass |
|
1710 |
|categories| |
|
1711 |
||
1712 |
"/ those are simulated - in ST/X, empty categories do not |
|
1713 |
"/ really exist; however, during browsing, it makes sense. |
|
1714 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1715 |
AdditionalEmptyCategoriesPerClassName := Dictionary new. |
5591 | 1716 |
]. |
1717 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1718 |
categories isNil ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1719 |
categories := Set new. |
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1720 |
AdditionalEmptyCategoriesPerClassName at:aClass name put:categories. |
5591 | 1721 |
]. |
1722 |
categories add:aProtocol. |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1723 |
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
|
1724 |
Smalltalk changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol). "/ not really ... to force update |
5591 | 1725 |
! |
1726 |
||
1727 |
additionalProtocolForClass:aClass |
|
1728 |
"/ those are simulated - in ST/X, empty categories do not |
|
1729 |
"/ really exist; however, during browsing, it makes sense. |
|
1730 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ ^ #() ]. |
|
1731 |
^ AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:[ #() ]. |
|
1732 |
! |
|
1733 |
||
1734 |
clearLastSelectedProtocol |
|
1735 |
lastSelectedProtocols := nil |
|
1736 |
! |
|
1737 |
||
6342
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1738 |
lastSelectedProtocols |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1739 |
^ lastSelectedProtocols |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1740 |
! |
698b45d51014
new method-category initial offer
Claus Gittinger <cg@exept.de>
parents:
5950
diff
changeset
|
1741 |
|
5591 | 1742 |
removeAdditionalProtocol:aListOfProtocols forClass:aClass |
1743 |
|categories| |
|
1744 |
||
1745 |
"/ those are simulated - in ST/X, empty categories do not |
|
1746 |
"/ really exist; however, during browsing, it makes sense. |
|
1747 |
||
1748 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
|
1749 |
||
1750 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1751 |
categories isNil ifTrue:[^ self]. |
|
1752 |
categories removeAllFoundIn:aListOfProtocols. |
|
1753 |
categories isEmpty ifTrue:[ |
|
6664
50eb2e92aaed
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6492
diff
changeset
|
1754 |
AdditionalEmptyCategoriesPerClassName removeKey:aClass name. |
5591 | 1755 |
]. |
1756 |
||
1757 |
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
|
1758 |
Smalltalk changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols). "/ not really ... to force update |
5591 | 1759 |
! |
1760 |
||
1761 |
removeAllAdditionalProtocol |
|
1762 |
"/ those are simulated - in ST/X, empty categories do not |
|
1763 |
"/ really exist; however, during browsing, it makes sense. |
|
1764 |
AdditionalEmptyCategoriesPerClassName := nil |
|
1765 |
||
1766 |
||
1767 |
! |
|
1768 |
||
1769 |
removeAllAdditionalProtocolForClass:aClass |
|
1770 |
"/ those are simulated - in ST/X, empty categories do not |
|
1771 |
"/ really exist; however, during browsing, it makes sense. |
|
1772 |
AdditionalEmptyCategoriesPerClassName notNil ifTrue:[ |
|
9128
26fb27aa3d40
changed: #listOfMethodCategories
Claus Gittinger <cg@exept.de>
parents:
9126
diff
changeset
|
1773 |
AdditionalEmptyCategoriesPerClassName removeKey:aClass name ifAbsent:nil |
5591 | 1774 |
]. |
1775 |
||
1776 |
||
1777 |
! |
|
1778 |
||
1779 |
renameAdditionalProtocol:oldName to:newName forClass:aClass |
|
1780 |
|categories| |
|
1781 |
||
1782 |
"/ those are simulated - in ST/X, empty categories do not |
|
1783 |
"/ really exist; however, during browsing, it makes sense. |
|
1784 |
||
1785 |
AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
|
1786 |
categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
|
1787 |
categories isNil ifTrue:[^ self]. |
|
1788 |
categories remove:oldName ifAbsent:nil. |
|
1789 |
categories add:newName. |
|
1790 |
||
1791 |
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
|
1792 |
Smalltalk changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName). "/ not really ... to force update |
5591 | 1793 |
! ! |
1794 |
||
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1795 |
!MethodCategoryList::CachedMethodInfo class methodsFor:'initialization'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1796 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1797 |
initialize |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1798 |
FlagObsolete := 1. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1799 |
FlagSendsSuper := 2. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1800 |
FlagIsUncommented := 4. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1801 |
FlagIsDocumentationMethod := 8. |
8867 | 1802 |
FlagIsLongMethod := 16. |
8931 | 1803 |
FlagIsExtension := 32. |
1804 |
FlagIsOverride := 64. |
|
8964 | 1805 |
FlagIsRedefine := 128. |
9086 | 1806 |
FlagIsSubclassResponsibility := 128. |
10250 | 1807 |
FlagIsTest := 256. |
10679 | 1808 |
FlagIsAnnotated := 512. |
10250 | 1809 |
|
1810 |
"Modified: / 08-03-2010 / 18:33:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10679 | 1811 |
"Modified: / 07-09-2011 / 10:04:30 / cg" |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1812 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1813 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1814 |
!MethodCategoryList::CachedMethodInfo class methodsFor:'instance creation'! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1815 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1816 |
new |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1817 |
^ self basicNew flags:0. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1818 |
! ! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1819 |
|
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1820 |
!MethodCategoryList::CachedMethodInfo methodsFor:'accessing'! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1821 |
|
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1822 |
flags:something |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1823 |
flags := something. |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1824 |
! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1825 |
|
10679 | 1826 |
isAnnotated |
1827 |
^ (flags ? 0) bitTest: FlagIsAnnotated |
|
1828 |
||
1829 |
"Created: / 07-09-2011 / 10:04:56 / cg" |
|
1830 |
! |
|
1831 |
||
1832 |
isAnnotated:aBoolean |
|
1833 |
flags := aBoolean |
|
1834 |
ifTrue:[ flags bitOr: FlagIsAnnotated ] |
|
1835 |
ifFalse:[ flags bitClear: FlagIsAnnotated] |
|
1836 |
||
1837 |
"Created: / 07-09-2011 / 10:04:48 / cg" |
|
1838 |
! |
|
1839 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1840 |
isDocumentationMethod |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1841 |
^ (flags ? 0) bitTest: FlagIsDocumentationMethod |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1842 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1843 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1844 |
isDocumentationMethod:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1845 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1846 |
ifTrue:[ flags bitOr: FlagIsDocumentationMethod ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1847 |
ifFalse:[ flags bitClear: FlagIsDocumentationMethod] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1848 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1849 |
|
8931 | 1850 |
isExtensionMethod |
1851 |
^ (flags ? 0) bitTest: FlagIsExtension |
|
1852 |
! |
|
1853 |
||
1854 |
isExtensionMethod:aBoolean |
|
1855 |
flags := aBoolean |
|
1856 |
ifTrue:[ flags bitOr: FlagIsExtension ] |
|
1857 |
ifFalse:[ flags bitClear: FlagIsExtension] |
|
1858 |
! |
|
1859 |
||
8867 | 1860 |
isLongMethod |
1861 |
^ (flags ? 0) bitTest: FlagIsLongMethod |
|
1862 |
! |
|
1863 |
||
1864 |
isLongMethod:aBoolean |
|
1865 |
flags := aBoolean |
|
1866 |
ifTrue:[ flags bitOr: FlagIsLongMethod ] |
|
1867 |
ifFalse:[ flags bitClear: FlagIsLongMethod] |
|
1868 |
! |
|
1869 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1870 |
isObsolete |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1871 |
^ (flags ? 0) bitTest: FlagObsolete |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1872 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1873 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1874 |
isObsolete:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1875 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1876 |
ifTrue:[ flags bitOr: FlagObsolete ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1877 |
ifFalse:[ flags bitClear: FlagObsolete] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1878 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1879 |
|
8931 | 1880 |
isOverride |
1881 |
^ (flags ? 0) bitTest: FlagIsOverride |
|
1882 |
! |
|
1883 |
||
1884 |
isOverride:aBoolean |
|
1885 |
flags := aBoolean |
|
1886 |
ifTrue:[ flags bitOr: FlagIsOverride ] |
|
1887 |
ifFalse:[ flags bitClear: FlagIsOverride] |
|
1888 |
! |
|
1889 |
||
8964 | 1890 |
isRedefine |
1891 |
^ (flags ? 0) bitTest: FlagIsRedefine |
|
1892 |
! |
|
1893 |
||
1894 |
isRedefine:aBoolean |
|
1895 |
flags := aBoolean |
|
1896 |
ifTrue:[ flags bitOr: FlagIsRedefine ] |
|
1897 |
ifFalse:[ flags bitClear: FlagIsRedefine] |
|
1898 |
! |
|
1899 |
||
9086 | 1900 |
isSubclassResponsibility |
1901 |
^ (flags ? 0) bitTest: FlagIsSubclassResponsibility |
|
1902 |
! |
|
1903 |
||
1904 |
isSubclassResponsibility:aBoolean |
|
1905 |
flags := aBoolean |
|
1906 |
ifTrue:[ flags bitOr: FlagIsSubclassResponsibility ] |
|
1907 |
ifFalse:[ flags bitClear: FlagIsSubclassResponsibility] |
|
1908 |
! |
|
1909 |
||
10250 | 1910 |
isTest |
1911 |
^ (flags ? 0) bitTest: FlagIsTest |
|
1912 |
||
1913 |
"Created: / 08-03-2010 / 18:41:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1914 |
! |
|
1915 |
||
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1916 |
isUncommented |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1917 |
^ (flags ? 0) bitTest: FlagIsUncommented |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1918 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1919 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1920 |
isUncommented:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1921 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1922 |
ifTrue:[ flags bitOr: FlagIsUncommented ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1923 |
ifFalse:[ flags bitClear: FlagIsUncommented] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1924 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1925 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1926 |
sendsSuper |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1927 |
^ (flags ? 0) bitTest: FlagSendsSuper |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1928 |
! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1929 |
|
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1930 |
sendsSuper:aBoolean |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1931 |
flags := aBoolean |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1932 |
ifTrue:[ flags bitOr: FlagSendsSuper ] |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1933 |
ifFalse:[ flags bitClear: FlagSendsSuper] |
8781
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1934 |
! ! |
385e3f19694a
cache the methodInfo - parsing for isUncommented/sendsSuper etc. is
Claus Gittinger <cg@exept.de>
parents:
8742
diff
changeset
|
1935 |
|
9043 | 1936 |
!MethodCategoryList::MissingMethod class methodsFor:'instance creation'! |
1937 |
||
1938 |
mclass:aClass selector:aSelector |
|
1939 |
^ self new mclass:aClass selector:aSelector |
|
1940 |
! ! |
|
1941 |
||
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1942 |
!MethodCategoryList::MissingMethod methodsFor:'accessing'! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1943 |
|
9043 | 1944 |
mclass |
1945 |
^ mclass |
|
1946 |
! |
|
1947 |
||
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1948 |
mclass:aClass |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1949 |
mclass := aClass |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1950 |
! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1951 |
|
9043 | 1952 |
mclass:aClass selector:aSelector |
1953 |
mclass := aClass. |
|
1954 |
selector := aSelector. |
|
1955 |
! |
|
1956 |
||
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1957 |
selector |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1958 |
^ selector |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1959 |
! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1960 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1961 |
selector:something |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1962 |
selector := something. |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1963 |
! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1964 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1965 |
source |
9729
0d29623f7e10
CodeGeneratorTool->SmalltalkCodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents:
9465
diff
changeset
|
1966 |
^ (SmalltalkCodeGeneratorTool basicNew |
9043 | 1967 |
codeFor_shouldImplementFor:selector inClass:mclass) |
1968 |
colorizeAllWith:Color red |
|
9729
0d29623f7e10
CodeGeneratorTool->SmalltalkCodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents:
9465
diff
changeset
|
1969 |
|
0d29623f7e10
CodeGeneratorTool->SmalltalkCodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents:
9465
diff
changeset
|
1970 |
"Modified: / 31-01-2011 / 18:29:17 / cg" |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1971 |
! ! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1972 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1973 |
!MethodCategoryList::MissingMethod methodsFor:'printing & storing'! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1974 |
|
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1975 |
printStringForBrowserWithSelector:selector inClass:aClass |
9043 | 1976 |
^ (selector,' (** missing required **)') colorizeAllWith:Color red |
9039
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1977 |
! ! |
c7c93f434394
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
8992
diff
changeset
|
1978 |
|
5591 | 1979 |
!MethodCategoryList class methodsFor:'documentation'! |
1980 |
||
10356 | 1981 |
version |
10720
82b4939aafc5
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10712
diff
changeset
|
1982 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.77 2011-09-23 18:56:37 cg Exp $' |
10356 | 1983 |
! |
1984 |
||
8848 | 1985 |
version_CVS |
10720
82b4939aafc5
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
10712
diff
changeset
|
1986 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.77 2011-09-23 18:56:37 cg Exp $' |
5591 | 1987 |
! ! |
8860
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1988 |
|
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1989 |
MethodCategoryList initialize! |
d8ce6a00a43f
use a global methodInfoCache
Claus Gittinger <cg@exept.de>
parents:
8848
diff
changeset
|
1990 |
MethodCategoryList::CachedMethodInfo initialize! |