author | Claus Gittinger <cg@exept.de> |
Fri, 19 Jan 2018 23:42:23 +0100 | |
changeset 17952 | b78dac4d2a4c |
parent 14024 | 877fd52ae84b |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
10388 | 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 |
" |
|
12 |
"{ Package: 'stx:libtool' }" |
|
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
BrowserList subclass:#MethodList |
|
12554 | 17 |
instanceVariableNames:'classes selectedMethodNameIndices methodList lastSelectedMethods |
18 |
browserNameList variableFilter filterClassVars updateProcess |
|
19 |
lastShowClass lastShowCategory lastShowClassFirst |
|
20 |
showMethodInheritance lastMethodClass lastMethodClassesSubclasses |
|
21 |
classAndSelectorsRedefinedBySubclassesOfClass showClass |
|
22 |
showMethodComplexity showMethodTypeIcon |
|
13803 | 23 |
showImageResourceMethodsImages showSyntheticMethods' |
12554 | 24 |
classVariableNames:'ShowComplexityValue' |
25 |
poolDictionaries:'' |
|
26 |
category:'Interface-Browsers-New' |
|
5591 | 27 |
! |
28 |
||
29 |
!MethodList class methodsFor:'documentation'! |
|
30 |
||
31 |
copyright |
|
32 |
" |
|
33 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
10388 | 34 |
All Rights Reserved |
5591 | 35 |
|
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
11876 | 43 |
! |
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
I implement the method list in the new system browser |
|
48 |
" |
|
5591 | 49 |
! ! |
50 |
||
51 |
!MethodList class methodsFor:'interface specs'! |
|
52 |
||
53 |
singleMethodWindowSpec |
|
54 |
"This resource specification was automatically generated |
|
55 |
by the UIPainter of ST/X." |
|
56 |
||
57 |
"Do not manually edit this!! If it is corrupted, |
|
58 |
the UIPainter may not be able to read the specification." |
|
59 |
||
60 |
" |
|
61 |
UIPainter new openOnClass:MethodList andSelector:#singleMethodWindowSpec |
|
62 |
MethodList new openInterface:#singleMethodWindowSpec |
|
63 |
" |
|
64 |
||
65 |
<resource: #canvas> |
|
66 |
||
67 |
^ |
|
68 |
#(#FullSpec |
|
69 |
#name: #singleMethodWindowSpec |
|
70 |
#window: |
|
71 |
#(#WindowSpec |
|
72 |
#label: 'SingleSelectorList' |
|
73 |
#name: 'SingleSelectorList' |
|
74 |
#min: #(#Point 0 0) |
|
75 |
#max: #(#Point 1024 721) |
|
76 |
#bounds: #(#Rectangle 12 22 312 322) |
|
77 |
) |
|
78 |
#component: |
|
79 |
#(#SpecCollection |
|
80 |
#collection: #( |
|
81 |
#(#LabelSpec |
|
82 |
#label: 'MethodName' |
|
83 |
#name: 'MethodLabel' |
|
84 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
85 |
#translateLabel: true |
|
86 |
#labelChannel: #methodLabelHolder |
|
87 |
#menu: #menuHolder |
|
88 |
) |
|
89 |
) |
|
90 |
||
91 |
) |
|
92 |
) |
|
93 |
||
94 |
"Modified: / 1.3.2000 / 20:50:15 / cg" |
|
95 |
! |
|
96 |
||
97 |
windowSpec |
|
98 |
"This resource specification was automatically generated |
|
99 |
by the UIPainter of ST/X." |
|
100 |
||
101 |
"Do not manually edit this!! If it is corrupted, |
|
102 |
the UIPainter may not be able to read the specification." |
|
103 |
||
104 |
" |
|
10579 | 105 |
UIPainter new openOnClass:Tools::MethodList andSelector:#windowSpec |
106 |
Tools::MethodList new openInterface:#windowSpec |
|
107 |
Tools::MethodList open |
|
5591 | 108 |
" |
109 |
||
110 |
<resource: #canvas> |
|
111 |
||
112 |
^ |
|
10579 | 113 |
#(FullSpec |
114 |
name: windowSpec |
|
115 |
window: |
|
116 |
(WindowSpec |
|
117 |
label: 'SelectorList' |
|
118 |
name: 'SelectorList' |
|
119 |
min: (Point 0 0) |
|
120 |
bounds: (Rectangle 0 0 300 300) |
|
5591 | 121 |
) |
10579 | 122 |
component: |
123 |
(SpecCollection |
|
124 |
collection: ( |
|
125 |
(SequenceViewSpec |
|
126 |
name: 'List' |
|
127 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
128 |
tabable: true |
|
129 |
model: selectedMethodNameIndices |
|
130 |
menu: menuHolder |
|
131 |
hasHorizontalScrollBar: true |
|
132 |
hasVerticalScrollBar: true |
|
133 |
miniScrollerHorizontal: true |
|
134 |
isMultiSelect: true |
|
135 |
valueChangeSelector: selectionChangedByClick |
|
136 |
useIndex: true |
|
137 |
sequenceList: browserNameList |
|
138 |
doubleClickChannel: doubleClickChannel |
|
139 |
properties: |
|
140 |
(PropertyListDictionary |
|
141 |
canDropSelector: canDropContext: |
|
142 |
dragArgument: nil |
|
143 |
dropArgument: nil |
|
144 |
dropSelector: doDropContext: |
|
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
145 |
) |
5591 | 146 |
) |
147 |
) |
|
148 |
||
149 |
) |
|
150 |
) |
|
151 |
! ! |
|
152 |
||
153 |
!MethodList class methodsFor:'plugIn spec'! |
|
154 |
||
155 |
aspectSelectors |
|
156 |
"This resource specification was automatically generated |
|
157 |
by the UIPainter of ST/X." |
|
158 |
||
159 |
"Do not manually edit this. If it is corrupted, |
|
160 |
the UIPainter may not be able to read the specification." |
|
161 |
||
162 |
"Return a description of exported aspects; |
|
163 |
these can be connected to aspects of an embedding application |
|
164 |
(if this app is embedded in a subCanvas)." |
|
165 |
||
166 |
^ #( |
|
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
167 |
environmentHolder |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
168 |
#(doubleClickChannel action) |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
169 |
#filterClassVars |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
170 |
#forceGeneratorTrigger |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
171 |
#immediateUpdate |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
172 |
#inGeneratorHolder |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
173 |
#menuHolder |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
174 |
#methodCategoryHolder |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
175 |
#packageFilter |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
176 |
#selectedMethods |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
177 |
#selectionChangeCondition |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
178 |
#showCoverageInformation |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
179 |
#showImageResourceMethodsImages |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
180 |
#showMethodComplexity |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
181 |
#showMethodInheritance |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
182 |
#showMethodTypeIcon |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
183 |
#sortBy |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
184 |
#updateTrigger |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
185 |
#variableFilter |
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
186 |
#showSyntheticMethods |
5591 | 187 |
). |
9421 | 188 |
|
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
189 |
"Modified: / 24-02-2014 / 10:37:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 190 |
! ! |
191 |
||
192 |
!MethodList methodsFor:'aspects'! |
|
193 |
||
194 |
browserNameList |
|
195 |
browserNameList isNil ifTrue:[ |
|
10388 | 196 |
browserNameList := List new. |
5591 | 197 |
]. |
198 |
^ browserNameList. |
|
199 |
||
200 |
"Modified: / 31.1.2000 / 00:42:44 / cg" |
|
201 |
"Created: / 5.2.2000 / 22:38:32 / cg" |
|
202 |
! |
|
203 |
||
204 |
defaultSlaveModeValue |
|
205 |
^ false. |
|
206 |
! |
|
207 |
||
208 |
filterClassVars |
|
209 |
filterClassVars isNil ifTrue:[ |
|
10388 | 210 |
filterClassVars := false asValue. |
211 |
filterClassVars addDependent:self |
|
5591 | 212 |
]. |
213 |
^ filterClassVars |
|
214 |
! |
|
215 |
||
216 |
filterClassVars:aValueHolder |
|
217 |
filterClassVars notNil ifTrue:[ |
|
10388 | 218 |
filterClassVars removeDependent:self |
5591 | 219 |
]. |
220 |
filterClassVars := aValueHolder. |
|
221 |
filterClassVars notNil ifTrue:[ |
|
10388 | 222 |
filterClassVars addDependent:self |
5591 | 223 |
]. |
224 |
! |
|
225 |
||
226 |
methodLabelHolder |
|
227 |
^ self pseudoListLabelHolder |
|
228 |
||
229 |
"Created: / 1.3.2000 / 20:50:07 / cg" |
|
230 |
! |
|
231 |
||
232 |
methodList |
|
233 |
^ methodList |
|
234 |
! |
|
235 |
||
236 |
selectedMethodNameIndices |
|
237 |
selectedMethodNameIndices isNil ifTrue:[ |
|
10388 | 238 |
selectedMethodNameIndices := ValueHolder new. |
239 |
selectedMethodNameIndices addDependent:self |
|
5591 | 240 |
]. |
241 |
^ selectedMethodNameIndices. |
|
242 |
||
243 |
"Modified: / 5.2.2000 / 00:31:48 / cg" |
|
244 |
"Created: / 5.2.2000 / 22:59:31 / cg" |
|
245 |
! |
|
246 |
||
247 |
selectedMethods |
|
248 |
^ self selectionHolder |
|
249 |
! |
|
250 |
||
251 |
selectedMethods:aValueHolder |
|
252 |
^ self selectionHolder:aValueHolder |
|
253 |
! |
|
254 |
||
8197
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
255 |
showImageResourceMethodsImages |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
256 |
showImageResourceMethodsImages isNil ifTrue:[ |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
257 |
showImageResourceMethodsImages := false asValue. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
258 |
showImageResourceMethodsImages addDependent:self |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
259 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
260 |
^ showImageResourceMethodsImages |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
261 |
! |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
262 |
|
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
263 |
showImageResourceMethodsImages:aValueHolder |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
264 |
showImageResourceMethodsImages notNil ifTrue:[ |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
265 |
showImageResourceMethodsImages removeDependent:self |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
266 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
267 |
showImageResourceMethodsImages := aValueHolder. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
268 |
showImageResourceMethodsImages notNil ifTrue:[ |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
269 |
showImageResourceMethodsImages addDependent:self |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
270 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
271 |
! |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
272 |
|
6259
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
273 |
showMethodComplexity |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
274 |
showMethodComplexity isNil ifTrue:[ |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
275 |
showMethodComplexity := false asValue. |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
276 |
showMethodComplexity addDependent:self |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
277 |
]. |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
278 |
^ showMethodComplexity |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
279 |
! |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
280 |
|
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
281 |
showMethodComplexity:aValueHolder |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
282 |
showMethodComplexity notNil ifTrue:[ |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
283 |
showMethodComplexity removeDependent:self |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
284 |
]. |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
285 |
showMethodComplexity := aValueHolder. |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
286 |
showMethodComplexity notNil ifTrue:[ |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
287 |
showMethodComplexity addDependent:self |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
288 |
]. |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
289 |
! |
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
290 |
|
5591 | 291 |
showMethodInheritance |
292 |
showMethodInheritance isNil ifTrue:[ |
|
10388 | 293 |
showMethodInheritance := false asValue. |
294 |
showMethodInheritance addDependent:self |
|
5591 | 295 |
]. |
296 |
^ showMethodInheritance |
|
297 |
! |
|
298 |
||
299 |
showMethodInheritance:aValueHolder |
|
300 |
showMethodInheritance notNil ifTrue:[ |
|
10388 | 301 |
showMethodInheritance removeDependent:self |
5591 | 302 |
]. |
303 |
showMethodInheritance := aValueHolder. |
|
304 |
showMethodInheritance notNil ifTrue:[ |
|
10388 | 305 |
showMethodInheritance addDependent:self |
5591 | 306 |
]. |
307 |
! |
|
308 |
||
6268 | 309 |
showMethodTypeIcon |
310 |
showMethodTypeIcon isNil ifTrue:[ |
|
311 |
showMethodTypeIcon := true asValue. |
|
312 |
showMethodTypeIcon addDependent:self |
|
313 |
]. |
|
314 |
^ showMethodTypeIcon |
|
315 |
! |
|
316 |
||
317 |
showMethodTypeIcon:aValueHolder |
|
318 |
showMethodTypeIcon notNil ifTrue:[ |
|
319 |
showMethodTypeIcon removeDependent:self |
|
320 |
]. |
|
321 |
showMethodTypeIcon := aValueHolder. |
|
322 |
showMethodTypeIcon notNil ifTrue:[ |
|
323 |
showMethodTypeIcon addDependent:self |
|
324 |
]. |
|
325 |
! |
|
326 |
||
13803 | 327 |
showSyntheticMethods |
328 |
showSyntheticMethods isNil ifTrue:[ |
|
329 |
showSyntheticMethods := false asValue. |
|
330 |
showSyntheticMethods addDependent:self |
|
331 |
]. |
|
332 |
^ showSyntheticMethods |
|
333 |
||
334 |
"Created: / 13-04-2012 / 16:03:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
335 |
! |
|
336 |
||
337 |
showSyntheticMethods:aValueHolder |
|
338 |
showSyntheticMethods notNil ifTrue:[ |
|
339 |
showSyntheticMethods removeDependent:self |
|
340 |
]. |
|
341 |
showSyntheticMethods := aValueHolder. |
|
342 |
showSyntheticMethods notNil ifTrue:[ |
|
343 |
showSyntheticMethods addDependent:self |
|
344 |
]. |
|
345 |
||
346 |
"Created: / 13-04-2012 / 16:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
347 |
! |
|
348 |
||
5591 | 349 |
variableFilter |
350 |
variableFilter isNil ifTrue:[ |
|
10388 | 351 |
variableFilter := nil asValue. |
352 |
variableFilter addDependent:self |
|
5591 | 353 |
]. |
354 |
^ variableFilter |
|
355 |
! |
|
356 |
||
357 |
variableFilter:aValueHolder |
|
358 |
variableFilter notNil ifTrue:[ |
|
10388 | 359 |
variableFilter removeDependent:self |
5591 | 360 |
]. |
361 |
variableFilter := aValueHolder. |
|
362 |
variableFilter notNil ifTrue:[ |
|
10388 | 363 |
variableFilter addDependent:self |
5591 | 364 |
]. |
365 |
! ! |
|
366 |
||
367 |
!MethodList methodsFor:'change & update'! |
|
368 |
||
369 |
delayedUpdate:something with:aParameter from:changedObject |
|
12554 | 370 |
|cls clsName sel oldMethod newMethod methods newSelection |
5591 | 371 |
selectionHolder selection needSelectionChange| |
372 |
||
373 |
selectionHolder := self selectedMethods. |
|
374 |
selection := selectionHolder value. |
|
375 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
376 |
changedObject == environment ifTrue:[ |
5998 | 377 |
classes notNil ifTrue:[ |
10388 | 378 |
something == #classDefinition ifTrue:[ |
379 |
cls := aParameter. |
|
12554 | 380 |
clsName := cls name. |
381 |
(classes contains:[:aClass | aClass name = clsName]) ifFalse:[ |
|
382 |
^ self "/ I don't care for that class |
|
10388 | 383 |
]. |
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
384 |
classes := classes collect:[:eachClass | (environment classNamed:eachClass name) ]. |
10388 | 385 |
self invalidateList. |
386 |
"/ self updateList. |
|
387 |
^ self. |
|
388 |
]. |
|
389 |
||
5998 | 390 |
something == #methodCategory ifTrue:[ |
391 |
"/ ignore here - methodCategoryList will tell me if required |
|
392 |
^ self |
|
393 |
]. |
|
6663
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
394 |
(something == #classOrganization |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
395 |
or:[ something == #methodCategoryAdded |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
396 |
or:[ something == #methodCategoryRemoved |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
397 |
or:[ something == #methodCategoriesRemoved |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
398 |
or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[ |
5998 | 399 |
"/ ignore here - methodCategoryList will tell me if required |
400 |
^ self |
|
401 |
]. |
|
5591 | 402 |
|
11851
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
403 |
(something == #methodInClass |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
404 |
or:[something == #methodCoverageInfo]) ifTrue:[ |
5998 | 405 |
"/ a method has been added/changed |
406 |
cls := aParameter at:1. |
|
407 |
(classes includesIdentical:cls) ifTrue:[ |
|
408 |
sel := aParameter at:2. |
|
409 |
oldMethod := aParameter at:3. |
|
410 |
newMethod := cls compiledMethodAt:sel. |
|
411 |
(oldMethod notNil and:[newMethod notNil]) ifTrue:[ |
|
412 |
"a method was changed & acccepted; |
|
413 |
No need for a rescan of the methodDictionary; |
|
414 |
however, ensure that the refs to the old method are updated |
|
415 |
" |
|
416 |
methods := selection. |
|
417 |
methods size > 0 ifTrue:[ |
|
418 |
(methods includesIdentical:oldMethod) ifTrue:[ |
|
419 |
needSelectionChange := true. |
|
420 |
] |
|
421 |
]. |
|
422 |
methodList replaceAllIdentical:oldMethod with:newMethod. |
|
423 |
lastSelectedMethods notNil ifTrue:[ |
|
424 |
lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod |
|
425 |
]. |
|
426 |
methods size > 0 ifTrue:[ |
|
427 |
methods := methods asOrderedCollection. |
|
428 |
methods replaceAllIdentical:oldMethod with:newMethod. |
|
429 |
]. |
|
5591 | 430 |
|
5998 | 431 |
needSelectionChange == true ifTrue:[ |
432 |
selectionHolder setValue:methods. |
|
6575
94f336bcb07b
update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents:
6490
diff
changeset
|
433 |
"/ self enqueueDelayedMethodsSelectionChanged. |
94f336bcb07b
update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents:
6490
diff
changeset
|
434 |
"/ need this to inform my browser that method was changed |
94f336bcb07b
update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents:
6490
diff
changeset
|
435 |
"/ by someone else. |
94f336bcb07b
update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents:
6490
diff
changeset
|
436 |
selectionHolder changed. |
5998 | 437 |
]. |
10376
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
438 |
"/JV@2011-07-22: Update always - I need to see immediately that |
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
439 |
"/the method has changed. Also, add/remove breakpoint etc. |
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
440 |
|
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
441 |
"/ (variableFilter value size > 0 |
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
442 |
"/ or:[oldMethod package ~= newMethod package |
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
443 |
"/ or:[oldMethod resources ~= newMethod resources |
8a61751a59fa
method entry updating fixed (it is updated whenever a method is changed)
vrany
parents:
10363
diff
changeset
|
444 |
"/ or:[showMethodComplexity value == true]]]) |
11505
f6848fffd318
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11385
diff
changeset
|
445 |
self autoUpdateOnChange ifTrue:[ |
f6848fffd318
changed: #delayedUpdate:with:from:
Claus Gittinger <cg@exept.de>
parents:
11385
diff
changeset
|
446 |
"/ only update that method's entry |
5998 | 447 |
self updateListEntryFor:newMethod. |
448 |
"/ sigh - must invalidate |
|
449 |
"/ self invalidateList. |
|
450 |
]. |
|
451 |
^ self. |
|
452 |
]. |
|
453 |
"/ method was added - update the methodList |
|
454 |
"/ Q: is this needed (methodCategoryList should send me a new inGenerator) |
|
455 |
self invalidateList. |
|
456 |
]. |
|
457 |
^ self. |
|
458 |
]. |
|
459 |
||
460 |
something == #methodInClassRemoved ifTrue:[ |
|
461 |
cls := aParameter at:1. |
|
462 |
(classes includesIdentical:cls) ifTrue:[ |
|
463 |
sel := aParameter at:2. |
|
464 |
"/ method was removed - update the methodList |
|
465 |
"/ Q: is this needed (methodCategoryList should send me a new inGenerator) |
|
466 |
self invalidateList. |
|
467 |
]. |
|
468 |
^ self. |
|
469 |
]. |
|
5591 | 470 |
|
10357 | 471 |
something == #methodCoverageInfo ifTrue:[ |
472 |
"/ already checked if it is one of my classes |
|
11557 | 473 |
self updateListEntryFor:aParameter. |
474 |
"/ self enqueueDelayedUpdateList. |
|
475 |
"/ listValid == true ifTrue:[ |
|
476 |
"/ self invalidateList. |
|
477 |
"/ ]. |
|
10357 | 478 |
^ self. |
479 |
]. |
|
480 |
||
5998 | 481 |
(something == #methodTrap |
11550 | 482 |
or:[ something == #lastTestRunResult |
483 |
or:[ something == #privacyOfMethod ]]) ifTrue:[ |
|
5998 | 484 |
cls := aParameter at:1. |
485 |
sel := aParameter at:2. |
|
486 |
(classes includesIdentical:cls) ifFalse:[ ^ self]. |
|
11550 | 487 |
|
5998 | 488 |
newMethod := cls compiledMethodAt:sel. |
489 |
newMethod isNil ifTrue:[ |
|
490 |
self invalidateList. |
|
491 |
^ self |
|
492 |
]. |
|
5591 | 493 |
|
11550 | 494 |
((something == #privacyOfMethod) or:[something == #lastTestRunResult]) ifTrue:[ |
5998 | 495 |
self updateListEntryFor:newMethod. |
496 |
]. |
|
497 |
||
498 |
(something == #methodTrap) ifTrue:[ |
|
499 |
newMethod isWrapped ifTrue:[ |
|
500 |
oldMethod := newMethod originalMethod |
|
501 |
] ifFalse:[ |
|
502 |
selection size > 0 ifTrue:[ |
|
503 |
oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil. |
|
504 |
] |
|
505 |
]. |
|
5591 | 506 |
|
5998 | 507 |
selection size > 0 ifTrue:[ |
508 |
(selection includesIdentical:oldMethod) ifTrue:[ |
|
509 |
needSelectionChange := true. |
|
510 |
] |
|
511 |
]. |
|
512 |
methodList replaceAllIdentical:oldMethod with:newMethod. |
|
513 |
lastSelectedMethods notNil ifTrue:[ |
|
514 |
lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod |
|
515 |
]. |
|
516 |
selection size > 0 ifTrue:[ |
|
517 |
selection := selection asOrderedCollection. |
|
518 |
selection replaceAllIdentical:oldMethod with:newMethod. |
|
519 |
]. |
|
520 |
needSelectionChange == true ifTrue:[ |
|
521 |
selectionHolder changed. |
|
522 |
]. |
|
5591 | 523 |
|
5998 | 524 |
"/ actually, could just change that single item ... |
525 |
"/ ... might be cheaper, if list is huge. |
|
526 |
"/ only update that methods entry |
|
527 |
self updateListEntryFor:newMethod. |
|
528 |
"/ self invalidateList. |
|
529 |
]. |
|
530 |
^ self |
|
531 |
]. |
|
5591 | 532 |
|
6846 | 533 |
(something == #projectOrganization |
534 |
or:[something == #lastTestRunResult]) ifTrue:[ |
|
5998 | 535 |
aParameter notNil ifTrue:[ |
536 |
cls := aParameter at:1. |
|
537 |
cls notNil ifTrue:[ |
|
538 |
((classes includesIdentical:cls theNonMetaclass) |
|
539 |
or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[ |
|
540 |
self invalidateList. |
|
541 |
]. |
|
542 |
]. |
|
543 |
] ifFalse:[ |
|
544 |
self invalidateList. |
|
545 |
]. |
|
546 |
^ self |
|
547 |
]. |
|
6846 | 548 |
|
5998 | 549 |
"/ everything else is ignored |
550 |
"/ self halt. |
|
551 |
]. |
|
552 |
^ self |
|
5591 | 553 |
]. |
554 |
||
555 |
"/ something == #organization ifTrue:[ |
|
556 |
"/self halt:'no longer'. |
|
557 |
"/^ self. |
|
558 |
"/ "/ a methods cateory has changed |
|
559 |
"/ (classes includesIdentical:changedObject) ifTrue:[ |
|
560 |
"/ aParameter isSymbol ifTrue:[ |
|
561 |
"/ "/ a method with a new category |
|
562 |
"/ (self methodList includesIdentical:(changedObject compiledMethodAt:aParameter)) ifTrue:[ |
|
563 |
"/ self invalidateList. |
|
564 |
"/ ]. |
|
565 |
"/ ^ self. |
|
566 |
"/ ]. |
|
567 |
"/ "/ a new category (no method yet) |
|
568 |
"/ self invalidateList |
|
569 |
"/ ]. |
|
570 |
"/ ^ self |
|
571 |
"/ ]. |
|
572 |
||
573 |
"/ something == #methodDictionary ifTrue:[ |
|
574 |
"/self halt:'no longer'. |
|
575 |
"/^ self. |
|
576 |
"/ "/ a method has been added/removed |
|
577 |
"/ (classes includesIdentical:changedObject) ifTrue:[ |
|
578 |
"/ aParameter isArray ifTrue:[ |
|
579 |
"/ sel := aParameter at:1. |
|
580 |
"/ oldMethod := aParameter at:2. |
|
581 |
"/ newMethod := changedObject compiledMethodAt:sel. |
|
582 |
"/ oldMethod notNil ifTrue:[ |
|
583 |
"/ "a method was changed & acccepted; |
|
584 |
"/ No need for a rescan of the methodDictionary; |
|
585 |
"/ however, ensure that the refs to the old method are updated |
|
586 |
"/ " |
|
587 |
"/ methods := selection. |
|
588 |
"/ methods size > 0 ifTrue:[ |
|
589 |
"/ (methods includesIdentical:oldMethod) ifTrue:[ |
|
590 |
"/ needSelectionChange := true. |
|
591 |
"/ ] |
|
592 |
"/ ]. |
|
593 |
"/ methodList replaceAllIdentical:oldMethod with:newMethod. |
|
594 |
"/ lastSelectedMethods notNil ifTrue:[ |
|
595 |
"/ lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod |
|
596 |
"/ ]. |
|
597 |
"/ methods size > 0 ifTrue:[ |
|
598 |
"/ methods := methods asOrderedCollection. |
|
599 |
"/ methods replaceAllIdentical:oldMethod with:newMethod. |
|
600 |
"/ ]. |
|
601 |
"/ needSelectionChange == true ifTrue:[ |
|
602 |
"/ selectionHolder setValue:methods. |
|
603 |
"/ selectionHolder changed. |
|
604 |
"/ ]. |
|
605 |
"/ ^ self. |
|
606 |
"/ ] |
|
607 |
"/ ]. |
|
608 |
"/ "/ class has changed must update the methodList |
|
609 |
"/ self invalidateList. |
|
610 |
"/ ]. |
|
611 |
"/ ^ self. |
|
612 |
"/ ]. |
|
613 |
||
614 |
"/ something == #projectOrganization ifTrue:[ |
|
615 |
"/ ((classes includesIdentical:changedObject theNonMetaclass) |
|
616 |
"/ or:[(classes includesIdentical:changedObject theMetaclass)]) ifTrue:[ |
|
617 |
"/ self invalidateList. |
|
618 |
"/ ]. |
|
619 |
"/ ^ self |
|
620 |
"/ ]. |
|
621 |
||
622 |
changedObject == sortBy ifTrue:[ |
|
5998 | 623 |
listValid ~~ true ifTrue:[ "/ could be nil |
624 |
inGeneratorHolder value isNil ifTrue:[ |
|
625 |
"/ ok, no need to react on that one |
|
626 |
"/ (will invalidate anyway, once I have more info at hand) |
|
627 |
^ self |
|
628 |
]. |
|
629 |
]. |
|
630 |
self invalidateList. |
|
631 |
^ self |
|
5591 | 632 |
]. |
633 |
||
634 |
(changedObject == variableFilter |
|
635 |
or:[changedObject == filterClassVars |
|
6259
e440c14b02aa
experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents:
5998
diff
changeset
|
636 |
or:[changedObject == showMethodInheritance |
13803 | 637 |
or:[changedObject == showMethodComplexity |
638 |
or:[changedObject == showSyntheticMethods |
|
639 |
]]]]) ifTrue:[ |
|
5998 | 640 |
self invalidateList. |
641 |
^ self |
|
5591 | 642 |
]. |
643 |
||
644 |
changedObject == selectedMethodNameIndices ifTrue:[ |
|
5998 | 645 |
newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx]. |
646 |
newSelection ~= selection ifTrue:[ |
|
647 |
selectionHolder value:newSelection. |
|
648 |
lastSelectedMethods := newSelection. |
|
649 |
lastSelectedMethods notNil ifTrue:[ |
|
650 |
lastSelectedMethods := lastSelectedMethods asOrderedCollection |
|
651 |
]. |
|
652 |
] ifFalse:[ |
|
653 |
"/ a reselect - force update |
|
5591 | 654 |
"/ selection size == 1 ifTrue:[ |
5998 | 655 |
selectionHolder setValue:newSelection. |
656 |
selectionHolder changed:#value. |
|
5591 | 657 |
"/ ]. |
5998 | 658 |
]. |
659 |
^ self |
|
5591 | 660 |
]. |
661 |
changedObject == selectionHolder ifTrue:[ |
|
5998 | 662 |
self selectedMethodsChanged. |
663 |
lastSelectedMethods := selectionHolder value. |
|
664 |
lastSelectedMethods notNil ifTrue:[ |
|
665 |
lastSelectedMethods := lastSelectedMethods asOrderedCollection |
|
666 |
]. |
|
667 |
^ self |
|
5591 | 668 |
]. |
669 |
"/ something == #methodTrap ifTrue:[ |
|
670 |
"/self halt:'no longer'. |
|
671 |
"/^ self. |
|
672 |
"/ (classes includesIdentical:changedObject) ifTrue:[ |
|
673 |
"/ newMethod := changedObject compiledMethodAt:aParameter. |
|
674 |
"/ newMethod isNil ifTrue:[ |
|
675 |
"/ self invalidateList. |
|
676 |
"/ ^ self |
|
677 |
"/ ]. |
|
678 |
"/ newMethod isWrapped ifTrue:[ |
|
679 |
"/ oldMethod := newMethod originalMethod |
|
680 |
"/ ] ifFalse:[ |
|
681 |
"/ selection size > 0 ifTrue:[ |
|
682 |
"/ oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil. |
|
683 |
"/ ] |
|
684 |
"/ ]. |
|
685 |
"/ |
|
686 |
"/ selection size > 0 ifTrue:[ |
|
687 |
"/ (selection includesIdentical:oldMethod) ifTrue:[ |
|
688 |
"/ needSelectionChange := true. |
|
689 |
"/ ] |
|
690 |
"/ ]. |
|
691 |
"/"/ methodList replaceAllIdentical:oldMethod with:newMethod. |
|
692 |
"/ lastSelectedMethods notNil ifTrue:[ |
|
693 |
"/ lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod |
|
694 |
"/ ]. |
|
695 |
"/ selection size > 0 ifTrue:[ |
|
696 |
"/ selection := selection asOrderedCollection. |
|
697 |
"/ selection replaceAllIdentical:oldMethod with:newMethod. |
|
698 |
"/ ]. |
|
699 |
"/ needSelectionChange == true ifTrue:[ |
|
700 |
"/ selectionHolder changed. |
|
701 |
"/ ]. |
|
702 |
"/ self invalidateList. |
|
703 |
"/ ^ self |
|
704 |
"/ ]. |
|
705 |
"/ ^ self |
|
706 |
"/ ]. |
|
707 |
super delayedUpdate:something with:aParameter from:changedObject |
|
708 |
||
6846 | 709 |
"Created: / 05-02-2000 / 13:42:14 / cg" |
11557 | 710 |
"Modified: / 05-06-2012 / 23:47:15 / cg" |
13803 | 711 |
"Modified: / 24-08-2013 / 00:41:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 712 |
! |
713 |
||
714 |
selectedMethodsChanged |
|
715 |
"the set of selected methods has changed; |
|
716 |
update the selection-index collection (for the selectionInListView)" |
|
717 |
||
718 |
|indices methods reverseMap |
|
719 |
selectedMethodsHolder selectedMethods selectedMethodNameIndicesHolder| |
|
720 |
||
721 |
methods := methodList ? #(). |
|
722 |
methods size == 0 ifTrue:[ |
|
10388 | 723 |
"/ this may happen during early startup, |
724 |
"/ when invoked with a preset methodSelection, |
|
725 |
"/ and the methodGenerator has not yet been setup |
|
726 |
"/ to not clobber the selection, defer the update |
|
727 |
"/ until the methodList arrives ... |
|
728 |
^ self |
|
5591 | 729 |
]. |
730 |
||
731 |
selectedMethodsHolder := self selectedMethods. |
|
732 |
selectedMethods := selectedMethodsHolder value. |
|
733 |
||
734 |
"/ check if all is selected (likely) |
|
735 |
((selectedMethods size == methodList size) |
|
736 |
and:[selectedMethods = methodList]) ifTrue:[ |
|
10388 | 737 |
indices := (1 to:selectedMethods size) |
5591 | 738 |
] ifFalse:[ |
10388 | 739 |
selectedMethods size > 100 ifTrue:[ |
740 |
"/ check if all is selected (likely) |
|
741 |
((selectedMethods size == methodList size) |
|
742 |
and:[selectedMethods = methodList]) ifTrue:[ |
|
743 |
indices := (1 to:selectedMethods size) |
|
744 |
] ifFalse:[ |
|
745 |
"/ for big collections, generate a reverse map |
|
746 |
reverseMap := IdentityDictionary new. |
|
747 |
methods keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx]. |
|
748 |
indices := selectedMethods collect:[:eachSelectedMethod | |
|
749 |
reverseMap at:eachSelectedMethod ifAbsent:0 |
|
750 |
] |
|
751 |
] |
|
752 |
] ifFalse:[ |
|
753 |
indices := (selectedMethods ? #()) collect:[:eachSelectedMethod | |
|
754 |
methods identityIndexOf:eachSelectedMethod. |
|
755 |
] |
|
756 |
]. |
|
757 |
indices := indices select:[:idx | idx ~= 0]. |
|
5591 | 758 |
]. |
759 |
||
760 |
selectedMethodNameIndicesHolder := self selectedMethodNameIndices. |
|
761 |
selectedMethodNameIndicesHolder value ~= indices ifTrue:[ |
|
10388 | 762 |
selectedMethodNameIndicesHolder value:indices. |
5591 | 763 |
] |
764 |
! |
|
765 |
||
766 |
selectionChanged |
|
767 |
|methods| |
|
768 |
||
769 |
methods := ((self selectedMethodNameIndices value) ? #()) collect:[:idx | methodList at:idx]. |
|
770 |
methods notEmpty ifTrue:[ |
|
10388 | 771 |
lastSelectedMethods := methods asOrderedCollection. |
5591 | 772 |
]. |
773 |
"/ to allow reselect, change my valueHolder, even if the same collection |
|
774 |
"/ self selectedMethods value ~= methods ifTrue:[ |
|
13803 | 775 |
self selectedMethods value:methods asOrderedCollection |
5591 | 776 |
"/ ] |
777 |
||
13803 | 778 |
"Created: / 05-02-2000 / 13:42:14 / cg" |
779 |
"Modified: / 05-02-2000 / 23:32:20 / cg" |
|
780 |
"Modified: / 13-06-2013 / 12:19:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5591 | 781 |
! |
782 |
||
783 |
selectionChangedByClick |
|
784 |
"we are not interested in that - get another notification |
|
12541 | 785 |
via the changed valueHolder " |
5591 | 786 |
! |
787 |
||
788 |
update:something with:aParameter from:changedObject |
|
12554 | 789 |
|cls clsName sel mthd mustFlushInheritanceInfo| |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
790 |
|
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
791 |
mustFlushInheritanceInfo := true. |
5591 | 792 |
|
793 |
"/ some can be ignored immediately |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
794 |
changedObject == environment ifTrue:[ |
5591 | 795 |
classes isNil ifTrue:[ |
796 |
^ self. |
|
797 |
]. |
|
798 |
something isNil ifTrue:[ |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
799 |
"/ self halt "/ huh - environment changed - so what ? |
5591 | 800 |
^ self. |
801 |
]. |
|
802 |
something == #classComment ifTrue:[ |
|
803 |
^ self. |
|
804 |
]. |
|
805 |
something == #classVariables ifTrue:[ |
|
806 |
^ self. |
|
807 |
]. |
|
808 |
something == #organization ifTrue:[ |
|
809 |
^ self. |
|
810 |
]. |
|
811 |
something == #methodCategory ifTrue:[ |
|
812 |
"/ ignore here - methodCategoryList will tell me if required |
|
813 |
^ self |
|
814 |
]. |
|
6663
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
815 |
(something == #classOrganization |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
816 |
or:[ something == #methodCategoryAdded |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
817 |
or:[ something == #methodCategoryRemoved |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
818 |
or:[ something == #methodCategoriesRemoved |
1453d4f33815
changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents:
6575
diff
changeset
|
819 |
or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[ |
5591 | 820 |
"/ ignore here - methodCategoryList will tell me if required |
821 |
^ self |
|
822 |
]. |
|
10357 | 823 |
|
824 |
something == #methodCoverageInfo ifTrue:[ |
|
825 |
self showCoverageInformation value ifFalse:[^ self]. |
|
826 |
mthd := aParameter. |
|
827 |
(classes notNil and:[classes includesIdentical:mthd mclass]) ifFalse:[ |
|
11851
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
828 |
^ self "/ I don't care for that class |
10357 | 829 |
]. |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
830 |
mustFlushInheritanceInfo := false. |
10357 | 831 |
]. |
832 |
||
5998 | 833 |
(something == #methodTrap |
6846 | 834 |
or:[ something == #methodPrivacy |
835 |
or:[ something == #lastTestRunResult] ]) ifTrue:[ |
|
5998 | 836 |
self window shown ifFalse:[ |
10861 | 837 |
"JV@2011-11-17: Do not break the dependency here, |
838 |
because then the window won't get updates once |
|
12505 | 839 |
deiconified -> leads to confusing behavior |
840 |
(browser shows obsolete info)" |
|
10861 | 841 |
"/changedObject removeDependent:self. "/ ????? |
13803 | 842 |
self invalidateList. |
5998 | 843 |
^ self |
844 |
]. |
|
12541 | 845 |
cls := aParameter at:1. |
12505 | 846 |
sel := aParameter at:2. |
847 |
mthd := cls compiledMethodAt:sel. |
|
12649 | 848 |
(mthd notNil and:[mthd isWrapped or:[mthd isMethodWithBreakpoints]]) ifTrue:[ |
12505 | 849 |
(methodList includes:mthd originalMethod) ifTrue:[ |
850 |
methodList replaceAll:mthd originalMethod with:mthd. |
|
12673 | 851 |
lastSelectedMethods notNil ifTrue:[ |
852 |
lastSelectedMethods replaceAll:mthd originalMethod with:mthd. |
|
853 |
]. |
|
12505 | 854 |
] |
855 |
]. |
|
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
856 |
mustFlushInheritanceInfo := false. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
857 |
]. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
858 |
something == #newClass ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
859 |
^ self. |
5591 | 860 |
]. |
861 |
||
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
862 |
(something == #methodInClass |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
863 |
or:[ something == #methodInClassRemoved ]) ifTrue:[ |
12530 | 864 |
cls := aParameter first. |
12554 | 865 |
clsName := cls name. |
866 |
(classes contains:[:aClass | aClass name = clsName]) ifFalse:[ |
|
12530 | 867 |
^ self "/ I dont care for that class |
868 |
]. |
|
12554 | 869 |
sel := aParameter second. |
12091 | 870 |
(methodList contains:[:mthd | mthd getMclass notNil and:[mthd selector = sel]]) ifFalse:[ |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
871 |
mustFlushInheritanceInfo := false. |
12091 | 872 |
self window topView hasFocus ifFalse:[ |
873 |
self enqueueDelayedUpdate:something with:aParameter from:changedObject. |
|
874 |
^ self. |
|
875 |
]. |
|
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
876 |
]. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
877 |
]. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
878 |
|
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
879 |
mustFlushInheritanceInfo ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
880 |
"/ as the organisation changes, flush my remembered redefinition-cache-info |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
881 |
classAndSelectorsRedefinedBySubclassesOfClass := nil. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
882 |
]. |
5591 | 883 |
|
884 |
something == #classDefinition ifTrue:[ |
|
885 |
cls := aParameter. |
|
12554 | 886 |
clsName := cls name. |
887 |
(classes contains:[:aClass | aClass name = clsName]) ifFalse:[ |
|
888 |
^ self "/ I don't care for that class |
|
5591 | 889 |
]. |
10388 | 890 |
self enqueueDelayedUpdate:something with:aParameter from:changedObject. |
5591 | 891 |
^ self. |
892 |
]. |
|
893 |
something == #classRemove ifTrue:[ |
|
894 |
^ self. |
|
895 |
]. |
|
896 |
something == #classRename ifTrue:[ |
|
897 |
^ self. |
|
898 |
]. |
|
899 |
]. |
|
900 |
||
901 |
"/ these must lead to immediate update of the selectedMethods collection |
|
902 |
"/ (otherwise, that collection might be updated too late, leading to |
|
903 |
"/ an obsolete methods code being shown by the codeView. |
|
11851
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
904 |
(something == #methodInClass |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
905 |
or:[ something == #methodCoverageInfo ]) ifTrue:[ |
6846 | 906 |
"/ as the organisation changes, flush my remembered redefinition-cache-info |
5591 | 907 |
classAndSelectorsRedefinedBySubclassesOfClass := nil. |
908 |
cls := aParameter at:1. |
|
909 |
(classes includesIdentical:cls) ifFalse:[ |
|
910 |
^ self "/ I dont care for that class |
|
911 |
]. |
|
912 |
self enqueueDelayedUpdate:something with:aParameter from:changedObject. |
|
913 |
^ self |
|
914 |
]. |
|
915 |
||
11851
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
916 |
something == #coverageInfo ifTrue:[ |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
917 |
listValid == true ifTrue:[ |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
918 |
self enqueueDelayedUpdateList |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
919 |
]. |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
920 |
^ self. |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
921 |
]. |
8184ad4d5930
changed: #update:with:from:
Claus Gittinger <cg@exept.de>
parents:
11639
diff
changeset
|
922 |
|
5591 | 923 |
something == #methodInClassRemoved ifTrue:[ |
924 |
cls := aParameter at:1. |
|
925 |
(classes includesIdentical:cls) ifFalse:[ |
|
926 |
^ self "/ I dont care for that class |
|
927 |
]. |
|
928 |
]. |
|
929 |
||
930 |
super update:something with:aParameter from:changedObject |
|
6846 | 931 |
|
10861 | 932 |
"Modified: / 17-11-2011 / 19:22:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11557 | 933 |
"Modified: / 05-06-2012 / 23:41:50 / cg" |
5591 | 934 |
! ! |
935 |
||
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
936 |
!MethodList methodsFor:'drag & drop'! |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
937 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
938 |
canDropContext:aDropContext |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
939 |
|methods| |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
940 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
941 |
aDropContext sourceWidget == aDropContext targetWidget ifTrue:[^ false]. |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
942 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
943 |
methods := aDropContext dropObjects collect:[:obj | obj theObject]. |
7122 | 944 |
(methods conform:[:aMethod | aMethod isMethod]) ifFalse:[^ false]. |
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
945 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
946 |
self masterApplication theSingleSelectedClass isNil ifTrue:[^ false]. |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
947 |
^ true |
7122 | 948 |
|
949 |
"Modified: / 13-09-2006 / 11:43:54 / cg" |
|
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
950 |
! |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
951 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
952 |
doDropContext:aDropContext |
8596 | 953 |
|methods browser| |
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
954 |
|
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
955 |
methods := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject]. |
7122 | 956 |
(methods conform:[:something | something isMethod]) ifFalse:[^ self]. |
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
957 |
|
8596 | 958 |
browser := self masterApplication. |
959 |
aDropContext dragType == DropContext dragTypeCopy ifTrue:[ |
|
960 |
browser |
|
961 |
copyMethods:methods |
|
962 |
toClass:(browser theSingleSelectedClass). |
|
963 |
] ifFalse:[ |
|
964 |
browser |
|
965 |
moveMethods:methods |
|
966 |
toClass:(browser theSingleSelectedClass). |
|
967 |
]. |
|
7122 | 968 |
|
969 |
"Modified: / 13-09-2006 / 11:43:44 / cg" |
|
6774
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
970 |
! ! |
ae9ed5b0b548
move method via drag and drop
Claus Gittinger <cg@exept.de>
parents:
6697
diff
changeset
|
971 |
|
5591 | 972 |
!MethodList methodsFor:'private'! |
973 |
||
10579 | 974 |
isMethodToBeShown:aMethod |
975 |
"invoked, when we get a change for aMethod which was previously not |
|
976 |
in the list (for example, if I show a filtered list). |
|
977 |
Check if that single method is to be shown now. |
|
978 |
Used to speed up update for senders/string/implementors lists" |
|
979 |
||
980 |
|generator| |
|
981 |
||
982 |
generator := inGeneratorHolder value. |
|
983 |
generator isNil ifTrue:[ |
|
984 |
^ false |
|
985 |
]. |
|
986 |
||
987 |
"/ generator generates nil-selector entries |
|
988 |
"/ to pass multiple-class and multiple-protocol info |
|
989 |
||
990 |
generator do:[:cls :cat :sel :mthd | |
|
991 |
mthd == aMethod ifTrue:[ |
|
992 |
mthd isSynthetic ifFalse:[ |
|
993 |
sel notNil ifTrue:[ |
|
11639 | 994 |
"/ cg: no longer filter those... |
995 |
"/ (packageFilter value isNil |
|
996 |
"/ or:[ packageFilter value includes:mthd package ]) ifTrue:[ |
|
10579 | 997 |
^ true |
11639 | 998 |
"/ ] |
10579 | 999 |
] |
1000 |
]. |
|
1001 |
^ false |
|
1002 |
] |
|
1003 |
]. |
|
1004 |
^ false |
|
1005 |
||
1006 |
"Created: / 17-08-2011 / 15:03:34 / cg" |
|
1007 |
! |
|
1008 |
||
5591 | 1009 |
listOfMethodNames |
10257 | 1010 |
|methods entries selectorBag newNameList allClasses newClasses |
1011 |
allCategories "allSelectors" |
|
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1012 |
generator doShowClass doShowClassFirst doShowCategory enforceClassAndProtocolInList |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1013 |
theMethod sortByClass anyMethodToWatch mclass |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1014 |
packageFilterValue nameListEntryForExtensions |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1015 |
suppressInheritanceInfoNow startTime| |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1016 |
|
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1017 |
suppressInheritanceInfoNow := (showMethodInheritance value ? true) not. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1018 |
startTime := Timestamp now. |
5591 | 1019 |
|
1020 |
generator := inGeneratorHolder value. |
|
10257 | 1021 |
generator isNil ifTrue:[ |
1022 |
^ #() |
|
1023 |
]. |
|
5591 | 1024 |
allClasses := IdentitySet new. |
10257 | 1025 |
allCategories := IdentitySet new. |
1026 |
||
5591 | 1027 |
"/ allSelectors := Set new. |
10257 | 1028 |
|
5591 | 1029 |
newClasses := IdentitySet new. |
1030 |
selectorBag := Bag new. |
|
1031 |
entries := OrderedCollection new. |
|
1032 |
enforceClassAndProtocolInList := false. |
|
1033 |
anyMethodToWatch := false. |
|
13803 | 1034 |
|
1035 |
"/ no longer filter those |
|
1036 |
"/ JV@2013-09-17: Why on hell not? A little explanation please!! |
|
1037 |
"/ Enabled again, because when i select package in a browser I expect |
|
1038 |
"/ to see only methods belonging to that package!! |
|
1039 |
packageFilterValue := packageFilter value. |
|
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1040 |
|
5591 | 1041 |
"/ generator generates nil-selector entries |
1042 |
"/ to pass multiple-class and multiple-protocol info |
|
11863 | 1043 |
nameListEntryForExtensions := self class nameListEntryForExtensions. |
1044 |
||
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1045 |
generator do:[:cls :cat :sel :mthd | |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1046 |
|categoryIsExtensionsPseudoCategory| |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1047 |
|
11863 | 1048 |
categoryIsExtensionsPseudoCategory := (cat = nameListEntryForExtensions). |
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1049 |
|
10257 | 1050 |
(cls isNil and:[ cat isNil and:[ sel isNil ] ]) ifTrue:[ |
1051 |
enforceClassAndProtocolInList := true |
|
1052 |
] ifFalse:[ |
|
1053 |
cls notNil ifTrue:[ |
|
1054 |
allClasses add:cls. |
|
1055 |
]. |
|
11863 | 1056 |
"/ cat notNil ifTrue:[ |
1057 |
"/ allCategories add:cat. |
|
1058 |
"/ ]. |
|
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1059 |
"/ JV: Filter method through package filter |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1060 |
"/ but not, if it is an extension method and we are showing extensions |
10257 | 1061 |
(mthd notNil |
13803 | 1062 |
and:[ (mthd isSynthetic not or:[showSyntheticMethods value == true]) |
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1063 |
and:[ sel notNil ]] |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1064 |
) ifTrue:[ |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1065 |
(packageFilterValue isNil |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1066 |
or:[ (packageFilterValue includes:mthd package) |
11914
0aee263d2bcd
comment/format in: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
11876
diff
changeset
|
1067 |
or:[ categoryIsExtensionsPseudoCategory and:[ mthd isExtension] ]] |
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1068 |
) ifTrue:[ |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1069 |
entries add:(Array with:cls with:sel with:mthd). |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1070 |
selectorBag add:sel. |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1071 |
newClasses add:cls. |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1072 |
|
11863 | 1073 |
allCategories add:mthd category. |
10674
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1074 |
"/ allSelectors add:sel. |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1075 |
] |
351c90b0a00e
changed: #listOfMethodNames
Claus Gittinger <cg@exept.de>
parents:
10640
diff
changeset
|
1076 |
] |
10257 | 1077 |
]. |
1078 |
(mthd notNil and:[ mthd isWrapped ]) ifTrue:[ |
|
1079 |
(mthd isTiming or:[ mthd isCounting or:[ mthd isCountingMemoryUsage ] ]) ifTrue:[ |
|
1080 |
anyMethodToWatch := true |
|
1081 |
] |
|
1082 |
]. |
|
1083 |
]. |
|
5591 | 1084 |
showMethodInheritance value ~~ false ifTrue:[ |
1085 |
"/ collect redefinition information once (big speedup for #methodIsRedefinedbelow) |
|
1086 |
classAndSelectorsRedefinedBySubclassesOfClass isNil ifTrue:[ |
|
1087 |
classAndSelectorsRedefinedBySubclassesOfClass := IdentityDictionary new. |
|
1088 |
]. |
|
10257 | 1089 |
allClasses do:[:cls | |
1090 |
|d| |
|
1091 |
||
5591 | 1092 |
d := classAndSelectorsRedefinedBySubclassesOfClass. |
1093 |
(d notNil and:[ (d includesKey:cls) not ]) ifTrue:[ |
|
8206 | 1094 |
cls isLoaded ifTrue:[ |
1095 |
d at:cls put:(self setOfAllSelectorsImplementedBelow:cls) |
|
1096 |
] |
|
5591 | 1097 |
] |
1098 |
]. |
|
1099 |
]. |
|
10257 | 1100 |
|
5591 | 1101 |
"/ multiple classes must: add the className for some |
10257 | 1102 |
|
1103 |
doShowClass := enforceClassAndProtocolInList or:[ allClasses size > 1 ]. |
|
1104 |
||
5591 | 1105 |
"/ multiple categories: must add the categorie for some |
10257 | 1106 |
|
11863 | 1107 |
doShowCategory := enforceClassAndProtocolInList or:[ allCategories size > 1 ]. |
1108 |
||
10257 | 1109 |
doShowClassFirst := doShowClass. |
5591 | 1110 |
doShowClassFirst := doShowClass and:[ sortBy value == #class ]. |
1111 |
sortBy value == false ifTrue:[ |
|
1112 |
"/ do not sort |
|
1113 |
] ifFalse:[ |
|
1114 |
(doShowClass not and:[ sortBy value == #class ]) ifTrue:[ |
|
1115 |
"/ multiple classes must add the className for some |
|
1116 |
"/ check, if doShowClass must be enforced |
|
10257 | 1117 |
entries do:[:entry | |
5591 | 1118 |
|cls sel mthd s needClass| |
1119 |
||
1120 |
cls := entry at:1. |
|
1121 |
sel := entry at:2. |
|
1122 |
mthd := entry at:3. |
|
1123 |
doShowClass ifFalse:[ |
|
1124 |
doShowClass := (selectorBag occurrencesOf:sel) > 1 |
|
1125 |
]. |
|
1126 |
]. |
|
1127 |
]. |
|
1128 |
sortByClass := doShowClass and:[ sortBy value == #class ]. |
|
1129 |
sortByClass ifTrue:[ |
|
10257 | 1130 |
entries |
1131 |
sort:[:a :b | |
|
1132 |
|nmA nmB clsNmA clsNmB nsNmA nsNmB| |
|
1133 |
||
1134 |
clsNmA := (a at:1) name. |
|
1135 |
clsNmB := (b at:1) name. |
|
1136 |
clsNmA = clsNmB ifTrue:[ |
|
1137 |
nmA := (a at:2) asSymbol selector. |
|
1138 |
nmB := (b at:2) asSymbol selector. |
|
1139 |
nmA = nmB ifTrue:[ |
|
1140 |
nsNmA := (a at:3) nameSpaceName. |
|
1141 |
nsNmB := (b at:3) nameSpaceName. |
|
1142 |
nsNmA < nsNmB |
|
1143 |
] ifFalse:[ nmA < nmB ] |
|
1144 |
] ifFalse:[ |
|
1145 |
clsNmA < clsNmB |
|
1146 |
] |
|
1147 |
]. |
|
5591 | 1148 |
] ifFalse:[ |
7610 | 1149 |
sortBy value == #category ifTrue:[ |
10257 | 1150 |
entries |
1151 |
sort:[:a :b | |
|
1152 |
|nmA nmB catA catB clsNmA clsNmB nsNmA nsNmB| |
|
1153 |
||
1154 |
catA := (a at:3) category. |
|
1155 |
catB := (b at:3) category. |
|
1156 |
catA = catB ifTrue:[ |
|
1157 |
nmA := (a at:2) asSymbol selector. |
|
1158 |
nmB := (b at:2) asSymbol selector. |
|
1159 |
nmA = nmB ifTrue:[ |
|
1160 |
clsNmA := (a at:1) name. |
|
1161 |
clsNmB := (b at:1) name. |
|
1162 |
clsNmA = clsNmB ifTrue:[ |
|
1163 |
nsNmA := (a at:3) nameSpaceName. |
|
1164 |
nsNmB := (b at:3) nameSpaceName. |
|
1165 |
nsNmA < nsNmB |
|
1166 |
] ifFalse:[ |
|
1167 |
clsNmA < clsNmB |
|
1168 |
] |
|
1169 |
] ifFalse:[ nmA < nmB ] |
|
1170 |
] ifFalse:[ |
|
1171 |
catA < catB |
|
1172 |
] |
|
1173 |
]. |
|
7610 | 1174 |
] ifFalse:[ |
10257 | 1175 |
entries |
1176 |
sort:[:a :b | |
|
1177 |
|nmA nmB clsNmA clsNmB nsNmA nsNmB| |
|
1178 |
||
1179 |
nmA := (a at:2) asSymbol selector. |
|
1180 |
nmB := (b at:2) asSymbol selector. |
|
1181 |
nmA = nmB ifTrue:[ |
|
1182 |
clsNmA := (a at:1) name. |
|
1183 |
clsNmB := (b at:1) name. |
|
1184 |
clsNmA = clsNmB ifTrue:[ |
|
1185 |
nsNmA := (a at:3) nameSpaceName. |
|
1186 |
nsNmB := (b at:3) nameSpaceName. |
|
1187 |
nsNmA < nsNmB |
|
1188 |
] ifFalse:[ |
|
1189 |
clsNmA < clsNmB |
|
1190 |
] |
|
1191 |
] ifFalse:[ nmA < nmB ] |
|
1192 |
]. |
|
7610 | 1193 |
]. |
5591 | 1194 |
]. |
1195 |
]. |
|
1196 |
methods := OrderedCollection new:(entries size). |
|
10257 | 1197 |
|
5591 | 1198 |
"/ first generate the new methodList, and see if it is different ... |
10257 | 1199 |
|
1200 |
entries do:[:entry | |
|
13803 | 1201 |
|sel mthd| |
5591 | 1202 |
|
1203 |
mthd := entry at:3. |
|
13803 | 1204 |
methods add:mthd. |
5591 | 1205 |
]. |
1206 |
false "methodList = methods" "does not care for changed icons" ifTrue:[ |
|
1207 |
"/ same list |
|
1208 |
newNameList := self browserNameList. |
|
1209 |
] ifFalse:[ |
|
1210 |
newNameList := OrderedCollection new:(entries size). |
|
10257 | 1211 |
|
5591 | 1212 |
"/ multiple classes must add the className for some |
10257 | 1213 |
|
1214 |
entries do:[:entry | |
|
5591 | 1215 |
|cls sel mthd s needClass| |
1216 |
||
1217 |
cls := entry at:1. |
|
1218 |
sel := entry at:2. |
|
1219 |
mthd := entry at:3. |
|
1220 |
needClass := doShowClass. |
|
10257 | 1221 |
|
5591 | 1222 |
"/ needClass ifFalse:[ |
1223 |
"/ needClass := (selectorBag occurrencesOf:sel) > 1 |
|
1224 |
"/ ]. |
|
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1225 |
(suppressInheritanceInfoNow not |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1226 |
and:[ (Timestamp now deltaFrom:startTime) > 3 seconds ]) ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1227 |
suppressInheritanceInfoNow := true. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1228 |
]. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1229 |
|
5591 | 1230 |
s := self |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1231 |
listEntryForMethod:mthd |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1232 |
selector:sel |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1233 |
class:cls |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1234 |
showClass:needClass |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1235 |
showCategory:doShowCategory |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1236 |
classFirst:doShowClassFirst |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1237 |
suppressInheritanceInfo:suppressInheritanceInfoNow. |
10257 | 1238 |
|
5591 | 1239 |
newNameList add:s. |
1240 |
]. |
|
1241 |
]. |
|
1242 |
self makeIndependent. |
|
1243 |
classes := newClasses. |
|
1244 |
self makeDependent. |
|
1245 |
methodList := methods. |
|
1246 |
methods size == 1 ifTrue:[ |
|
1247 |
theMethod := methods first. |
|
1248 |
mclass := theMethod mclass. |
|
1249 |
mclass isNil ifTrue:[ |
|
1250 |
theMethod isWrapped ifTrue:[ |
|
1251 |
theMethod := theMethod originalMethod. |
|
1252 |
mclass := theMethod mclass. |
|
1253 |
]. |
|
1254 |
]. |
|
10257 | 1255 |
self methodLabelHolder value:(mclass isNil |
1256 |
ifTrue:[ ('???' , ' ' , '???') ] |
|
1257 |
ifFalse:[ (mclass name , ' ' , theMethod selector) ]) |
|
5591 | 1258 |
]. |
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1259 |
"/ anyMethodToWatch ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1260 |
"/ self startWatchProcess. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1261 |
"/ ] ifFalse:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1262 |
"/ self stopWatchProcess. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1263 |
"/ ]. |
10257 | 1264 |
|
5591 | 1265 |
"/ remember these, in case of an incremental (single method only) |
1266 |
"/ update in the future. |
|
10257 | 1267 |
|
5591 | 1268 |
lastShowClass := doShowClass. |
1269 |
lastShowClassFirst := doShowClassFirst. |
|
1270 |
lastShowCategory := doShowCategory. |
|
1271 |
^ newNameList. |
|
1272 |
||
7610 | 1273 |
"Created: / 05-02-2000 / 22:43:40 / cg" |
10257 | 1274 |
"Modified: / 24-08-2010 / 20:34:09 / Jan Vrany <enter your email here>" |
11639 | 1275 |
"Modified: / 20-07-2012 / 20:00:58 / cg" |
13803 | 1276 |
"Modified (comment): / 17-09-2013 / 10:31:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1277 |
! |
1278 |
||
1279 |
makeDependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
1280 |
environment addDependent:self. |
7502 | 1281 |
"/ ChangeSet addDependent:self. |
1282 |
||
1283 |
"Modified: / 10-11-2006 / 17:57:01 / cg" |
|
5591 | 1284 |
! |
1285 |
||
1286 |
makeIndependent |
|
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13384
diff
changeset
|
1287 |
environment removeDependent:self. |
8218 | 1288 |
"/ ChangeSet removeDependent:self. |
5591 | 1289 |
! |
1290 |
||
1291 |
method:mthd includesModsOfClassVariable:variablesToHighLight |
|
1292 |
^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#modifiedClassVars |
|
1293 |
! |
|
1294 |
||
1295 |
method:mthd includesModsOfInstanceVariable:variablesToHighLight |
|
1296 |
^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#modifiedInstVars |
|
1297 |
! |
|
1298 |
||
1299 |
method:mthd includesRefsToClassVariable:variablesToHighLight |
|
1300 |
^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#usedClassVars |
|
1301 |
! |
|
1302 |
||
1303 |
method:mthd includesRefsToInstanceVariable:variablesToHighLight |
|
1304 |
^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#usedInstVars |
|
1305 |
! |
|
1306 |
||
1307 |
method:mthd includesRefsToVariable:variablesToHighLight askParserWith:querySelector |
|
1308 |
|cls src parser usedVars anyVarNameAccessable| |
|
1309 |
||
1310 |
cls := mthd mclass. |
|
5885 | 1311 |
cls isNil ifTrue:[^ false]. |
1312 |
||
5591 | 1313 |
anyVarNameAccessable := cls allInstVarNames includesAny:variablesToHighLight. |
1314 |
anyVarNameAccessable ifFalse:[ |
|
5885 | 1315 |
anyVarNameAccessable := cls theNonMetaclass allClassVarNames includesAny:variablesToHighLight. |
5591 | 1316 |
]. |
1317 |
anyVarNameAccessable ifFalse:[ |
|
5885 | 1318 |
"/ no need to parse |
1319 |
^ false |
|
5591 | 1320 |
]. |
1321 |
||
13526
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1322 |
"/ JV Following code is just very bad. It assumes that method is a Smalltalk method. |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1323 |
"/ But it may not, it could be JavaScript method, Java method or whatever fancy language |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1324 |
"/ method. Should be actually delegated to the method itself, just as #messagesSend & co. |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1325 |
|
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1326 |
"/ I'm not going to refactor now to keep the differences between jv-branch and CVS |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1327 |
"/ ss small as possible. This interface is bad anyway as method is parsed several times |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1328 |
"/ to check different things. Once should be enough. |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1329 |
|
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1330 |
"/ Hack: |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1331 |
|
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1332 |
mthd programmingLanguage isSmalltalk ifFalse:[ |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1333 |
^ [ |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1334 |
usedVars := mthd perform:querySelector. |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1335 |
usedVars includesAny:variablesToHighLight |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1336 |
] on: Error do:[ |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1337 |
false |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1338 |
] |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1339 |
]. |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1340 |
|
5591 | 1341 |
src := mthd source. |
1342 |
src notNil ifTrue:[ |
|
5885 | 1343 |
" |
1344 |
before doing a slow parse, quickly scan the |
|
1345 |
methods source for the variables name ... |
|
1346 |
" |
|
1347 |
(variablesToHighLight contains:[:varName | (src findString:varName) ~~ 0]) ifTrue:[ |
|
1348 |
parser := Parser |
|
13526
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1349 |
parseMethod:src |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1350 |
in:cls |
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1351 |
ignoreErrors:true |
5885 | 1352 |
ignoreWarnings:true. |
1353 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
|
1354 |
usedVars := parser perform:querySelector. |
|
1355 |
(usedVars includesAny:variablesToHighLight) |
|
1356 |
ifTrue:[ |
|
1357 |
^ true |
|
1358 |
] |
|
1359 |
] |
|
1360 |
] |
|
5591 | 1361 |
]. |
1362 |
^ false |
|
13526
a53e939bd20e
Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
1363 |
|
13803 | 1364 |
"Modified: / 30-08-2013 / 13:46:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1365 |
! |
1366 |
||
1367 |
methodIsInheritedFromAbove:aMethod |
|
1368 |
|mClass| |
|
1369 |
||
1370 |
mClass := aMethod mclass. |
|
1371 |
(mClass notNil and:[mClass superclass notNil]) ifTrue:[ |
|
6789 | 1372 |
^ (mClass superclass whichClassIncludesSelector:aMethod selector) notNil. |
5591 | 1373 |
]. |
1374 |
^ false |
|
1375 |
! |
|
1376 |
||
1377 |
methodIsRedefinedBelow:aMethod |
|
1378 |
|mclass subClasses setOfRedefinedSelectors| |
|
1379 |
||
1380 |
mclass := aMethod mclass. |
|
1381 |
mclass isNil ifTrue:[^ false]. |
|
1382 |
||
1383 |
"/ if possible, make use of info prepared by listOfMethodNames |
|
1384 |
classAndSelectorsRedefinedBySubclassesOfClass notNil |
|
1385 |
ifTrue:[ |
|
9004
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1386 |
setOfRedefinedSelectors := classAndSelectorsRedefinedBySubclassesOfClass at:mclass ifAbsent:nil. |
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1387 |
setOfRedefinedSelectors notNil ifTrue:[ |
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1388 |
^ setOfRedefinedSelectors includes:aMethod selector |
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1389 |
] |
5591 | 1390 |
]. |
1391 |
||
1392 |
lastMethodClass == mclass ifTrue:[ |
|
9004
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1393 |
subClasses := lastMethodClassesSubclasses |
5591 | 1394 |
] ifFalse:[ |
9004
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1395 |
subClasses := aMethod mclass allSubclasses. |
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1396 |
lastMethodClassesSubclasses := subClasses. |
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1397 |
lastMethodClass := mclass. |
5591 | 1398 |
]. |
9004
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1399 |
^ subClasses contains:[:cls | cls includesSelector:aMethod selector]. |
5591 | 1400 |
! |
1401 |
||
1402 |
redefinedOrInheritedIconFor:aMethod |
|
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1403 |
|inherited redefined subclassResponsibility| |
5591 | 1404 |
|
1405 |
inherited := self methodIsInheritedFromAbove:aMethod. |
|
1406 |
redefined := self methodIsRedefinedBelow:aMethod. |
|
1407 |
||
1408 |
inherited ifTrue:[ |
|
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1409 |
redefined ifTrue:[ |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1410 |
^ self methodInheritedFromAboveAndRedefinedBelowIcon. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1411 |
]. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1412 |
^ self methodInheritedFromAboveIcon. |
5591 | 1413 |
]. |
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1414 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1415 |
subclassResponsibility := aMethod sends:#subclassResponsibility. |
5591 | 1416 |
redefined ifTrue:[ |
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1417 |
subclassResponsibility ifTrue:[ |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1418 |
^ self methodIsSubclassResponsibilityAndRedefinedBelowIcon. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1419 |
]. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1420 |
^ self methodRedefinedBelowIcon. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1421 |
]. |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1422 |
subclassResponsibility ifTrue:[ |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5591
diff
changeset
|
1423 |
^ self methodIsSubclassResponsibilityIcon. |
5591 | 1424 |
]. |
1425 |
||
1426 |
^ self methodEmptyInheritedIcon |
|
1427 |
! |
|
1428 |
||
1429 |
release |
|
1430 |
super release. |
|
1431 |
||
1432 |
filterClassVars removeDependent:self. |
|
1433 |
selectedMethodNameIndices removeDependent:self. |
|
1434 |
showMethodInheritance removeDependent:self. |
|
1435 |
variableFilter removeDependent:self. |
|
1436 |
! |
|
1437 |
||
1438 |
resourceIconForMethod:aMethod |
|
6903 | 1439 |
^ SystemBrowser resourceIconForMethod:aMethod |
5591 | 1440 |
|
6903 | 1441 |
"Modified: / 17-08-2006 / 09:09:01 / cg" |
5591 | 1442 |
! |
1443 |
||
1444 |
setOfAllSelectorsImplementedBelow:aClass |
|
1445 |
|set| |
|
1446 |
||
1447 |
set := IdentitySet new. |
|
1448 |
aClass allSubclassesDo:[:eachSubclass | |
|
10388 | 1449 |
set addAll:(eachSubclass methodDictionary keys). |
5591 | 1450 |
]. |
1451 |
^ set |
|
1452 |
! |
|
1453 |
||
1454 |
updateList |
|
1455 |
|prevSelection newList newSelection newSelIdx reverseMap sameContents newListSize oldListSize |
|
1456 |
prevClasses methodSet selectedMethodsHolder| |
|
1457 |
||
1458 |
selectedMethodsHolder := self selectedMethods. |
|
1459 |
prevSelection := selectedMethodsHolder value ? #(). |
|
1460 |
||
12567 | 1461 |
prevClasses := classes isNil ifTrue:[ #() ] ifFalse:[ classes copy ]. |
5591 | 1462 |
|
1463 |
oldListSize := self browserNameList size. |
|
1464 |
||
12567 | 1465 |
self topApplication withWaitCursorDo:[ |
1466 |
newList := self listOfMethodNames. |
|
1467 |
]. |
|
1468 |
newListSize := newList size. |
|
1469 |
sameContents := self updateListFor:newList. |
|
5591 | 1470 |
|
12567 | 1471 |
sameContents ifFalse:[ |
1472 |
"/ self browserNameList value:newList. |
|
5591 | 1473 |
|
12567 | 1474 |
(prevSelection size == 0 |
1475 |
and:[selectedMethodsHolder value size ~~ 0]) ifTrue:[ |
|
1476 |
"/ this happens during early startup time, |
|
1477 |
"/ when the selection is already (pre-)set, |
|
1478 |
"/ and the methodList is generated the first time |
|
1479 |
"/ (i.e. when opened with preset selection |
|
5591 | 1480 |
|
12567 | 1481 |
"/ do not clobber the selection in this case. |
1482 |
prevSelection := selectedMethodsHolder value. |
|
1483 |
]. |
|
5591 | 1484 |
|
12567 | 1485 |
(methodList size == 0 or:[prevSelection size == 0]) ifTrue:[ |
1486 |
newSelection := #() |
|
1487 |
] ifFalse:[ |
|
1488 |
methodSet := methodList. |
|
5591 | 1489 |
|
12567 | 1490 |
"/ intersect is much faster with sets, if the number of items is large |
1491 |
"/ however, only if its worth building the set ... |
|
1492 |
(methodSet size + prevSelection size) > 35 ifTrue:[ |
|
1493 |
methodSet := methodSet asIdentitySet. |
|
1494 |
]. |
|
1495 |
newSelection := methodSet intersect:prevSelection. |
|
1496 |
]. |
|
1497 |
newSelection size > 0 ifTrue:[ |
|
1498 |
newSelection size > 100 ifTrue:[ |
|
1499 |
"/ need selection indices - might be expensive if done straight forward... |
|
1500 |
reverseMap := IdentityDictionary new. |
|
1501 |
methodList keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx]. |
|
1502 |
newSelIdx := newSelection collect:[:mthd | reverseMap at:mthd]. |
|
1503 |
] ifFalse:[ |
|
1504 |
newSelIdx := newSelection collect:[:mthd | methodList identityIndexOf:mthd] |
|
1505 |
]. |
|
1506 |
"/ self halt. |
|
1507 |
"/ force change (for dependents) |
|
1508 |
newSelIdx ~= selectedMethodNameIndices value ifTrue:[ |
|
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
1509 |
self selectedMethodNameIndices value:newSelIdx. |
7702 | 1510 |
]. |
12567 | 1511 |
] ifFalse:[ |
1512 |
lastSelectedMethods := selectedMethodsHolder value. |
|
1513 |
lastSelectedMethods notNil ifTrue:[ |
|
1514 |
lastSelectedMethods := lastSelectedMethods asOrderedCollection |
|
7702 | 1515 |
]. |
12567 | 1516 |
selectedMethodNameIndices value size > 0 ifTrue:[ |
1517 |
selectedMethodNameIndices value:#(). |
|
1518 |
] |
|
1519 |
]. |
|
5591 | 1520 |
|
12567 | 1521 |
newSelection ~= prevSelection ifTrue:[ |
1522 |
self selectionChanged. |
|
1523 |
] |
|
1524 |
] ifTrue:[ |
|
1525 |
"/ same list - but classes might have changed |
|
1526 |
"/ that is the case, if the class selection has been changed, |
|
1527 |
"/ to another class which has the same categories. |
|
1528 |
||
1529 |
(prevClasses ~= (classes ? IdentitySet new)) ifTrue:[ |
|
1530 |
(newListSize > 0 or:[oldListSize > 0]) ifTrue:[ |
|
7702 | 1531 |
self selectionChanged. |
1532 |
] |
|
1533 |
] |
|
12567 | 1534 |
] |
5591 | 1535 |
|
7702 | 1536 |
"Modified: / 05-03-2007 / 16:07:24 / cg" |
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
1537 |
"Modified: / 24-02-2014 / 11:08:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5591 | 1538 |
! |
1539 |
||
1540 |
updateListEntryFor:aMethod |
|
1541 |
"update my list for a single method. |
|
1542 |
(used when a single methods package, code or whatever changes, and a full udpate |
|
1543 |
would be too slow)" |
|
1544 |
||
13803 | 1545 |
|s idx| |
1546 |
||
1547 |
s := self |
|
1548 |
listEntryForMethod:aMethod |
|
1549 |
selector:aMethod selector |
|
1550 |
class:aMethod mclass |
|
1551 |
showClass:lastShowClass |
|
1552 |
showCategory:lastShowCategory |
|
1553 |
classFirst:lastShowClassFirst |
|
1554 |
suppressInheritanceInfo:false. |
|
5591 | 1555 |
|
1556 |
idx := methodList identityIndexOf:aMethod. |
|
1557 |
idx == 0 ifTrue:[ |
|
6268 | 1558 |
aMethod isWrapped ifTrue:[ |
1559 |
idx := methodList identityIndexOf:aMethod originalMethod. |
|
10549
1f387878f9c6
changed: #updateListEntryFor:
Claus Gittinger <cg@exept.de>
parents:
10388
diff
changeset
|
1560 |
idx == 0 ifTrue:[ |
1f387878f9c6
changed: #updateListEntryFor:
Claus Gittinger <cg@exept.de>
parents:
10388
diff
changeset
|
1561 |
"/ aMethod (wrapped) has changed its status, but is not in the list. |
1f387878f9c6
changed: #updateListEntryFor:
Claus Gittinger <cg@exept.de>
parents:
10388
diff
changeset
|
1562 |
^ self. |
1f387878f9c6
changed: #updateListEntryFor:
Claus Gittinger <cg@exept.de>
parents:
10388
diff
changeset
|
1563 |
]. |
6268 | 1564 |
] |
5591 | 1565 |
]. |
1566 |
idx == 0 ifTrue:[ |
|
10579 | 1567 |
"/ method was not previously shown; try to avoid a full update |
1568 |
(self isMethodToBeShown:aMethod) ifTrue:[ |
|
1569 |
self invalidateList |
|
1570 |
]. |
|
5591 | 1571 |
] ifFalse:[ |
6268 | 1572 |
self browserNameList at:idx put:s. |
5591 | 1573 |
] |
10549
1f387878f9c6
changed: #updateListEntryFor:
Claus Gittinger <cg@exept.de>
parents:
10388
diff
changeset
|
1574 |
|
10579 | 1575 |
"Modified: / 17-08-2011 / 15:05:02 / cg" |
5591 | 1576 |
! ! |
1577 |
||
6271 | 1578 |
!MethodList methodsFor:'private-presentation'! |
1579 |
||
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1580 |
colorForCoverageInformationOfMethod:aMethod |
9430 | 1581 |
aMethod isInstrumented ifFalse:[^ nil]. |
9448
f9258f99d465
changed: #emphasisForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9438
diff
changeset
|
1582 |
aMethod category = 'documentation' ifTrue:[^ nil]. |
9430 | 1583 |
|
1584 |
aMethod hasBeenCalled ifTrue:[ |
|
1585 |
aMethod haveAllBlocksBeenExecuted ifTrue:[ |
|
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1586 |
^ UserPreferences current colorForInstrumentedFullyCoveredCode |
9430 | 1587 |
]. |
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1588 |
^ UserPreferences current colorForInstrumentedPartiallyCoveredCode |
9430 | 1589 |
]. |
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1590 |
^ UserPreferences current colorForInstrumentedNeverCalledCode |
9430 | 1591 |
|
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1592 |
"Created: / 30-04-2010 / 11:53:38 / cg" |
9430 | 1593 |
! |
1594 |
||
6271 | 1595 |
listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst |
1596 |
"answer a method list entry |
|
1597 |
gimmics: |
|
1598 |
adding a little image to breakPointed methods, |
|
1599 |
inheritance indicators, |
|
1600 |
highlight accessors of variable" |
|
1601 |
||
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1602 |
^ self |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1603 |
listEntryForMethod:aMethod |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1604 |
selector:selector |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1605 |
class:cls |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1606 |
showClass:showClass showCategory:showCategory |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1607 |
classFirst:showClassFirst |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1608 |
suppressInheritanceInfo:false |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1609 |
! |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1610 |
|
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1611 |
listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst suppressInheritanceInfo:suppressInheritanceInfo |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1612 |
"answer a method list entry |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1613 |
gimmics: |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1614 |
adding a little image to breakPointed methods, |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1615 |
inheritance indicators, |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1616 |
highlight accessors of variable" |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1617 |
|
12036 | 1618 |
|s icn variablesToHighlight classVarsToHighLight |
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1619 |
doHighLight doHighLightRed clr emp cat l redefIcon |
12052 | 1620 |
metrics complexity complexityString complexityIcon mark lastResultOrNil| |
6271 | 1621 |
|
9038
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1622 |
aMethod isNil ifTrue:[ |
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1623 |
"/ a non-existing (pseudo) method (such as required protocol) |
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1624 |
^ selector colorizeAllWith:Color red. |
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1625 |
]. |
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1626 |
|
12036 | 1627 |
showClassFirst ifTrue:[ |
13803 | 1628 |
s := aMethod printStringForBrowserWithSelector:selector allBold inClass:cls. |
12036 | 1629 |
s := cls nameInBrowser , ' ' , s |
8638 | 1630 |
] ifFalse:[ |
1631 |
s := aMethod printStringForBrowserWithSelector:selector inClass:cls. |
|
1632 |
]. |
|
6271 | 1633 |
|
1634 |
"/ |
|
12505 | 1635 |
"/ wrap icons (i.e. break- or trace points on the method) |
6271 | 1636 |
"/ have higher prio ... |
1637 |
"/ |
|
9038
9b56d0b8c38e
required missing protocol display
Claus Gittinger <cg@exept.de>
parents:
9004
diff
changeset
|
1638 |
(aMethod notNil and:[aMethod isWrapped]) ifTrue:[ |
6271 | 1639 |
(s endsWith:' !!') ifTrue:[ |
12701
2fb888a69712
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
12673
diff
changeset
|
1640 |
s := s copyButLast:2 |
6271 | 1641 |
]. |
1642 |
aMethod isBreakpointed ifTrue:[ |
|
1643 |
icn := self stopIcon |
|
1644 |
] ifFalse:[ |
|
1645 |
aMethod isTimed ifTrue:[ |
|
1646 |
icn := self timeIcon |
|
1647 |
] ifFalse:[ |
|
1648 |
icn := self traceIcon |
|
1649 |
] |
|
1650 |
]. |
|
1651 |
]. |
|
1652 |
||
12505 | 1653 |
"/ |
1654 |
"/ breakpoint icons (i.e. break- or trace points inside) |
|
1655 |
"/ |
|
1656 |
icn isNil ifTrue:[ |
|
1657 |
(aMethod notNil and:[aMethod isMethodWithBreakpoints]) ifTrue:[ |
|
1658 |
icn := self breakPointedIcon |
|
1659 |
]. |
|
1660 |
]. |
|
1661 |
||
6271 | 1662 |
icn isNil ifTrue:[ |
8198 | 1663 |
self showImageResourceMethodsImages value ~~ false ifTrue:[ |
9252
ee7770f155ca
changed: #listEntryForMethod:selector:class:showClass:showCategory:classFirst:
Claus Gittinger <cg@exept.de>
parents:
9038
diff
changeset
|
1664 |
(aMethod hasImageResource) ifTrue:[ |
8474 | 1665 |
aMethod mclass isMeta ifTrue:[ |
1666 |
icn := aMethod valueWithReceiver:nil arguments:nil . |
|
8197
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1667 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1668 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1669 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1670 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1671 |
|
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1672 |
icn isNil ifTrue:[ |
6271 | 1673 |
showMethodTypeIcon value ~~ false ifTrue:[ |
1674 |
icn := self resourceIconForMethod:aMethod. |
|
1675 |
]. |
|
1676 |
icn isNil ifTrue:[ |
|
1677 |
aMethod isProtected ifTrue:[ |
|
1678 |
icn := self protectedMethodIcon |
|
1679 |
] ifFalse:[ |
|
1680 |
aMethod isPrivate ifTrue:[ |
|
1681 |
icn := self privateMethodIcon |
|
1682 |
] ifFalse:[ |
|
1683 |
(aMethod isIgnored) ifTrue:[ |
|
1684 |
icn := self ignoredMethodIcon |
|
1685 |
] ifFalse:[ |
|
1686 |
(aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[ |
|
1687 |
icn := self abstractMethodIcon |
|
1688 |
] |
|
1689 |
] |
|
1690 |
] |
|
1691 |
]. |
|
1692 |
]. |
|
1693 |
]. |
|
1694 |
icn isNil ifTrue:[ |
|
1695 |
(selector startsWith:'test') ifTrue:[ |
|
10257 | 1696 |
((cls isSubclassOf:TestCase) |
1697 |
and:[cls isAbstract not]) ifTrue:[ |
|
10861 | 1698 |
"JV@2011-11-17: Show thumbs even if not all test were run" |
12052 | 1699 |
|
1700 |
lastResultOrNil := cls rememberedOutcomeFor:selector. |
|
1701 |
lastResultOrNil notNil ifTrue:[ |
|
12632 | 1702 |
|state| |
1703 |
||
1704 |
state := lastResultOrNil result. |
|
1705 |
(state == TestResult statePass) ifTrue:[ |
|
12730 | 1706 |
icn := ToolbarIconLibrary testCasePassedIcon |
6271 | 1707 |
] ifFalse:[ |
12730 | 1708 |
(state == TestResult stateError) ifTrue:[ |
1709 |
icn := ToolbarIconLibrary testCaseErrorIcon |
|
12632 | 1710 |
] ifFalse:[ |
12730 | 1711 |
(state == TestResult stateFail) ifTrue:[ |
1712 |
icn := ToolbarIconLibrary testCaseFailedIcon |
|
1713 |
] ifFalse:[ |
|
1714 |
icn := ToolbarIconLibrary testCaseSkippedIcon |
|
1715 |
] |
|
12052 | 1716 |
] |
1717 |
] |
|
1718 |
]. |
|
6271 | 1719 |
]. |
1720 |
] |
|
1721 |
]. |
|
1722 |
||
1723 |
showClass ifTrue:[ |
|
1724 |
showClassFirst ifFalse:[ |
|
1725 |
s := s , ' [' , cls name allBold , ']'. |
|
1726 |
] |
|
1727 |
]. |
|
13803 | 1728 |
(showCategory and:[aMethod mclass supportsMethodCategories]) ifTrue:[ |
6271 | 1729 |
cat := aMethod category. |
1730 |
cat notNil ifTrue:[ |
|
11863 | 1731 |
s := s , ' {' , (cat "asText allItalic" colorizeAllWith:Color grey), '}' |
6271 | 1732 |
] |
1733 |
]. |
|
7502 | 1734 |
|
10257 | 1735 |
self showCoverageInformation value ifTrue:[ |
9451
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1736 |
clr := self colorForCoverageInformationOfMethod:aMethod. |
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1737 |
clr notNil ifTrue:[ |
79d033f585b9
added: #colorForCoverageInformationOfMethod:
Claus Gittinger <cg@exept.de>
parents:
9448
diff
changeset
|
1738 |
s := self colorize:s with:(#color->clr). |
9430 | 1739 |
"/ aMethod isInstrumented ifTrue:[ |
1740 |
"/ icn := self instrumentationIcon |
|
1741 |
"/ ]. |
|
1742 |
]. |
|
13803 | 1743 |
] ifFalse:[ |
9430 | 1744 |
(ChangeSet current includesChangeForClass:cls selector:selector) ifTrue:[ |
1745 |
mark := self class markForBeingInChangeList. |
|
1746 |
"/ mark := self colorizeForChangedCode:mark. |
|
1747 |
s := s , mark. |
|
1748 |
"/ cg: I dont know why this was disabled - it is req'd to |
|
1749 |
"/ see changed methods in a method list (implementors...) |
|
1750 |
s := self colorizeForChangedCode:s. |
|
1751 |
]. |
|
13803 | 1752 |
|
9430 | 1753 |
(SmallTeam notNil and:[SmallTeam includesChangeForClass:cls selector:selector]) ifTrue:[ |
1754 |
s := (self colorizeForChangedCodeInSmallTeam:'!! '),s |
|
1755 |
]. |
|
6841
6d72f92ed6cd
mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents:
6789
diff
changeset
|
1756 |
]. |
6271 | 1757 |
|
1758 |
variablesToHighlight := variableFilter value. |
|
1759 |
variablesToHighlight size > 0 ifTrue:[ |
|
1760 |
classVarsToHighLight := filterClassVars value. |
|
1761 |
classVarsToHighLight ifTrue:[ |
|
1762 |
doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight. |
|
1763 |
doHighLight ifTrue:[ |
|
1764 |
doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight. |
|
1765 |
]. |
|
1766 |
] ifFalse:[ |
|
1767 |
doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight. |
|
1768 |
doHighLight ifTrue:[ |
|
1769 |
doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight |
|
1770 |
] |
|
1771 |
]. |
|
1772 |
doHighLight ifTrue:[ |
|
1773 |
s := s allBold. |
|
1774 |
doHighLightRed ifTrue:[ |
|
1775 |
emp := (UserPreferences current emphasisForWrittenVariable) |
|
1776 |
] ifFalse:[ |
|
1777 |
emp := (UserPreferences current emphasisForReadVariable) |
|
1778 |
]. |
|
1779 |
s := s emphasisAllAdd:emp |
|
1780 |
] |
|
1781 |
]. |
|
1782 |
||
6694 | 1783 |
(showMethodComplexity value == true |
6271 | 1784 |
and:[ OOM::MethodMetrics notNil ]) ifTrue:[ |
8197
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1785 |
icn isNil ifTrue:[ |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1786 |
metrics := OOM::MethodMetrics forMethod:aMethod. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1787 |
complexity := metrics complexity ? 0. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1788 |
complexityIcon := OOM::MethodMetrics iconForComplexity:complexity. |
6271 | 1789 |
|
8197
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1790 |
ShowComplexityValue == true ifTrue:[ |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1791 |
complexityString := '{' , complexity printString , '}'. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1792 |
s := complexityString , ' ' , s. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1793 |
]. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1794 |
"/ icn := icn ? complexityIcon. |
3b1c5bd94fdd
preps for showResourceImages
Claus Gittinger <cg@exept.de>
parents:
7994
diff
changeset
|
1795 |
s := LabelAndIcon icon:complexityIcon string:s. |
6271 | 1796 |
]. |
1797 |
]. |
|
1798 |
||
12047
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1799 |
(showMethodInheritance value ? true) ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1800 |
suppressInheritanceInfo ifTrue:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1801 |
redefIcon := self methodEmptyInheritedIcon. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1802 |
] ifFalse:[ |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1803 |
redefIcon := self redefinedOrInheritedIconFor:aMethod. |
1e30b680fe27
suppress inheritance info after 3seconds
Claus Gittinger <cg@exept.de>
parents:
12036
diff
changeset
|
1804 |
]. |
6271 | 1805 |
]. |
1806 |
||
1807 |
(icn notNil or:[redefIcon notNil]) ifTrue:[ |
|
10257 | 1808 |
"/eXept version |
1809 |
"/l := LabelAndIcon icon:redefIcon string:s. |
|
1810 |
"/l image:icn. |
|
1811 |
"/JV: |
|
1812 |
l := LabelAndIcon icon:icn string:s. |
|
1813 |
l image:redefIcon. |
|
11385
099b8067afcb
changed: #listEntryForMethod:selector:class:showClass:showCategory:classFirst:
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1814 |
icn isNil ifTrue:[l offset: 13]. |
10257 | 1815 |
l gap:1. |
6271 | 1816 |
^ l |
1817 |
]. |
|
1818 |
^ s |
|
1819 |
||
6841
6d72f92ed6cd
mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents:
6789
diff
changeset
|
1820 |
"Created: / 22-10-1996 / 19:51:00 / cg" |
10257 | 1821 |
"Modified: / 15-08-2009 / 13:13:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
11385
099b8067afcb
changed: #listEntryForMethod:selector:class:showClass:showCategory:classFirst:
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1822 |
"Modified: / 07-03-2012 / 19:06:09 / cg" |
13803 | 1823 |
"Modified: / 16-10-2013 / 01:10:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6271 | 1824 |
! ! |
1825 |
||
5591 | 1826 |
!MethodList methodsFor:'private-watching'! |
1827 |
||
1828 |
startWatchProcess |
|
1829 |
updateProcess notNil ifTrue:[ |
|
10388 | 1830 |
^ self |
5591 | 1831 |
]. |
1832 |
updateProcess := [ |
|
10388 | 1833 |
[true] whileTrue:[ |
1834 |
Delay waitForSeconds:1. |
|
1835 |
self enqueueDelayedUpdateList |
|
1836 |
] |
|
1837 |
] fork. |
|
5591 | 1838 |
! |
1839 |
||
1840 |
stopWatchProcess |
|
1841 |
|p| |
|
1842 |
||
1843 |
(p := updateProcess) notNil ifTrue:[ |
|
10388 | 1844 |
updateProcess := nil. |
1845 |
p terminate |
|
5591 | 1846 |
]. |
1847 |
! ! |
|
1848 |
||
1849 |
!MethodList methodsFor:'setup'! |
|
1850 |
||
1851 |
postBuildWith:aBuilder |
|
1852 |
|methodListView| |
|
1853 |
||
1854 |
super postBuildWith:aBuilder. |
|
1855 |
||
1856 |
methodListView := aBuilder componentAt:'List'. |
|
1857 |
methodListView notNil ifTrue:[ |
|
6277 | 1858 |
methodListView allowDrag:true. |
1859 |
methodListView dragObjectConverter:[:obj | |
|
1860 |
|nm method idx| |
|
5591 | 1861 |
|
6277 | 1862 |
nm := obj theObject asString string string. |
1863 |
idx := browserNameList value findFirst:[:item | item string string = nm]. |
|
1864 |
method := methodList value at:idx. |
|
1865 |
DropObject newMethod:method. |
|
1866 |
]. |
|
5591 | 1867 |
] |
1868 |
! ! |
|
1869 |
||
1870 |
!MethodList class methodsFor:'documentation'! |
|
1871 |
||
10363 | 1872 |
version |
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
1873 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.96 2014-02-25 10:41:22 vrany Exp $' |
10363 | 1874 |
! |
1875 |
||
9004
fbd6a4c325f6
changed: #methodIsRedefinedBelow:
Claus Gittinger <cg@exept.de>
parents:
8644
diff
changeset
|
1876 |
version_CVS |
14024
877fd52ae84b
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13803
diff
changeset
|
1877 |
^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.96 2014-02-25 10:41:22 vrany Exp $' |
5591 | 1878 |
! ! |
12505 | 1879 |