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