author | Claus Gittinger <cg@exept.de> |
Sat, 30 Mar 2013 01:09:35 +0100 | |
changeset 12575 | 7fd56ce01f68 |
parent 12504 | abf0ab5f5941 |
child 12621 | a0af9112b051 |
child 12626 | 7ae48abfedac |
permissions | -rw-r--r-- |
36 | 1 |
" |
2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
4158 | 3 |
All Rights Reserved |
36 | 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 |
" |
|
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
13 |
|
85 | 14 |
ApplicationModel subclass:#SystemBrowser |
4165 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'CheckForInstancesWhenRemovingClasses ClassHistory |
|
17 |
EmphasisForDifferentPackage EmphasisForModifiedBuffer |
|
18 |
EmphasisForObsoleteCode EmphasisForReadVariable |
|
11271 | 19 |
EmphasisForWrittenVariable EmphasisForChangedCode |
20 |
LastSearchPatterns' |
|
4165 | 21 |
poolDictionaries:'' |
22 |
category:'Interface-Browsers' |
|
36 | 23 |
! |
24 |
||
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
25 |
Object subclass:#BrowserHistoryEntry |
4165 | 26 |
instanceVariableNames:'className meta selector' |
27 |
classVariableNames:'' |
|
28 |
poolDictionaries:'' |
|
29 |
privateIn:SystemBrowser |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
30 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
31 |
|
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
32 |
!SystemBrowser class methodsFor:'documentation'! |
203 | 33 |
|
34 |
copyright |
|
35 |
" |
|
36 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
4158 | 37 |
All Rights Reserved |
203 | 38 |
|
39 |
This software is furnished under a license and may be used |
|
40 |
only in accordance with the terms of that license and with the |
|
41 |
inclusion of the above copyright notice. This software may not |
|
42 |
be provided or otherwise made available to, or used by, any |
|
43 |
other person. No title to or ownership of the software is |
|
44 |
hereby transferred. |
|
45 |
" |
|
46 |
! |
|
47 |
||
48 |
documentation |
|
49 |
" |
|
8893 | 50 |
Notice: SystemBrowser has been completely rewritten to be an instance |
8894 | 51 |
of ApplicationModel. This rewritten version is found under NewSystemBrowser. |
8893 | 52 |
Because the class protocol here was used by many others, it is left here |
53 |
as an instance-less functionality provider only. |
|
203 | 54 |
|
55 |
written winter 89 by claus. |
|
56 |
||
508 | 57 |
[author:] |
58 |
Claus Gittinger |
|
59 |
||
203 | 60 |
" |
61 |
! ! |
|
62 |
||
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
63 |
!SystemBrowser class methodsFor:'initialization'! |
75 | 64 |
|
65 |
initialize |
|
66 |
"Browser configuration; |
|
67 |
(values can be changed from your private startup file)" |
|
45 | 68 |
|
254 | 69 |
"/ self classResources. |
85 | 70 |
|
75 | 71 |
" |
72 |
setting this to false, the removeClass function will remove |
|
73 |
classes WITHOUT checking for instances. Otherwise, |
|
74 |
it will check and let you confirm in case there are instances. |
|
75 |
Checking for instances may be a bit time consuming, though. |
|
76 |
The default is true - therefore, it will check |
|
77 |
" |
|
78 |
CheckForInstancesWhenRemovingClasses := true |
|
79 |
||
80 |
" |
|
81 |
CheckForInstancesWhenRemovingClasses := true |
|
82 |
CheckForInstancesWhenRemovingClasses := false |
|
83 |
||
85 | 84 |
SystemBrowser initialize |
75 | 85 |
" |
86 |
! ! |
|
36 | 87 |
|
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
88 |
!SystemBrowser class methodsFor:'instance creation'! |
52 | 89 |
|
75 | 90 |
open |
91 |
"launch a standard browser" |
|
92 |
||
2631 | 93 |
self == SystemBrowser ifFalse:[ |
94 |
^ super open |
|
95 |
]. |
|
96 |
||
105 | 97 |
^ self openOnDevice:(Screen current) |
75 | 98 |
|
93 | 99 |
" |
100 |
SystemBrowser open |
|
101 |
" |
|
194 | 102 |
! |
103 |
||
523 | 104 |
openInClass:aClass |
105 |
"launch a standard browser which immediately switches |
|
106 |
to aClass" |
|
107 |
||
108 |
^ self openInClass:aClass selector:nil |
|
109 |
||
110 |
" |
|
111 |
SystemBrowser openInClass:Object |
|
112 |
" |
|
113 |
||
114 |
"Created: 30.4.1996 / 14:43:45 / cg" |
|
115 |
! |
|
116 |
||
194 | 117 |
openInClass:aClass selector:aSelector |
118 |
"launch a standard browser which immediately switches |
|
119 |
to aClass>>aSelector." |
|
120 |
||
3626 | 121 |
|brwsr classesName| |
194 | 122 |
|
123 |
brwsr := self openOnDevice:(Screen current). |
|
124 |
brwsr waitUntilVisible. |
|
1561 | 125 |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
126 |
aClass notNil ifTrue:[ |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
127 |
"/ cls := aClass. |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
128 |
"/ cls isMeta ifTrue:[ |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
129 |
"/ cls := aClass soleInstance |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
130 |
"/ ]. |
1561 | 131 |
aClass isMeta ifTrue:[ |
132 |
brwsr instanceProtocol:false |
|
133 |
]. |
|
1931
03de5c5f4402
care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
134 |
aClass isJavaClass ifTrue:[ |
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
135 |
classesName := aClass fullName. |
1931
03de5c5f4402
care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
136 |
] ifFalse:[ |
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
137 |
classesName := aClass name. |
1931
03de5c5f4402
care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents:
1919
diff
changeset
|
138 |
]. |
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
139 |
brwsr switchToClassNamed:classesName. |
1681 | 140 |
brwsr classSelectionChanged. |
1561 | 141 |
aSelector notNil ifTrue:[ |
142 |
brwsr switchToMethodNamed:aSelector. |
|
143 |
] |
|
194 | 144 |
]. |
145 |
^ brwsr |
|
146 |
||
147 |
" |
|
148 |
SystemBrowser openInClass:Object selector:#at:put: |
|
149 |
SystemBrowser openInClass:Object selector:nil |
|
150 |
SystemBrowser openInClass:nil selector:nil |
|
151 |
" |
|
152 |
||
1561 | 153 |
"Created: / 22.11.1995 / 21:04:50 / cg" |
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
154 |
"Modified: / 5.11.2001 / 16:51:02 / cg" |
203 | 155 |
! |
156 |
||
3588 | 157 |
openOn:anEnvironment |
4921 | 158 |
^ self |
159 |
openOn:anEnvironment |
|
160 |
label:(self classResources string:'System Browser') |
|
3588 | 161 |
|
162 |
" |
|
163 |
SystemBrowser openOn:Smalltalk |
|
3589 | 164 |
SystemBrowser openOn:Demos |
3588 | 165 |
" |
166 |
! |
|
167 |
||
4921 | 168 |
openOn:aClassEnvironment label:title |
169 |
^ self |
|
170 |
openOn:aClassEnvironment |
|
171 |
label:title |
|
172 |
onDevice:(Screen current) |
|
173 |
! |
|
174 |
||
175 |
openOn:aClassEnvironment label:title onDevice:aDisplayDevice |
|
176 |
|browser| |
|
177 |
||
178 |
browser := self |
|
179 |
newWithLabel:title |
|
180 |
setupBlock:[:browser | browser environment:aClassEnvironment. |
|
181 |
browser setupForAll] |
|
182 |
onDevice:aDisplayDevice. |
|
183 |
^ browser |
|
184 |
! |
|
185 |
||
203 | 186 |
openOnDevice:aDisplay |
187 |
"launch a standard browser on another display." |
|
188 |
||
2631 | 189 |
self == SystemBrowser ifFalse:[ |
190 |
^ super openOnDevice:aDisplay |
|
191 |
]. |
|
192 |
||
3519 | 193 |
^ self |
4921 | 194 |
openOn:Smalltalk |
195 |
label:(self classResources string:'System Browser') |
|
3519 | 196 |
onDevice:aDisplay |
203 | 197 |
|
198 |
"|d| |
|
199 |
||
200 |
d := XWorkstation new initializeFor:'porty:0'. |
|
201 |
d startDispatch. |
|
202 |
SystemBrowser openOnDevice:d |
|
203 |
" |
|
2818 | 204 |
! |
205 |
||
3573 | 206 |
openOnRemoteImageOnHost:aHostName port:portOrNil |
4921 | 207 |
|environment| |
3573 | 208 |
|
209 |
environment := RemoteImage onHost:aHostName port:portOrNil. |
|
4921 | 210 |
^ self |
211 |
openOn:environment |
|
212 |
label:(self classResources string:'RemoteImage Browser - %1' with:aHostName) |
|
3573 | 213 |
|
214 |
" |
|
215 |
SystemBrowser openOnRemoteImageOnHost:'funkfix' port:nil |
|
7998 | 216 |
SystemBrowser openOnRemoteImageOnHost:'192.168.8.1' port:nil |
3573 | 217 |
" |
218 |
! |
|
219 |
||
2818 | 220 |
openOnSnapShotImage:anImageFileName |
4921 | 221 |
|environment| |
2818 | 222 |
|
223 |
environment := SnapShotImage for:anImageFileName. |
|
4921 | 224 |
^ self |
225 |
openOn:environment |
|
226 |
label:(self classResources string:'Image Browser - %1' with:anImageFileName asFilename baseName) |
|
2818 | 227 |
|
228 |
" |
|
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
229 |
SystemBrowser openOnSnapShotImage:('/tmp/stmeas.img') |
2824 | 230 |
" |
231 |
! ! |
|
36 | 232 |
|
4909 | 233 |
!SystemBrowser class methodsFor:'Compatibility-ST80'! |
1356 | 234 |
|
235 |
newOnClass:aClass |
|
236 |
^ self browseClass:aClass |
|
237 |
||
238 |
"Created: / 27.10.1997 / 20:10:39 / cg" |
|
239 |
! ! |
|
240 |
||
4909 | 241 |
!SystemBrowser class methodsFor:'accessing-history'! |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
242 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
243 |
addToHistory:aClass selector:aSelectorOrNil |
3679 | 244 |
|newEntry oldEntry classHistory| |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
245 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
246 |
(newEntry := self historyEntryForClass:aClass selector:aSelectorOrNil) isNil ifTrue:[^ self]. |
3679 | 247 |
classHistory := self classHistory. |
248 |
||
10173
ed7cc5e574cb
comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents:
10048
diff
changeset
|
249 |
oldEntry := classHistory detect:[:entry | (entry className = newEntry className) |
ed7cc5e574cb
comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents:
10048
diff
changeset
|
250 |
"and:[entry selector = newEntry selector]"] ifNone:nil. |
3679 | 251 |
oldEntry notNil ifTrue:[ |
252 |
classHistory removeIdentical:oldEntry. |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
253 |
]. |
3679 | 254 |
classHistory addFirst:newEntry. |
255 |
classHistory size > self visitedHistoryMaxSize ifTrue:[ |
|
256 |
classHistory removeLast |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
257 |
]. |
7524
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
258 |
SystemBrowser changed:#visitedClassHistory with:classHistory. |
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
259 |
|
10173
ed7cc5e574cb
comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents:
10048
diff
changeset
|
260 |
"Modified: / 05-07-2011 / 16:49:57 / cg" |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
261 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
262 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
263 |
checkClassHistory |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
264 |
"checks the class history for non-existing classes" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
265 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
266 |
"/ reverse, since we might modify while enumerating |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
267 |
self classHistory reverseDo:[:histEntry| |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
268 |
(Smalltalk at: (histEntry className) asSymbol) isBehavior |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
269 |
ifFalse:[ |
10346
560fea0fd857
changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents:
10327
diff
changeset
|
270 |
self classHistory removeIdentical: histEntry |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
271 |
] |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
272 |
] |
10346
560fea0fd857
changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents:
10327
diff
changeset
|
273 |
|
560fea0fd857
changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents:
10327
diff
changeset
|
274 |
"Modified: / 20-07-2011 / 11:59:22 / cg" |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
275 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
276 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
277 |
classHistory |
3679 | 278 |
ClassHistory isNil ifTrue:[ |
279 |
ClassHistory := List new |
|
280 |
]. |
|
281 |
^ ClassHistory |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
282 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
283 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
284 |
classHistory:newCollection |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
285 |
ClassHistory := newCollection |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
286 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
287 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
288 |
emptyClassHistory |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
289 |
"removes all class history entries" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
290 |
|
7524
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
291 |
|classHistory| |
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
292 |
|
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
293 |
classHistory := self classHistory. |
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
294 |
classHistory removeAll. |
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
295 |
SystemBrowser changed:#visitedClassHistory with:classHistory. |
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
296 |
|
0257265ae6b7
do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents:
7395
diff
changeset
|
297 |
"Modified: / 20-11-2006 / 12:29:42 / cg" |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
298 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
299 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
300 |
historyEntryForClass:aClass selector:aSelectorOrNil |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
301 |
|newEntry meta cls| |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
302 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
303 |
aClass isBehavior ifFalse:[^ nil]. |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
304 |
|
3151 | 305 |
(meta := aClass isMeta) ifTrue:[ |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
306 |
cls := aClass theNonMetaclass. |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
307 |
] ifFalse:[ |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
308 |
cls := aClass |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
309 |
]. |
3151 | 310 |
newEntry := BrowserHistoryEntry new. |
311 |
newEntry |
|
312 |
className:cls name |
|
313 |
meta:meta |
|
314 |
selector:aSelectorOrNil. |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
315 |
^ newEntry |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
316 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
317 |
"Modified: / 24.2.2000 / 18:03:52 / cg" |
9189
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
318 |
! |
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
319 |
|
11271 | 320 |
lastSearchPatterns |
321 |
^ LastSearchPatterns |
|
322 |
! |
|
323 |
||
324 |
rememberSearchPattern:aString |
|
325 |
LastSearchPatterns isNil ifTrue:[ |
|
326 |
LastSearchPatterns := OrderedCollection new. |
|
327 |
]. |
|
328 |
(LastSearchPatterns includes:aString) ifTrue:[ |
|
329 |
LastSearchPatterns remove:aString. |
|
330 |
] ifFalse:[ |
|
331 |
LastSearchPatterns size > 20 ifTrue:[ |
|
332 |
LastSearchPatterns removeFirst |
|
333 |
] |
|
334 |
]. |
|
335 |
LastSearchPatterns addFirst:aString. |
|
336 |
||
337 |
"Modified: / 24-11-2010 / 12:51:31 / cg" |
|
338 |
"Created: / 14-02-2012 / 14:00:24 / cg" |
|
339 |
! |
|
340 |
||
9189
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
341 |
visitedClassNamesHistory |
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
342 |
^ self classHistory |
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
343 |
collect:[:e | e className] |
9f57319e21ca
added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents:
9157
diff
changeset
|
344 |
thenSelect:[:nm | nm notEmptyOrNil] |
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
345 |
! ! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
346 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
347 |
!SystemBrowser class methodsFor:'defaults'! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
348 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
349 |
classHistoryMaxLevels |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
350 |
^ 3 |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
351 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
352 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
353 |
classHistoryMaxSize |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
354 |
^ 15 |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
355 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
356 |
|
3549 | 357 |
methodTemplate |
8877 | 358 |
"return a method definition template string or nil" |
359 |
||
360 |
^ SmalltalkLanguage instance methodTemplate |
|
3549 | 361 |
! |
362 |
||
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
363 |
visitedHistoryMaxSize |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
364 |
"the maximum number of remembered visited-class-history entries" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
365 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
366 |
^ 15 |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
367 |
! ! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
368 |
|
4909 | 369 |
!SystemBrowser class methodsFor:'defaults-presentation'! |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
370 |
|
3352 | 371 |
emphasisForChangedCode |
4499 | 372 |
^ UserPreferences current emphasisForChangedCode. |
3352 | 373 |
|
374 |
" |
|
375 |
EmphasisForChangedCode := #underwave |
|
4112 | 376 |
EmphasisForChangedCode := #color->Color blue |
3352 | 377 |
EmphasisForChangedCode := #color->Color red lightened lightened lightened |
378 |
" |
|
379 |
||
380 |
"Created: / 31.10.2001 / 10:15:33 / cg" |
|
381 |
! |
|
382 |
||
383 |
emphasisForChangedCode:anEmphasis |
|
384 |
EmphasisForChangedCode := anEmphasis |
|
385 |
||
386 |
" |
|
387 |
self emphasisForChangedCode:#underwave |
|
388 |
self emphasisForChangedCode:(#color->Color red lightened lightened lightened) |
|
389 |
" |
|
390 |
||
391 |
"Created: / 31.10.2001 / 10:15:44 / cg" |
|
392 |
! |
|
393 |
||
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
394 |
emphasisForDifferentPackage |
4499 | 395 |
^ UserPreferences current emphasisForDifferentPackage. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
396 |
|
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
397 |
" |
3352 | 398 |
EmphasisForDifferentPackage := nil. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
399 |
EmphasisForDifferentPackage := #underwave |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
400 |
EmphasisForDifferentPackage := #color->Color red lightened lightened lightened |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
401 |
" |
3352 | 402 |
|
403 |
"Modified: / 31.10.2001 / 10:47:25 / cg" |
|
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
404 |
! |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
405 |
|
3241 | 406 |
emphasisForDifferentPackage:anEmphasis |
407 |
EmphasisForDifferentPackage := anEmphasis |
|
408 |
||
409 |
" |
|
410 |
self emphasisForDifferentPackage:#underwave |
|
411 |
self emphasisForDifferentPackage:(#color->Color red lightened lightened lightened) |
|
412 |
" |
|
413 |
! |
|
414 |
||
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
415 |
emphasisForModifiedBuffer |
4499 | 416 |
^ UserPreferences current emphasisForModifiedBuffer. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
417 |
! |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
418 |
|
3241 | 419 |
emphasisForModifiedBuffer:anEmphasis |
420 |
EmphasisForModifiedBuffer := anEmphasis |
|
421 |
! |
|
422 |
||
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
423 |
emphasisForObsoleteCode |
4499 | 424 |
^ UserPreferences current emphasisForObsoleteCode. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
425 |
! |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
426 |
|
3241 | 427 |
emphasisForObsoleteCode:anEmphasis |
428 |
EmphasisForObsoleteCode := anEmphasis |
|
429 |
! |
|
430 |
||
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
431 |
emphasisForReadVariable |
4499 | 432 |
^ UserPreferences current emphasisForReadVariable. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
433 |
|
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
434 |
" |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
435 |
EmphasisForReadVariable := #underline |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
436 |
EmphasisForReadVariable := Array with:#underline with:#underlineColor->Color yellow |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
437 |
" |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
438 |
! |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
439 |
|
3241 | 440 |
emphasisForReadVariable:anEmphasis |
441 |
EmphasisForReadVariable := anEmphasis |
|
442 |
||
443 |
" |
|
444 |
self emphasisForReadVariable:#underline |
|
445 |
self emphasisForReadVariable:(Array with:#underline with:#underlineColor->Color yellow) |
|
446 |
" |
|
447 |
! |
|
448 |
||
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
449 |
emphasisForWrittenVariable |
4499 | 450 |
^ UserPreferences current emphasisForWrittenVariable. |
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
451 |
|
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
452 |
" |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
453 |
EmphasisForWrittenVariable := #underline |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
454 |
EmphasisForWrittenVariable := Array with:#underline with:#underlineColor->Color red lightened |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
455 |
" |
3241 | 456 |
! |
457 |
||
458 |
emphasisForWrittenVariable:anEmphasis |
|
459 |
EmphasisForWrittenVariable := anEmphasis |
|
460 |
||
461 |
" |
|
462 |
self emphasisForWrittenVariable:#underline |
|
463 |
self emphasisForWrittenVariable:(Array with:#underline with:#underlineColor->Color red lightened) |
|
464 |
" |
|
6901 | 465 |
! |
466 |
||
467 |
iconForClass:aClass |
|
8851 | 468 |
"now ask the class for its browser symbol; thats a key/selector in the |
469 |
ToolbarIconLibrary" |
|
6901 | 470 |
|
7827 | 471 |
aClass withAllSuperclassesDo:[:eachCls | |
472 |
| iconSymbol | |
|
473 |
||
474 |
iconSymbol := eachCls iconInBrowserSymbol. |
|
475 |
iconSymbol notNil ifTrue:[ |
|
476 |
^ ToolbarIconLibrary perform:iconSymbol |
|
477 |
]. |
|
478 |
]. |
|
479 |
||
6901 | 480 |
^ nil |
481 |
||
482 |
"Created: / 17-08-2006 / 09:11:27 / cg" |
|
7827 | 483 |
"Modified: / 20-07-2007 / 09:01:43 / cg" |
6901 | 484 |
! |
485 |
||
486 |
resourceIconForMethod:aMethod |
|
487 |
|resources| |
|
488 |
||
489 |
(resources := aMethod resources) isNil ifTrue:[^ nil]. |
|
490 |
||
491 |
(resources includesKey:#obsolete) ifTrue:[ |
|
492 |
^ self deprecatedMethodIcon |
|
493 |
]. |
|
494 |
(resources includesKey:#canvas) ifTrue:[ |
|
495 |
^ self canvasIcon |
|
496 |
]. |
|
497 |
(resources includesKey:#menu) ifTrue:[ |
|
498 |
^ self menuIcon |
|
499 |
]. |
|
500 |
(resources includesKey:#image) ifTrue:[ |
|
501 |
^ self imageIcon |
|
502 |
]. |
|
503 |
(resources includesKey:#fileImage) ifTrue:[ |
|
504 |
^ self fileImageIcon |
|
505 |
]. |
|
506 |
(resources includesKey:#programImage) ifTrue:[ |
|
507 |
^ self programImageIcon |
|
508 |
]. |
|
509 |
(resources includesKey:#help) ifTrue:[ |
|
510 |
^ self helpIcon |
|
511 |
]. |
|
512 |
(resources includesKey:#programMenu) ifTrue:[ |
|
513 |
^ self programMenuIcon |
|
514 |
]. |
|
515 |
(resources includesKey:#tableColumns) ifTrue:[ |
|
516 |
^ self tableColumnsIcon |
|
517 |
]. |
|
518 |
(resources includesKey:#tabList) ifTrue:[ |
|
519 |
^ self tabListIcon |
|
520 |
]. |
|
521 |
(resources includesKey:#hierarchicalList) ifTrue:[ |
|
522 |
^ self hierarchicalListIcon |
|
523 |
]. |
|
524 |
(resources includesKey:#programImage) ifTrue:[ |
|
525 |
^ self programImageIcon |
|
526 |
]. |
|
527 |
^ nil |
|
528 |
||
529 |
"Created: / 17-08-2006 / 09:08:11 / cg" |
|
3240
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
530 |
! ! |
34f017469465
allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents:
3221
diff
changeset
|
531 |
|
8702 | 532 |
!SystemBrowser class methodsFor:'dialogs'! |
533 |
||
534 |
askForClassNameMatching:matchStringArg inEnvironment:anEnvironmentOrClassOrNil for:aBrowserOrNil |
|
535 |
"open a dialog to ask for a class name. |
|
536 |
env is either a nameSpace or a class (to ask for a private class)" |
|
537 |
||
538 |
|classNames caselessMatchingNames |
|
539 |
substringMatchingNames caselessSubstringMatchingNames |
|
540 |
caselessWithoutPrefixSubstringMatchingNames |
|
541 |
lcMatchString subMatch lcSubMatch box className |
|
542 |
needSearch cls env searchBlock searchBlock2 |
|
543 |
idx pref aMatchString allNames sortedBySpellingDistance msg resources| |
|
544 |
||
545 |
resources := self classResources. |
|
546 |
env := anEnvironmentOrClassOrNil ? Smalltalk. |
|
547 |
||
548 |
aMatchString := matchStringArg. |
|
549 |
||
550 |
"/ try to limit search to a namespace (but only if nameSpace is not a matchCharacter) |
|
551 |
||
552 |
(aMatchString includesString:'::') ifTrue:[ |
|
553 |
"/ pref := aMatchString upTo:$:. |
|
554 |
idx := aMatchString lastIndexOf:$:. |
|
555 |
pref := aMatchString copyTo:idx-2. |
|
556 |
pref includesMatchCharacters ifTrue:[ |
|
557 |
"/ search all in Smalltalk |
|
558 |
] ifFalse:[ |
|
559 |
cls := Smalltalk at:pref asSymbol ifAbsent:nil. |
|
560 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
561 |
env := cls. |
|
562 |
aMatchString := aMatchString copyFrom:pref size + 1 + 2. |
|
563 |
]. |
|
564 |
]. |
|
565 |
]. |
|
566 |
||
567 |
classNames := Set new. |
|
568 |
caselessMatchingNames := Set new. |
|
569 |
substringMatchingNames := Set new. |
|
570 |
caselessSubstringMatchingNames := Set new. |
|
571 |
caselessWithoutPrefixSubstringMatchingNames := Set new. |
|
572 |
||
573 |
lcMatchString := aMatchString asLowercase. |
|
574 |
needSearch := true. |
|
575 |
aMatchString includesMatchCharacters ifFalse:[ |
|
576 |
subMatch := '*' , aMatchString , '*'. |
|
577 |
lcSubMatch := subMatch asLowercase. |
|
578 |
||
579 |
"/ if the name is already a good one, avoid the expensive search |
|
580 |
className := aMatchString asSymbolIfInterned. |
|
581 |
className notNil ifTrue:[ |
|
582 |
env isNameSpace ifTrue:[ |
|
583 |
cls := env at:className ifAbsent:nil. |
|
584 |
] ifFalse:[ |
|
585 |
cls := env privateClassesAt:className. |
|
586 |
]. |
|
587 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
588 |
needSearch := false. |
|
589 |
] |
|
590 |
] |
|
591 |
]. |
|
592 |
||
593 |
needSearch ifTrue:[ |
|
594 |
searchBlock := [:aClass | |
|
595 |
|thisName| |
|
596 |
||
597 |
"/ use dotted names for java |
|
598 |
aClass isJavaClass ifTrue:[ |
|
599 |
thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$. |
|
600 |
] ifFalse:[ |
|
601 |
thisName := aClass name |
|
602 |
]. |
|
603 |
(lcMatchString match:aClass name asLowercase) ifTrue:[ |
|
604 |
caselessWithoutPrefixSubstringMatchingNames add:thisName |
|
605 |
]. |
|
606 |
aClass nameWithoutPrefix ~= aClass name ifTrue:[ |
|
607 |
(lcMatchString match:aClass nameWithoutPrefix asLowercase) ifTrue:[ |
|
608 |
caselessWithoutPrefixSubstringMatchingNames add:thisName |
|
609 |
]. |
|
610 |
]. |
|
611 |
||
612 |
(aMatchString match:thisName) ifTrue:[ |
|
613 |
classNames add:thisName |
|
614 |
] ifFalse:[ |
|
615 |
(lcMatchString match:thisName asLowercase) ifTrue:[ |
|
616 |
caselessMatchingNames add:thisName |
|
617 |
] ifFalse:[ |
|
618 |
subMatch notNil ifTrue:[ |
|
619 |
(subMatch match:thisName) ifTrue:[ |
|
620 |
substringMatchingNames add:thisName |
|
621 |
] ifFalse:[ |
|
622 |
(lcSubMatch match:thisName asLowercase) ifTrue:[ |
|
623 |
caselessSubstringMatchingNames add:thisName |
|
624 |
] |
|
625 |
] |
|
626 |
] |
|
627 |
] |
|
628 |
] |
|
629 |
]. |
|
630 |
||
631 |
(env == Smalltalk or:[env isNameSpace]) ifTrue:[ |
|
632 |
env allClassesDo:searchBlock |
|
633 |
] ifFalse:[ |
|
634 |
env allPrivateClasses do:searchBlock |
|
635 |
]. |
|
636 |
||
637 |
sortedBySpellingDistance := false. |
|
638 |
"/ if nothing matched - try caseless matches |
|
639 |
classNames size == 0 ifTrue:[ |
|
640 |
classNames := caselessMatchingNames. |
|
641 |
||
642 |
"/ if nothing matched - try substring matches |
|
643 |
classNames size == 0 ifTrue:[ |
|
8704 | 644 |
aMatchString isUppercaseFirst ifTrue:[ |
8702 | 645 |
classNames := substringMatchingNames. |
646 |
]. |
|
647 |
"/ if nothing matched - try caseless substring matches |
|
648 |
classNames size == 0 ifTrue:[ |
|
649 |
classNames := caselessSubstringMatchingNames. |
|
650 |
||
651 |
"/ if nothing matched - try best fitting |
|
652 |
classNames size == 0 ifTrue:[ |
|
653 |
aMatchString includesMatchCharacters ifFalse:[ |
|
654 |
allNames := SortedCollection sortBlock:[:a :b | a value > b value]. |
|
655 |
searchBlock2 := |
|
656 |
[:aClass | |
|
657 |
|thisName dist| |
|
658 |
||
659 |
aClass isJavaClass ifTrue:[ |
|
660 |
thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$. |
|
661 |
] ifFalse:[ |
|
662 |
thisName := aClass name |
|
663 |
]. |
|
664 |
dist := thisName asLowercase spellAgainst:lcMatchString. |
|
665 |
(thisName asLowercase startsWith:lcMatchString) ifTrue:[ |
|
666 |
dist := dist + (thisName size * 10). |
|
667 |
]. |
|
668 |
allNames add:(thisName -> dist). |
|
669 |
]. |
|
670 |
(env == Smalltalk or:[env isNameSpace]) ifTrue:[ |
|
671 |
env allClassesDo:searchBlock2 |
|
672 |
] ifFalse:[ |
|
673 |
env allPrivateClasses do:searchBlock2 |
|
674 |
]. |
|
675 |
classNames := (allNames copyTo:(allNames size min:40)) collect:[:each | each key]. |
|
676 |
sortedBySpellingDistance := true. |
|
677 |
] |
|
678 |
] |
|
679 |
] |
|
680 |
] |
|
681 |
]. |
|
682 |
||
683 |
(classNames size == 0) ifTrue:[^ nil]. |
|
684 |
(classNames size == 1) ifTrue:[ |
|
685 |
className := classNames first |
|
686 |
] ifFalse:[ |
|
687 |
|browseButton| |
|
688 |
||
689 |
sortedBySpellingDistance ifFalse:[ |
|
690 |
classNames := classNames asArray sort. |
|
691 |
]. |
|
692 |
||
693 |
aMatchString includesMatchCharacters ifTrue:[ |
|
9065
efb483eb10a8
changed: #askForClassNameMatching:inEnvironment:for:
Claus Gittinger <cg@exept.de>
parents:
9010
diff
changeset
|
694 |
msg := 'Classes matching or similar to "%1"\\Select or enter name of class to switch to:' |
8702 | 695 |
] ifFalse:[ |
9065
efb483eb10a8
changed: #askForClassNameMatching:inEnvironment:for:
Claus Gittinger <cg@exept.de>
parents:
9010
diff
changeset
|
696 |
msg := 'Classes containing or similar to "%1"\\Select or enter name of class to switch to:' |
8702 | 697 |
]. |
698 |
||
699 |
box := self listBoxTitle:(resources string:msg with:matchStringArg) withCRs |
|
700 |
okText:'OK' |
|
701 |
list:classNames. |
|
702 |
caselessWithoutPrefixSubstringMatchingNames notEmpty ifTrue:[ |
|
703 |
box initialText:(caselessWithoutPrefixSubstringMatchingNames first). |
|
704 |
]. |
|
705 |
box action:[:aString | className := aString]. |
|
706 |
||
707 |
browseButton := Button label:(resources string:'Browse All'). |
|
708 |
browseButton action:[ |
|
709 |
|classes title| |
|
710 |
||
9065
efb483eb10a8
changed: #askForClassNameMatching:inEnvironment:for:
Claus Gittinger <cg@exept.de>
parents:
9010
diff
changeset
|
711 |
title := resources string:'Classes Matching or Similar to "%1"' with:matchStringArg. |
8702 | 712 |
classes := classNames collect:[:nm | Smalltalk classNamed:nm]. |
713 |
aBrowserOrNil isNil ifTrue:[ |
|
714 |
SystemBrowser |
|
715 |
browseClasses:classes |
|
716 |
label:title. |
|
717 |
] ifFalse:[ |
|
718 |
aBrowserOrNil |
|
719 |
spawnClassBrowserFor:classes |
|
720 |
label:title |
|
721 |
in:#newBrowser |
|
722 |
select:false. |
|
723 |
]. |
|
724 |
box hide |
|
725 |
]. |
|
726 |
box addButton:browseButton before:box okButton. |
|
9157
c8166dbf5a5a
changed: #askForClassNameMatching:inEnvironment:for:
Claus Gittinger <cg@exept.de>
parents:
9065
diff
changeset
|
727 |
box minExtent:300@250. |
8702 | 728 |
|
729 |
box open. |
|
730 |
(box accepted not or:[className isNil]) ifTrue:[ "/ cancel |
|
731 |
^ nil |
|
732 |
] |
|
733 |
]. |
|
734 |
]. |
|
735 |
||
736 |
className notNil ifTrue:[ |
|
737 |
"/ use slashed javaName for search. |
|
738 |
(className includes:$.) ifTrue:[ |
|
739 |
className := className copyReplaceAll:$. with:$/ |
|
740 |
]. |
|
741 |
]. |
|
742 |
||
743 |
"/ pref notNil ifTrue:[ |
|
744 |
"/ ^ pref , '::' , className |
|
745 |
"/ ]. |
|
746 |
^ className |
|
747 |
||
748 |
"Modified: / 16-10-2006 / 11:36:20 / cg" |
|
749 |
! |
|
750 |
||
751 |
listBoxTitle:title okText:okText list:aList |
|
752 |
"convenient method: setup a listBox & return it" |
|
753 |
||
754 |
|box resources| |
|
755 |
||
756 |
resources := self classResources. |
|
757 |
||
758 |
box := ListSelectionBox |
|
759 |
title:(resources string:title) |
|
760 |
okText:(resources string:okText) |
|
761 |
action:nil. |
|
762 |
box list:aList. |
|
763 |
^ box |
|
764 |
! ! |
|
765 |
||
2692 | 766 |
!SystemBrowser class methodsFor:'image specs'! |
767 |
||
2748 | 768 |
abstractMethodIcon |
769 |
<resource: #programImage> |
|
770 |
||
771 |
^ self padLockGrayMiniIcon |
|
772 |
! |
|
773 |
||
3813 | 774 |
addBreakPointIcon |
775 |
"This resource specification was automatically generated |
|
776 |
by the ImageEditor of ST/X." |
|
777 |
||
778 |
"Do not manually edit this!! If it is corrupted, |
|
779 |
the ImageEditor may not be able to read the specification." |
|
780 |
||
781 |
" |
|
782 |
self addBreakPointIcon inspect |
|
783 |
ImageEditor openOnClass:self andSelector:#addBreakPointIcon |
|
4852 | 784 |
Icon flushCachedIcons |
3813 | 785 |
" |
786 |
||
787 |
<resource: #image> |
|
788 |
||
789 |
^Icon |
|
7968 | 790 |
constantNamed:'SystemBrowser class addBreakPointIcon' |
3813 | 791 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@8@C @N@@8@A@@@@@P@C @D@@@@@@@@@@@@b') ; colorMapFromArray:#[255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O8A?0O?!!??G?<_?1??G?<_?1??C?8G?@O8@@@@@@b') ; yourself); yourself] |
792 |
! |
|
793 |
||
794 |
addBreakPointIcon2 |
|
6115 | 795 |
^ XPToolbarIconLibrary addBreakPointIcon2 |
3813 | 796 |
! |
797 |
||
4341 | 798 |
autoloadedClassIcon |
7827 | 799 |
<resource: #programImage> |
800 |
||
801 |
^ ToolbarIconLibrary autoloadedClassBrowserIcon |
|
802 |
||
803 |
"Modified: / 20-07-2007 / 09:15:37 / cg" |
|
4341 | 804 |
! |
805 |
||
12040 | 806 |
breakPointedIcon |
12504 | 807 |
<resource: #programImage> |
808 |
||
809 |
^ ToolbarIconLibrary breakpointRedEnabled16x16 |
|
810 |
"/ ^ self breakPointedIcon2 |
|
811 |
! |
|
812 |
||
813 |
breakPointedIcon1 |
|
12040 | 814 |
"This resource specification was automatically generated |
815 |
by the ImageEditor of ST/X." |
|
816 |
||
817 |
"Do not manually edit this!! If it is corrupted, |
|
818 |
the ImageEditor may not be able to read the specification." |
|
819 |
||
820 |
" |
|
12504 | 821 |
self breakPointedIcon1 inspect |
822 |
ImageEditor openOnClass:self andSelector:#breakPointedIcon1 |
|
12040 | 823 |
Icon flushCachedIcons |
824 |
" |
|
825 |
||
826 |
<resource: #image> |
|
827 |
||
828 |
^Icon |
|
12504 | 829 |
constantNamed:'SystemBrowser breakPointedIcon1' |
12040 | 830 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@P@@L3@@@@$@L@@@L@@H@@@C@@@@APL@DQ@C@@@C@1DS@0@B@0@QD@L@@@@@@0@@@@@@L@@@L@@@@@@3L@@@@ @@@@@@@@ b') ; colorMapFromArray:#[255 0 0 255 255 255 0 0 0 255 199 199]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@N@C>@O8A?0G?@_<@? C>@C @@@@@a') ; yourself); yourself] |
831 |
! |
|
832 |
||
12504 | 833 |
breakPointedIcon2 |
834 |
"This resource specification was automatically generated |
|
835 |
by the ImageEditor of ST/X." |
|
836 |
||
837 |
"Do not manually edit this!! If it is corrupted, |
|
838 |
the ImageEditor may not be able to read the specification." |
|
839 |
||
840 |
" |
|
841 |
self breakPointedIcon2 inspect |
|
842 |
ImageEditor openOnClass:self andSelector:#breakPointedIcon2 |
|
843 |
Icon flushCachedIcons |
|
844 |
" |
|
845 |
||
846 |
<resource: #image> |
|
847 |
||
848 |
^Icon |
|
849 |
constantNamed:'SystemBrowser breakPointedIcon2' |
|
850 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQH"H!!DQDAD!!DQD!!DQ@RDQDQD!!DPHQDQDQD!!DBDQDQDQHQ@!!DQDQDRDZHQDQDQD!!FBDQDQDQHQ@RDQDQD!!DPDRDQDRDQDADRH"HQDQ@b') ; colorMapFromArray:#[255 255 255 255 0 0 128 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a') ; yourself); yourself] |
|
851 |
! |
|
852 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
853 |
canvasIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
854 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
855 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
856 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
857 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
858 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
859 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
860 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
861 |
ImageEditor openOnClass:self andSelector:#canvasIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
862 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
863 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
864 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
865 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
866 |
^Icon |
7968 | 867 |
constantNamed:'SystemBrowser class canvasIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
868 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@.;.;.;.0@@@@@@@@@@C.;/C.;/@@9&XP9&XP@NY&DNY&D@C&Y!!C&Y!!@@9&XP9&XP@NY&DNY&D@C1DQC1DQ@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
869 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
870 |
|
4143 | 871 |
containerClassIcon |
7827 | 872 |
<resource: #programImage> |
873 |
||
874 |
^ ToolbarIconLibrary containerClassBrowserIcon |
|
875 |
||
876 |
"Modified: / 20-07-2007 / 09:14:54 / cg" |
|
4143 | 877 |
! |
878 |
||
2692 | 879 |
defaultIcon |
880 |
"This resource specification was automatically generated |
|
881 |
by the ImageEditor of ST/X." |
|
882 |
||
883 |
"Do not manually edit this!! If it is corrupted, |
|
884 |
the ImageEditor may not be able to read the specification." |
|
885 |
||
886 |
" |
|
887 |
self defaultIcon inspect |
|
888 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
889 |
" |
|
890 |
||
891 |
<resource: #image> |
|
892 |
||
893 |
^Icon |
|
7968 | 894 |
constantNamed:'SystemBrowser class defaultIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
895 |
ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
896 |
@@@@@@@@@@@@@@@@@@@FY&Y&Y&X0@@@@@@@@@@YDQDQDQB@@@@@@@@@@A$QDQDQDH@@@@@@@@@@CH"H"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@ |
3794 | 897 |
@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@A&Y&Y&Y#@@@@@F@"H"HFDQDQDQH@@@@@@@@@@@L"H"H" |
898 |
H @@@@@ @@@@@@@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@A&Y&Y&Y#@@@@@F@"H"HFUUUUUUH@@@@@@@@@@@L"H"H"H @@@@@@ |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
899 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@@B@B@ @@H@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
900 |
@@@@@@@@@@@@@@@@@@@@@@@@H@@@@@@@@@H@@ @@@@Hb') ; colorMapFromArray:#[0 0 0 0 255 0 127 127 127 170 170 170 255 0 0 255 255 0 255 255 255]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
3794 | 901 |
??0@@O?<@@C??@@@??0@@O?<@@C??@@@@ @@@@H@@@@B@@@@@ O?8@\C?>@G??? A0O?8@HC?>@B@@@@@ O?8@\C?>@G??? A0O?8@@C?>@@@@@@9O\7\IRT |
2846 | 902 |
QDBD%DQ@!!OH''HHRQEABT$QPP99]7\@@a') ; yourself); yourself] |
903 |
! |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
904 |
|
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
905 |
deprecatedMethodIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
906 |
^ self doNotEnterIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
907 |
! |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
908 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
909 |
doNotEnterIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
910 |
"This resource specification was automatically generated |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
911 |
by the ImageEditor of ST/X." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
912 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
913 |
"Do not manually edit this!! If it is corrupted, |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
914 |
the ImageEditor may not be able to read the specification." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
915 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
916 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
917 |
self doNotEnterIcon inspect |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
918 |
ImageEditor openOnClass:self andSelector:#doNotEnterIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
919 |
Icon flushCachedIcons |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
920 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
921 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
922 |
<resource: #image> |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
923 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
924 |
^Icon |
7968 | 925 |
constantNamed:'SystemBrowser class doNotEnterIcon' |
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
926 |
ifAbsentPut:[(Depth1Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??C0<NA00CB@EY>P''9B@DL@08GC0<@@a') ; colorMapFromArray:#[255 0 0 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O@A>@O<A?8G? _>A?8C?@G8@O@@@a') ; yourself); yourself] |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
927 |
! |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
928 |
|
3354 | 929 |
emptyIcon |
930 |
"This resource specification was automatically generated |
|
931 |
by the ImageEditor of ST/X." |
|
932 |
||
933 |
"Do not manually edit this!! If it is corrupted, |
|
934 |
the ImageEditor may not be able to read the specification." |
|
935 |
||
936 |
" |
|
937 |
self emptyIcon inspect |
|
938 |
ImageEditor openOnClass:self andSelector:#emptyIcon |
|
939 |
" |
|
940 |
||
941 |
<resource: #image> |
|
942 |
||
943 |
^Icon |
|
7968 | 944 |
constantNamed:'SystemBrowser class emptyIcon' |
3354 | 945 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
946 |
||
947 |
"Created: / 5.11.2001 / 09:39:54 / cg" |
|
948 |
! |
|
949 |
||
4143 | 950 |
errorClassIcon |
7827 | 951 |
<resource: #programImage> |
952 |
||
953 |
^ ToolbarIconLibrary errorClassBrowserIcon |
|
954 |
||
955 |
"Modified: / 20-07-2007 / 09:14:06 / cg" |
|
4143 | 956 |
! |
957 |
||
958 |
exceptionClassIcon |
|
959 |
"This resource specification was automatically generated |
|
960 |
by the ImageEditor of ST/X." |
|
961 |
||
962 |
"Do not manually edit this!! If it is corrupted, |
|
963 |
the ImageEditor may not be able to read the specification." |
|
964 |
||
965 |
" |
|
966 |
self exceptionClassIcon inspect |
|
967 |
ImageEditor openOnClass:self andSelector:#exceptionClassIcon |
|
968 |
Icon flushCachedIcons |
|
969 |
" |
|
970 |
||
7827 | 971 |
<resource: #programImage> |
972 |
||
973 |
^ ToolbarIconLibrary exceptionClassBrowserIcon |
|
974 |
||
975 |
"Modified: / 20-07-2007 / 09:13:18 / cg" |
|
4143 | 976 |
! |
977 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
978 |
fileImageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
979 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
980 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
981 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
982 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
983 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
984 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
985 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
986 |
self fileImageIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
987 |
ImageEditor openOnClass:self andSelector:#fileImageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
988 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
989 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
990 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
991 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
992 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
993 |
constantNamed:'SystemBrowser class fileImageIcon' |
2846 | 994 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@H"H"H"@@@BQBH!!D"@@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 51 153 153 51 255 255 255 153 0 255 255 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?<C?8O?0??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
995 |
! |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
996 |
|
4166 | 997 |
greenCheckIcon |
998 |
"This resource specification was automatically generated |
|
999 |
by the ImageEditor of ST/X." |
|
1000 |
||
1001 |
"Do not manually edit this!! If it is corrupted, |
|
1002 |
the ImageEditor may not be able to read the specification." |
|
1003 |
||
1004 |
" |
|
1005 |
self greenCheckIcon inspect |
|
1006 |
ImageEditor openOnClass:self andSelector:#greenCheckIcon |
|
1007 |
Icon flushCachedIcons |
|
1008 |
" |
|
1009 |
||
1010 |
<resource: #image> |
|
1011 |
||
1012 |
^Icon |
|
7968 | 1013 |
constantNamed:'SystemBrowser class greenCheckIcon' |
4166 | 1014 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@H @@@@@@@"@@@@@@@@H@@@@@@ @"@@@@@@H H@@@@@@@H"@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 0 127 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@C@@X@A@AL@F @N@@P@@@@@@@@a') ; yourself); yourself] |
1015 |
! |
|
1016 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1017 |
greenLockIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1018 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1019 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1020 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1021 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1022 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1023 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1024 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1025 |
self greenLockIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1026 |
ImageEditor openOnClass:self andSelector:#greenLockIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1027 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1028 |
|
3354 | 1029 |
<resource: #programImage> |
1030 |
||
2892 | 1031 |
^ self padLockGreenMiniIcon |
3354 | 1032 |
|
1033 |
"Modified: / 5.11.2001 / 09:40:12 / cg" |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1034 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1035 |
|
4165 | 1036 |
greenThumbUpIcon |
10327 | 1037 |
^ ToolbarIconLibrary greenThumbUpIcon |
1038 |
||
1039 |
"Modified: / 17-07-2011 / 10:03:34 / cg" |
|
4165 | 1040 |
! |
1041 |
||
4166 | 1042 |
greenThumbUpSmallIcon |
10327 | 1043 |
^ ToolbarIconLibrary greenThumbUpSmallIcon |
1044 |
||
1045 |
"Modified: / 17-07-2011 / 10:03:43 / cg" |
|
4166 | 1046 |
! |
1047 |
||
1048 |
greyCheckIcon |
|
1049 |
"This resource specification was automatically generated |
|
1050 |
by the ImageEditor of ST/X." |
|
1051 |
||
1052 |
"Do not manually edit this!! If it is corrupted, |
|
1053 |
the ImageEditor may not be able to read the specification." |
|
1054 |
||
1055 |
" |
|
1056 |
self greyCheckIcon inspect |
|
1057 |
ImageEditor openOnClass:self andSelector:#greyCheckIcon |
|
1058 |
Icon flushCachedIcons |
|
1059 |
" |
|
1060 |
||
1061 |
<resource: #image> |
|
1062 |
||
1063 |
^Icon |
|
7968 | 1064 |
constantNamed:'SystemBrowser class greyCheckIcon' |
4166 | 1065 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@H @@@@@@@"@@@@@@@@H@@@@@@ @"@@@@@@H H@@@@@@@H"@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@C@@X@A@AL@F @N@@P@@@@@@@@a') ; yourself); yourself] |
1066 |
! |
|
1067 |
||
4165 | 1068 |
greyThumbUpIcon |
10327 | 1069 |
^ ToolbarIconLibrary greyThumbUpIcon |
1070 |
||
1071 |
"Modified: / 17-07-2011 / 10:04:06 / cg" |
|
4165 | 1072 |
! |
1073 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1074 |
helpIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1075 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1076 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1077 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1078 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1079 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1080 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1081 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1082 |
self helpIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1083 |
ImageEditor openOnClass:self andSelector:#helpIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1084 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1085 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1086 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1087 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1088 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1089 |
constantNamed:'SystemBrowser class helpIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1090 |
ifAbsentPut:[(Depth1Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A?<G#0]7A?\G;0__A?<G72_?@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1091 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1092 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1093 |
hierarchicalListIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1094 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1095 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1096 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1097 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1098 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1099 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1100 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1101 |
ImageEditor openOnClass:self andSelector:#hierarchicalListIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1102 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1103 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1104 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1105 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1106 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1107 |
constantNamed:'SystemBrowser class hierarchicalListIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1108 |
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@NAUUU0@R??8@GO?>@A0@C @\??88G@@N@A3?? @^@@8@N***@@@@@C b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1109 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1110 |
|
5997 | 1111 |
ignoredMethodIcon |
1112 |
<resource: #programImage> |
|
1113 |
||
1114 |
^ self padLockBlackMiniIcon |
|
1115 |
! |
|
1116 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1117 |
imageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1118 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1119 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1120 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1121 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1122 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1123 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1124 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1125 |
self imageIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1126 |
ImageEditor openOnClass:self andSelector:#imageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1127 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1128 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1129 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1130 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1131 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1132 |
constantNamed:'SystemBrowser class imageIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1133 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@H"H"H"H @BQBH!!D"H@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 51 153 153 51 255 255 255 153 0 255 255 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1134 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1135 |
|
10048
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1136 |
instVarOverlayXmlSpec |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1137 |
"This resource specification was automatically generated |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1138 |
by the ImageEditor of ST/X." |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1139 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1140 |
"Do not manually edit this!! If it is corrupted, |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1141 |
the ImageEditor may not be able to read the specification." |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1142 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1143 |
" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1144 |
self instVarOverlayXmlSpec inspect |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1145 |
ImageEditor openOnClass:self andSelector:#instVarOverlayXmlSpec |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1146 |
Icon flushCachedIcons |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1147 |
" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1148 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1149 |
<resource: #image> |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1150 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1151 |
^Icon |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1152 |
constantNamed:'SystemBrowser class instVarOverlayXmlSpec' |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1153 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BDP@@BID@@@"Q@@@BDP@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 84 84 84 170 170 170 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1154 |
@@@@@@@@@@@@@@@@BA@XFC@L[>[O8<=#[7X0CA XBA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1155 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1156 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1157 |
! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
1158 |
|
7992 | 1159 |
instrumentationIcon |
1160 |
<resource: #programImage> |
|
1161 |
||
1162 |
^ ToolbarIconLibrary pipette16x16Icon |
|
1163 |
! |
|
1164 |
||
3675 | 1165 |
medium_methodEmptyInheritedIcon |
1166 |
"This resource specification was automatically generated |
|
1167 |
by the ImageEditor of ST/X." |
|
1168 |
||
1169 |
"Do not manually edit this!! If it is corrupted, |
|
1170 |
the ImageEditor may not be able to read the specification." |
|
1171 |
||
1172 |
" |
|
1173 |
self medium_methodEmptyInheritedIcon inspect |
|
1174 |
ImageEditor openOnClass:self andSelector:#medium_methodEmptyInheritedIcon |
|
1175 |
" |
|
1176 |
||
1177 |
<resource: #image> |
|
1178 |
||
1179 |
^Icon |
|
7968 | 1180 |
constantNamed:'SystemBrowser class medium_methodEmptyInheritedIcon' |
3675 | 1181 |
ifAbsentPut:[(Depth4Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
1182 |
! |
|
1183 |
||
1184 |
medium_methodInheritedFromAboveAndRedefinedBelowIcon |
|
1185 |
"This resource specification was automatically generated |
|
1186 |
by the ImageEditor of ST/X." |
|
1187 |
||
1188 |
"Do not manually edit this!! If it is corrupted, |
|
1189 |
the ImageEditor may not be able to read the specification." |
|
1190 |
||
1191 |
" |
|
1192 |
self medium_methodInheritedFromAboveAndRedefinedBelowIcon inspect |
|
1193 |
ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveAndRedefinedBelowIcon |
|
4130 | 1194 |
Icon flushCachedIcons |
3675 | 1195 |
" |
1196 |
||
1197 |
<resource: #image> |
|
1198 |
||
1199 |
^Icon |
|
7968 | 1200 |
constantNamed:'SystemBrowser class medium_methodInheritedFromAboveAndRedefinedBelowIcon' |
4130 | 1201 |
ifAbsentPut:[(Depth2Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B()@B(@A@ @A@ @A@ (EP@HEP@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 127 255 127 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@/ B>@K8A7@G\@]0C:@O(@> @@@@@a') ; yourself); yourself] |
3675 | 1202 |
! |
1203 |
||
1204 |
medium_methodInheritedFromAboveIcon |
|
1205 |
"This resource specification was automatically generated |
|
1206 |
by the ImageEditor of ST/X." |
|
1207 |
||
1208 |
"Do not manually edit this!! If it is corrupted, |
|
1209 |
the ImageEditor may not be able to read the specification." |
|
1210 |
||
1211 |
" |
|
1212 |
self medium_methodInheritedFromAboveIcon inspect |
|
1213 |
ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveIcon |
|
4130 | 1214 |
Icon flushCachedIcons |
3675 | 1215 |
" |
1216 |
||
1217 |
<resource: #image> |
|
1218 |
||
1219 |
^Icon |
|
7968 | 1220 |
constantNamed:'SystemBrowser class medium_methodInheritedFromAboveIcon' |
4130 | 1221 |
ifAbsentPut:[(Depth1Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@ @B@@HA=0LG@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@ @B@@H@A0@G@@\@C8@O @>@@@@@@a') ; yourself); yourself] |
3675 | 1222 |
! |
1223 |
||
1224 |
medium_methodRedefinedBelowIcon |
|
1225 |
"This resource specification was automatically generated |
|
1226 |
by the ImageEditor of ST/X." |
|
1227 |
||
1228 |
"Do not manually edit this!! If it is corrupted, |
|
1229 |
the ImageEditor may not be able to read the specification." |
|
1230 |
||
1231 |
" |
|
1232 |
self medium_methodRedefinedBelowIcon inspect |
|
1233 |
ImageEditor openOnClass:self andSelector:#medium_methodRedefinedBelowIcon |
|
4130 | 1234 |
Icon flushCachedIcons |
3675 | 1235 |
" |
1236 |
||
1237 |
<resource: #image> |
|
1238 |
||
1239 |
^Icon |
|
7968 | 1240 |
constantNamed:'SystemBrowser class medium_methodRedefinedBelowIcon' |
4130 | 1241 |
ifAbsentPut:[(Depth1Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@ED@L@\@A0@B@@H@@"8@P@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 127 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O @>@C8@G@@\@A0@B@@H@@ @@@@@a') ; yourself); yourself] |
3675 | 1242 |
! |
1243 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1244 |
menuIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1245 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1246 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1247 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1248 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1249 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1250 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1251 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1252 |
self menuIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1253 |
ImageEditor openOnClass:self andSelector:#menuIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1254 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1255 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1256 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1257 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1258 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1259 |
constantNamed:'SystemBrowser class menuIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1260 |
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1261 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1262 |
|
3675 | 1263 |
methodEmptyInheritedIcon |
1264 |
^ self small_methodEmptyInheritedIcon |
|
1265 |
! |
|
1266 |
||
1267 |
methodInheritedFromAboveAndRedefinedBelowIcon |
|
1268 |
^ self small_methodInheritedFromAboveAndRedefinedBelowIcon |
|
1269 |
! |
|
1270 |
||
1271 |
methodInheritedFromAboveIcon |
|
1272 |
^ self small_methodInheritedFromAboveIcon |
|
1273 |
! |
|
1274 |
||
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1275 |
methodIsSubclassResponsibilityAndRedefinedBelowIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1276 |
"This resource specification was automatically generated |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1277 |
by the ImageEditor of ST/X." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1278 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1279 |
"Do not manually edit this!! If it is corrupted, |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1280 |
the ImageEditor may not be able to read the specification." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1281 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1282 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1283 |
self methodIsSubclassResponsibilityAndRedefinedBelowIcon inspect |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1284 |
ImageEditor openOnClass:self andSelector:#methodIsSubclassResponsibilityAndRedefinedBelowIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1285 |
Icon flushCachedIcons |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1286 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1287 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1288 |
<resource: #image> |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1289 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1290 |
^Icon |
7968 | 1291 |
constantNamed:'SystemBrowser class methodIsSubclassResponsibilityAndRedefinedBelowIcon' |
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1292 |
ifAbsentPut:[(Depth2Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' @D@@H@@@@@B@@@@@@4UBHR@A@@"@@@a') ; colorMapFromArray:#[0 0 0 255 127 127 127 127 127]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<HC DO@@>O#8\G@b') ; yourself); yourself] |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1293 |
! |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1294 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1295 |
methodIsSubclassResponsibilityIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1296 |
"This resource specification was automatically generated |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1297 |
by the ImageEditor of ST/X." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1298 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1299 |
"Do not manually edit this!! If it is corrupted, |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1300 |
the ImageEditor may not be able to read the specification." |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1301 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1302 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1303 |
self methodIsSubclassResponsibilityIcon inspect |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1304 |
ImageEditor openOnClass:self andSelector:#methodIsSubclassResponsibilityIcon |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1305 |
Icon flushCachedIcons |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1306 |
" |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1307 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1308 |
<resource: #image> |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1309 |
|
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1310 |
^Icon |
7968 | 1311 |
constantNamed:'SystemBrowser class methodIsSubclassResponsibilityIcon' |
5761
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1312 |
ifAbsentPut:[(Depth2Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' @D@@H@@@@@B@@@@@ 4@B@H@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 127 127 127 127 127]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<HC DO@@<IC0(I@b') ; yourself); yourself] |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1313 |
! |
b350e042dc9f
Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents:
5546
diff
changeset
|
1314 |
|
3675 | 1315 |
methodRedefinedBelowIcon |
1316 |
^ self small_methodRedefinedBelowIcon |
|
1317 |
! |
|
1318 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1319 |
nameSpaceIcon |
7827 | 1320 |
<resource: #programImage> |
1321 |
||
1322 |
^ ToolbarIconLibrary nameSpaceBrowserIcon |
|
1323 |
||
1324 |
"Modified: / 20-07-2007 / 09:12:26 / cg" |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1325 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1326 |
|
4308 | 1327 |
notificationClassIcon |
7827 | 1328 |
<resource: #programImage> |
1329 |
||
1330 |
^ ToolbarIconLibrary notificationClassBrowserIcon |
|
1331 |
||
1332 |
"Modified: / 20-07-2007 / 09:11:21 / cg" |
|
4308 | 1333 |
! |
1334 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1335 |
packageIcon |
8853 | 1336 |
<resource: #programImage> |
1337 |
||
1338 |
^ ToolbarIconLibrary smallYellowPackageIcon |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1339 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1340 |
|
6954 | 1341 |
packageIconGraySmall |
8853 | 1342 |
<resource: #programImage> |
1343 |
||
1344 |
^ ToolbarIconLibrary smallGrayPackageIcon |
|
6954 | 1345 |
! |
1346 |
||
6925 | 1347 |
packageIconGreenSmall |
8853 | 1348 |
<resource: #programImage> |
1349 |
||
1350 |
^ ToolbarIconLibrary smallGreenPackageIcon |
|
6925 | 1351 |
! |
1352 |
||
1353 |
packageIconOrangeSmall |
|
8853 | 1354 |
<resource: #programImage> |
1355 |
||
1356 |
^ ToolbarIconLibrary smallOrangePackageIcon |
|
6925 | 1357 |
! |
1358 |
||
6901 | 1359 |
packageIconSmall |
8853 | 1360 |
<resource: #programImage> |
1361 |
||
1362 |
^ ToolbarIconLibrary smallYellowPackageIcon |
|
6901 | 1363 |
! |
1364 |
||
5997 | 1365 |
padLockBlackMiniIcon |
6333 | 1366 |
<resource: #programImage> |
1367 |
||
1368 |
^ XPToolbarIconLibrary padLockBlackMiniIcon |
|
5997 | 1369 |
! |
1370 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1371 |
padLockBlueMiniIcon |
6333 | 1372 |
<resource: #programImage> |
1373 |
||
1374 |
^ XPToolbarIconLibrary padLockBlueMiniIcon |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1375 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1376 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1377 |
padLockGrayMiniIcon |
6333 | 1378 |
<resource: #programImage> |
1379 |
||
1380 |
^ GenericToolbarIconLibrary padLockGrayMiniIcon |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1381 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1382 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1383 |
padLockGreenMiniIcon |
6333 | 1384 |
<resource: #programImage> |
1385 |
||
1386 |
^ GenericToolbarIconLibrary padLockGreenMiniIcon |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1387 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1388 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1389 |
padLockRedMiniIcon |
6333 | 1390 |
<resource: #programImage> |
1391 |
||
1392 |
^ GenericToolbarIconLibrary padLockRedMiniIcon |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1393 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1394 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1395 |
privateMethodIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1396 |
<resource: #programImage> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1397 |
|
2748 | 1398 |
^ self padLockRedMiniIcon |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1399 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1400 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1401 |
programImageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1402 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1403 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1404 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1405 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1406 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1407 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1408 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1409 |
self programImageIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1410 |
ImageEditor openOnClass:self andSelector:#programImageIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1411 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1412 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1413 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1414 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1415 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1416 |
constantNamed:#'SystemBrowser class programImageIcon' |
2846 | 1417 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@H"H"H"H @BQBH!!D"H@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 25 77 77 51 255 255 128 128 0 128 77 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
1418 |
! |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1419 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1420 |
programMenuIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1421 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1422 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1423 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1424 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1425 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1426 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1427 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1428 |
self programMenuIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1429 |
ImageEditor openOnClass:self andSelector:#programMenuIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1430 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1431 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1432 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1433 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1434 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1435 |
constantNamed:#'SystemBrowser class programMenuIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1436 |
ifAbsentPut:[(Depth1Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A?<G?0@@A?<G?0@@A?<G?3@@@@@@@a') ; colorMapFromArray:#[0 0 0 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1437 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1438 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1439 |
protectedMethodIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1440 |
<resource: #programImage> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1441 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1442 |
^ self padLockGreenMiniIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1443 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1444 |
|
4308 | 1445 |
queryClassIcon |
7827 | 1446 |
<resource: #programImage> |
1447 |
||
1448 |
^ ToolbarIconLibrary queryClassBrowserIcon |
|
1449 |
||
1450 |
"Modified: / 20-07-2007 / 09:10:32 / cg" |
|
4308 | 1451 |
! |
1452 |
||
4166 | 1453 |
redCheckIcon |
1454 |
"This resource specification was automatically generated |
|
1455 |
by the ImageEditor of ST/X." |
|
1456 |
||
1457 |
"Do not manually edit this!! If it is corrupted, |
|
1458 |
the ImageEditor may not be able to read the specification." |
|
1459 |
||
1460 |
" |
|
1461 |
self redCheckIcon inspect |
|
1462 |
ImageEditor openOnClass:self andSelector:#redCheckIcon |
|
1463 |
Icon flushCachedIcons |
|
1464 |
" |
|
1465 |
||
1466 |
<resource: #image> |
|
1467 |
||
1468 |
^Icon |
|
1469 |
constantNamed:#'SystemBrowser class redCheckIcon' |
|
1470 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@"@@@@@@@BH@@@@ @@H @@@BH @"@@@@@BH"H @@@@@BH"@@@@@@@BH @@@@@@@B@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@A @L@!! GL@O0@^@@8@A@@@@@@a') ; yourself); yourself] |
|
1471 |
! |
|
1472 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1473 |
redLockIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1474 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1475 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1476 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1477 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1478 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1479 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1480 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1481 |
self redLockIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1482 |
ImageEditor openOnClass:self andSelector:#redLockIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1483 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1484 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1485 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1486 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1487 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1488 |
constantNamed:#'SystemBrowser class redLockIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1489 |
ifAbsentPut:[(Depth2Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@T@@AA@@AA@@EUP@EUP@EQP@EQP@EQP@EAP@AU@@@@@@') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'F@@$@BP@_ A>@G8@_ A>@G8@O@@@@@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1490 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1491 |
|
4165 | 1492 |
redThumbDownIcon |
10327 | 1493 |
^ ToolbarIconLibrary redThumbDownIcon |
1494 |
||
1495 |
"Modified: / 17-07-2011 / 10:04:37 / cg" |
|
4165 | 1496 |
! |
1497 |
||
4166 | 1498 |
redThumbDownSmallIcon |
10327 | 1499 |
^ ToolbarIconLibrary redThumbDownSmallIcon |
1500 |
||
1501 |
"Modified: / 17-07-2011 / 10:05:09 / cg" |
|
4166 | 1502 |
! |
1503 |
||
3813 | 1504 |
removeBreakPointIcon2 |
6115 | 1505 |
^ XPToolbarIconLibrary removeBreakPointIcon2 |
3813 | 1506 |
! |
1507 |
||
3675 | 1508 |
small_methodEmptyInheritedIcon |
1509 |
"This resource specification was automatically generated |
|
1510 |
by the ImageEditor of ST/X." |
|
1511 |
||
1512 |
"Do not manually edit this!! If it is corrupted, |
|
1513 |
the ImageEditor may not be able to read the specification." |
|
1514 |
||
1515 |
" |
|
1516 |
self small_methodEmptyInheritedIcon inspect |
|
1517 |
ImageEditor openOnClass:self andSelector:#small_methodEmptyInheritedIcon |
|
1518 |
" |
|
1519 |
||
1520 |
<resource: #image> |
|
1521 |
||
1522 |
^Icon |
|
1523 |
constantNamed:#'SystemBrowser class small_methodEmptyInheritedIcon' |
|
1524 |
ifAbsentPut:[(Depth4Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@b') ; yourself); yourself] |
|
1525 |
! |
|
1526 |
||
1527 |
small_methodInheritedFromAboveAndRedefinedBelowIcon |
|
1528 |
"This resource specification was automatically generated |
|
1529 |
by the ImageEditor of ST/X." |
|
1530 |
||
1531 |
"Do not manually edit this!! If it is corrupted, |
|
1532 |
the ImageEditor may not be able to read the specification." |
|
1533 |
||
1534 |
" |
|
1535 |
self small_methodInheritedFromAboveAndRedefinedBelowIcon inspect |
|
1536 |
ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveAndRedefinedBelowIcon |
|
4130 | 1537 |
Icon flushCachedIcons |
3675 | 1538 |
" |
1539 |
||
1540 |
<resource: #image> |
|
1541 |
||
1542 |
^Icon |
|
1543 |
constantNamed:#'SystemBrowser class small_methodInheritedFromAboveAndRedefinedBelowIcon' |
|
4130 | 1544 |
ifAbsentPut:[(Depth2Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'L1@DLLS,ES@@@@@0@@@*@L#@B@@3@@@a') ; colorMapFromArray:#[0 0 0 255 255 127 255 127 127 127 127 127]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'\GC8>O @>O#8\G@b') ; yourself); yourself] |
3675 | 1545 |
! |
1546 |
||
1547 |
small_methodInheritedFromAboveIcon |
|
1548 |
"This resource specification was automatically generated |
|
1549 |
by the ImageEditor of ST/X." |
|
1550 |
||
1551 |
"Do not manually edit this!! If it is corrupted, |
|
1552 |
the ImageEditor may not be able to read the specification." |
|
1553 |
||
1554 |
" |
|
1555 |
self small_methodInheritedFromAboveIcon inspect |
|
1556 |
ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveIcon |
|
4130 | 1557 |
Icon flushCachedIcons |
3675 | 1558 |
" |
1559 |
||
1560 |
<resource: #image> |
|
1561 |
||
1562 |
^Icon |
|
1563 |
constantNamed:#'SystemBrowser class small_methodInheritedFromAboveIcon' |
|
4130 | 1564 |
ifAbsentPut:[(Depth2Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'H#HDLHR@EP@@@@@@@BD@IP@!!@B@@IP@a') ; colorMapFromArray:#[0 0 0 255 255 127 127 127 127]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'\GC8>O @@@@@@@@b') ; yourself); yourself] |
3675 | 1565 |
! |
1566 |
||
1567 |
small_methodRedefinedBelowIcon |
|
1568 |
"This resource specification was automatically generated |
|
1569 |
by the ImageEditor of ST/X." |
|
1570 |
||
1571 |
"Do not manually edit this!! If it is corrupted, |
|
1572 |
the ImageEditor may not be able to read the specification." |
|
1573 |
||
1574 |
" |
|
1575 |
self small_methodRedefinedBelowIcon inspect |
|
1576 |
ImageEditor openOnClass:self andSelector:#small_methodRedefinedBelowIcon |
|
4130 | 1577 |
Icon flushCachedIcons |
3675 | 1578 |
" |
1579 |
||
1580 |
<resource: #image> |
|
1581 |
||
1582 |
^Icon |
|
1583 |
constantNamed:#'SystemBrowser class small_methodRedefinedBelowIcon' |
|
4130 | 1584 |
ifAbsentPut:[(Depth2Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@D@@@@@@@@@@@@@@@4UBHR@A@@"@@@a') ; colorMapFromArray:#[0 0 0 255 127 127 127 127 127]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@>O#8\G@b') ; yourself); yourself] |
3675 | 1585 |
! |
1586 |
||
3354 | 1587 |
startableClassIcon |
7827 | 1588 |
<resource: #programImage> |
1589 |
||
1590 |
^ ToolbarIconLibrary startableClassBrowserIcon |
|
1591 |
||
1592 |
"Created: / 05-11-2001 / 09:50:16 / cg" |
|
1593 |
"Modified: / 20-07-2007 / 09:09:40 / cg" |
|
3354 | 1594 |
! |
1595 |
||
1596 |
startableVisualAppIcon |
|
7827 | 1597 |
<resource: #programImage> |
1598 |
||
1599 |
^ ToolbarIconLibrary visualStartableClassBrowserIcon |
|
1600 |
||
1601 |
"Created: / 05-11-2001 / 09:49:00 / cg" |
|
1602 |
"Modified: / 20-07-2007 / 09:08:34 / cg" |
|
3354 | 1603 |
! |
1604 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1605 |
stopIcon |
12504 | 1606 |
<resource: #programImage> |
1607 |
||
1608 |
^ ToolbarIconLibrary stopPoint16x16 |
|
1609 |
"/ ^ self stopIcon2 |
|
1610 |
! |
|
1611 |
||
1612 |
stopIcon1 |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1613 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1614 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1615 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1616 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1617 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1618 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1619 |
" |
12504 | 1620 |
self stopIcon1 inspect |
1621 |
ImageEditor openOnClass:self andSelector:#stopIcon1 |
|
1622 |
Icon flushCachedIcons |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1623 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1624 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1625 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1626 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1627 |
^Icon |
12504 | 1628 |
constantNamed:'SystemBrowser stopIcon1' |
1629 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQH"H!!DQDAD!!DAD!!DQ@RDP@AD!!DPHQD@@QD!!DBDQ@@DQHQ@!!DQ@QDRDZHQDQDQD!!FBDQDADQHQ@RDP@AD!!DPDRDPDRDQDADRH"HQDQ@b') ; colorMapFromArray:#[255 255 255 255 0 0 128 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a') ; yourself); yourself] |
|
1630 |
! |
|
1631 |
||
1632 |
stopIcon2 |
|
1633 |
"This resource specification was automatically generated |
|
1634 |
by the ImageEditor of ST/X." |
|
1635 |
||
1636 |
"Do not manually edit this!! If it is corrupted, |
|
1637 |
the ImageEditor may not be able to read the specification." |
|
1638 |
||
1639 |
" |
|
1640 |
self stopIcon2 inspect |
|
1641 |
ImageEditor openOnClass:self andSelector:#stopIcon2 |
|
1642 |
Icon flushCachedIcons |
|
1643 |
" |
|
1644 |
||
1645 |
<resource: #image> |
|
1646 |
||
1647 |
^Icon |
|
1648 |
constantNamed:'SystemBrowser stopIcon2' |
|
1649 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQH"H!!DQDAD!!DQD!!DQ@RDQDQD!!DPHQDQDQD!!DBDSL3LQHQ@!!D@@@DRDZHQL3L1D!!FBDQDQDQHQ@RDQDQD!!DPDRDQDRDQDADRH"HQDQ@b') ; colorMapFromArray:#[255 255 255 255 0 0 128 0 0 255 163 163]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a') ; yourself); yourself] |
|
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1650 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1651 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1652 |
tabListIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1653 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1654 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1655 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1656 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1657 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1658 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1659 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1660 |
self tabListIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1661 |
ImageEditor openOnClass:self andSelector:#tabListIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1662 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1663 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1664 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1665 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1666 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1667 |
constantNamed:#'SystemBrowser class tabListIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1668 |
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@D3!!QP@@8TT@@N@@J@C***P@:**$AN**)@C***P@:**$@IUUUB @@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?8C?0O?0??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1669 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1670 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1671 |
tableColumnsIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1672 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1673 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1674 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1675 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1676 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1677 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1678 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1679 |
self tableColumnsIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1680 |
ImageEditor openOnClass:self andSelector:#tableColumnsIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1681 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1682 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1683 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1684 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1685 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1686 |
constantNamed:#'SystemBrowser class tableColumnsIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1687 |
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C??? @8(($@L@@AHC"""R@0@@D@NJJI@C@@@P@8(($@IUUU@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1688 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1689 |
|
4150 | 1690 |
testCaseClassIcon |
8862
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1691 |
<resource: #programImage> |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1692 |
|
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1693 |
"/ only left here for backward compatibility... |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1694 |
^ ToolbarIconLibrary testCaseClassIcon |
4150 | 1695 |
! |
1696 |
||
1697 |
testCaseClassIconFor:cls |
|
4167 | 1698 |
<resource: #programImage> |
1699 |
||
8862
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1700 |
"/ decision moved to TestCase - see there. |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1701 |
"/ only left here for backward compatibility... |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1702 |
|
4150 | 1703 |
|lastResult| |
1704 |
||
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
1705 |
lastResult := cls lastTestRunResultOrNil. |
4150 | 1706 |
|
1707 |
lastResult == true ifTrue:[ |
|
1708 |
^ self testCasePassedIcon |
|
1709 |
]. |
|
1710 |
lastResult == false ifTrue:[ |
|
1711 |
^ self testCaseFailedIcon |
|
1712 |
]. |
|
1713 |
^ self testCaseUnknownResultIcon |
|
6848 | 1714 |
|
1715 |
"Modified: / 06-08-2006 / 11:14:12 / cg" |
|
4150 | 1716 |
! |
1717 |
||
1718 |
testCaseFailedIcon |
|
4166 | 1719 |
<resource: #programImage> |
1720 |
||
8862
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1721 |
"/ only left here for backward compatibility... |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1722 |
^ ToolbarIconLibrary testCaseFailedIcon |
4150 | 1723 |
! |
1724 |
||
1725 |
testCasePassedIcon |
|
8862
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1726 |
<resource: #programImage> |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1727 |
|
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1728 |
"/ only left here for backward compatibility... |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1729 |
^ ToolbarIconLibrary testCasePassedIcon |
4150 | 1730 |
! |
1731 |
||
1732 |
testCaseUnknownResultIcon |
|
4166 | 1733 |
<resource: #programImage> |
1734 |
||
8862
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1735 |
"/ only left here for backward compatibility... |
dece7957557d
comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents:
8853
diff
changeset
|
1736 |
^ ToolbarIconLibrary testCaseClassIcon |
4150 | 1737 |
! |
1738 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1739 |
timeIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1740 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1741 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1742 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1743 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1744 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1745 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1746 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1747 |
self timeIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1748 |
ImageEditor openOnClass:self andSelector:#timeIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1749 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1750 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1751 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1752 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1753 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1754 |
constantNamed:#'SystemBrowser class timeIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1755 |
ifAbsentPut:[(Depth1Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@G@A7@G\@=8C0 O>@_0A?@A0@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A0@_0C? O>A?<G?0_?@?8C? G<@G@@@a') ; yourself); yourself] |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1756 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1757 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1758 |
traceIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1759 |
"This resource specification was automatically generated |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1760 |
by the ImageEditor of ST/X." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1761 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1762 |
"Do not manually edit this!! If it is corrupted, |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1763 |
the ImageEditor may not be able to read the specification." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1764 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1765 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1766 |
self traceIcon inspect |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1767 |
ImageEditor openOnClass:self andSelector:#traceIcon |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1768 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1769 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1770 |
<resource: #image> |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1771 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1772 |
^Icon |
8478
ca4c5daa3fb3
image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents:
8281
diff
changeset
|
1773 |
constantNamed:#'SystemBrowser class traceIcon' |
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
1774 |
ifAbsentPut:[(Depth1Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@>@C8@G@@\@@ @B@@@@@@@@@@@a') ; colorMapFromArray:#[255 0 0 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?A?<C? O>@_0A?@C8@O @\@A0@B@@@a') ; yourself); yourself] |
2830 | 1775 |
! |
1776 |
||
1777 |
visualStartableClassIcon |
|
1778 |
"This resource specification was automatically generated |
|
1779 |
by the ImageEditor of ST/X." |
|
1780 |
||
1781 |
"Do not manually edit this!! If it is corrupted, |
|
1782 |
the ImageEditor may not be able to read the specification." |
|
1783 |
||
1784 |
" |
|
1785 |
self visualStartableClassIcon inspect |
|
1786 |
ImageEditor openOnClass:self andSelector:#visualStartableClassIcon |
|
1787 |
" |
|
1788 |
||
1789 |
<resource: #image> |
|
1790 |
||
1791 |
^Icon |
|
2892 | 1792 |
constantNamed:#'SystemBrowser class visualStartableClassIcon' |
3354 | 1793 |
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'**J*NJ*"*#"*!!J(@*!!T*@J(DJ B*DR(@*!!T*NJ(*J B*O2(@*+.*@J*** @b') ; colorMapFromArray:#[0 0 0 127 127 127 255 0 0 255 255 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@ @B@@\@C8@O @>@C8@H @>@A0@G@@@a') ; yourself); yourself] |
1794 |
||
1795 |
"Modified: / 5.11.2001 / 09:49:30 / cg" |
|
2892 | 1796 |
! |
1797 |
||
4275 | 1798 |
warningClassIcon |
7827 | 1799 |
<resource: #programImage> |
1800 |
||
1801 |
^ ToolbarIconLibrary warningClassBrowserIcon |
|
1802 |
||
1803 |
"Modified: / 20-07-2007 / 09:04:39 / cg" |
|
4275 | 1804 |
! |
1805 |
||
2892 | 1806 |
watchIcon |
1807 |
"This resource specification was automatically generated |
|
1808 |
by the ImageEditor of ST/X." |
|
1809 |
||
1810 |
"Do not manually edit this!! If it is corrupted, |
|
1811 |
the ImageEditor may not be able to read the specification." |
|
1812 |
||
1813 |
" |
|
1814 |
self watchIcon inspect |
|
1815 |
ImageEditor openOnClass:self andSelector:#watchIcon |
|
1816 |
" |
|
1817 |
||
1818 |
<resource: #image> |
|
1819 |
||
1820 |
^Icon |
|
1821 |
constantNamed:#'SystemBrowser class watchIcon' |
|
1822 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 12; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@X@@@X@@@@AE XQY @@XALCDFD@@AD0@CDV@@XAL@@1A @AD0@P@1D@XBI!!DVH A QUPQEEU@@%"EDAVHT@IX]R@%!!5@FQUH@@%U@A&H$@@P"X@') ; colorMapFromArray:#[0 0 51 0 0 60 0 51 102 51 102 153 71 102 145 128 213 221 153 153 204 153 255 255 255 255 255]; mask:((Depth1Image new) width: 13; height: 12; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'FL@]0C7 O>A?<G?0??#=>O78?_#8>GA0') ; yourself); yourself] |
|
3354 | 1823 |
! |
1824 |
||
4143 | 1825 |
windowClassIcon |
7827 | 1826 |
<resource: #programImage> |
1827 |
||
1828 |
^ ToolbarIconLibrary windowClassBrowserIcon |
|
1829 |
||
1830 |
"Modified: / 20-07-2007 / 09:05:57 / cg" |
|
4143 | 1831 |
! |
1832 |
||
3354 | 1833 |
windowIcon |
1834 |
"This resource specification was automatically generated |
|
1835 |
by the ImageEditor of ST/X." |
|
1836 |
||
1837 |
"Do not manually edit this!! If it is corrupted, |
|
1838 |
the ImageEditor may not be able to read the specification." |
|
1839 |
||
1840 |
" |
|
1841 |
self windowIcon inspect |
|
1842 |
ImageEditor openOnClass:self andSelector:#windowIcon |
|
1843 |
" |
|
1844 |
||
1845 |
<resource: #image> |
|
1846 |
||
1847 |
^Icon |
|
1848 |
constantNamed:#'SystemBrowser class windowIcon' |
|
1849 |
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@.;.;.;.0@@@@@@@@@@C.;.;.;/@@9&Y&Y&XP@NY&Y&Y&D@C&Y&Y&Y!!@@9&Y&Y&XP@NY&Y&Y&D@C1DQDQDQ@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself] |
|
1850 |
||
1851 |
"Created: / 5.11.2001 / 09:39:03 / cg" |
|
2846 | 1852 |
! ! |
2692 | 1853 |
|
1203 | 1854 |
!SystemBrowser class methodsFor:'interface specs'! |
1855 |
||
1367 | 1856 |
metaSpec |
1857 |
"UIPainter new openOnClass: self andSelector: #metaSpec" |
|
1858 |
||
1859 |
<resource: #canvas> |
|
1860 |
^#(#FullSpec |
|
1861 |
#window: |
|
1862 |
#(#WindowSpec |
|
1863 |
#label: 'Unlabeled Canvas' |
|
1864 |
#bounds: #(#Rectangle 27 249 325 334 ) ) |
|
1865 |
#component: |
|
1866 |
#(#SpecCollection |
|
1867 |
#collection: #( |
|
1868 |
#(#RadioButtonSpec |
|
1869 |
#layout: #(#LayoutFrame 0 0 4 0 -1 0.575 20 0 ) |
|
1870 |
#name: #instanceSwitch |
|
1871 |
#model: #metaHolder |
|
1872 |
#callbacksSpec: |
|
1873 |
#(#UIEventCallbackSubSpec |
|
1874 |
#requestValueChangeSelector: #changeRequest ) |
|
1875 |
#label: 'instance' |
|
1876 |
#select: false ) |
|
1877 |
#(#RadioButtonSpec |
|
1878 |
#layout: #(#LayoutFrame 1 0.575 4 0 -1 1 20 0 ) |
|
1879 |
#name: #classSwitch |
|
1880 |
#model: #metaHolder |
|
1881 |
#callbacksSpec: |
|
1882 |
#(#UIEventCallbackSubSpec |
|
1883 |
#requestValueChangeSelector: #changeRequest ) |
|
1884 |
#label: 'class' |
|
1885 |
#select: true ) ) ) ) |
|
1886 |
||
1887 |
"Created: / 30.10.1997 / 19:07:29 / cg" |
|
1888 |
! |
|
1889 |
||
1203 | 1890 |
methodMoveDialogSpec |
1891 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
1892 |
||
1893 |
"do not manually edit this - the painter/builder may not be able to |
|
1894 |
handle the specification if its corrupted." |
|
1895 |
||
1896 |
" |
|
1897 |
UIPainter new openOnClass:SystemBrowser andSelector:#methodMoveDialogSpec |
|
1898 |
SystemBrowser new openDialogInterface:#methodMoveDialogSpec |
|
1899 |
" |
|
1900 |
||
1901 |
<resource: #canvas> |
|
1902 |
||
1903 |
^ |
|
1904 |
||
1905 |
#(#FullSpec |
|
1906 |
#'window:' |
|
1907 |
#(#WindowSpec |
|
1908 |
#'name:' 'uIPainterView' |
|
1909 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1910 |
#'label:' 'move method' |
|
1911 |
#'bounds:' #(#Rectangle 0 0 279 118) |
|
1912 |
) |
|
1913 |
#'component:' |
|
1914 |
#(#SpecCollection |
|
1915 |
#'collection:' |
|
1916 |
#( |
|
1917 |
#(#HorizontalPanelViewSpec |
|
1918 |
#'name:' 'horizontalPanelView' |
|
1919 |
#'layout:' #(#LayoutFrame 0 0.0 -35 1.0 0 1.0 -2 1.0) |
|
1920 |
#'component:' |
|
1921 |
#(#SpecCollection |
|
1922 |
#'collection:' |
|
1923 |
#( |
|
1924 |
#(#ActionButtonSpec |
|
1925 |
#'name:' 'actionButton2' |
|
1926 |
#'label:' 'cancel' |
|
1927 |
#'tabable:' true |
|
1928 |
#'model:' #cancel |
|
1929 |
#'extent:' #(#Point 133 27) |
|
1930 |
) |
|
1931 |
#(#ActionButtonSpec |
|
1932 |
#'name:' 'actionButton1' |
|
1933 |
#'label:' 'move' |
|
1934 |
#'tabable:' true |
|
1935 |
#'isDefault:' true |
|
1936 |
#'model:' #accept |
|
1937 |
#'extent:' #(#Point 134 27) |
|
1938 |
) |
|
1939 |
) |
|
1940 |
) |
|
1941 |
#'level:' 0 |
|
1942 |
#'horizontalLayout:' #fitSpace |
|
1943 |
#'verticalLayout:' #center |
|
1944 |
#'horizontalSpace:' 4 |
|
1945 |
#'verticalSpace:' 4 |
|
1946 |
) |
|
1947 |
#(#LabelSpec |
|
1948 |
#'name:' 'label' |
|
1949 |
#'layout:' #(#LayoutFrame 2 0 2 0 -2 1.0 25 0) |
|
1950 |
#'label:' 'move current method to which class:' |
|
1951 |
#'style:' |
|
1952 |
#(#Font |
|
1953 |
'helvetica' 'medium' |
|
1954 |
'roman' 12 |
|
1955 |
) |
|
1956 |
#'foregroundColor:' #(#Color 0.0 0.0 0.0) |
|
1957 |
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993) |
|
1958 |
#'adjust:' #left |
|
1959 |
) |
|
1960 |
#(#ComboBoxSpec |
|
1961 |
#'name:' 'comboBox1' |
|
1962 |
#'layout:' #(#LayoutFrame 2 0 29 0 -2 1.0 51 0) |
|
1963 |
#'tabable:' true |
|
1964 |
#'model:' #className |
|
1965 |
#'comboList:' #classList |
|
1966 |
) |
|
1967 |
) |
|
1968 |
) |
|
1969 |
) |
|
1970 |
||
1971 |
"Created: 25.6.1997 / 13:45:20 / cg" |
|
1972 |
"Modified: 25.6.1997 / 13:46:44 / cg" |
|
1973 |
! ! |
|
1974 |
||
4860 | 1975 |
!SystemBrowser class methodsFor:'private-helpers'! |
36 | 1976 |
|
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1977 |
askForPackageChangeFrom:oldPkg to:newPkg |
3626 | 1978 |
|answer box notAgain chk| |
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1979 |
|
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1980 |
box := OptionBox |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1981 |
title: |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1982 |
('You are about to change a method from another (system-) package. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1983 |
The methods original packageID was ''%1''. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1984 |
If you proceed, the new method will be marked as belonging |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1985 |
to the ''%2'' package (and this warning will not be shown again). |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1986 |
If you proceed with ''keep'', the new method will be installed |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1987 |
but the old packageID will be preserved. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1988 |
Otherwise, hit ''cancel'' to leave the code unchanged. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1989 |
|
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1990 |
PS: if you disable this check here, it can be reenabled it in the launchers settings-compilation dialog.' |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1991 |
bindWith:(oldPkg allBold) |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1992 |
with:(newPkg allBold)) |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1993 |
numberOfOptions:3. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1994 |
|
3476 | 1995 |
box buttonTitles:#('Cancel' 'Keep' 'Continue'). |
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1996 |
box defaultButtonIndex:3. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1997 |
box action:[:n | answer := #(#cancel #keep #continue) at:n]. |
5833
5c2a75846afc
Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents:
5802
diff
changeset
|
1998 |
box label:'Method redefinition'; image:(WarningBox iconBitmap). |
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
1999 |
box yPosition:(box formLabel bottom max:box textLabel bottom). |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2000 |
box addVerticalSpace:10. |
11291
d4d27edd6ab4
changed: #askForPackageChangeFrom:to:
Claus Gittinger <cg@exept.de>
parents:
11271
diff
changeset
|
2001 |
chk := box addCheckBoxAtBottom:'Dont show this dialog again (never keep)' on:(notAgain := false asValue). |
8158
f7b891e7fb75
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8139
diff
changeset
|
2002 |
box preferredExtent:(box preferredExtent + (0 @ chk preferredHeight) + (0@10)). |
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2003 |
box resize. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2004 |
box showAtPointer. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2005 |
box destroy. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2006 |
|
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2007 |
(answer ~~ #cancel) ifTrue:[ |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2008 |
notAgain value ifTrue:[ |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2009 |
Class catchMethodRedefinitions:false. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2010 |
]. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2011 |
]. |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2012 |
^ answer. |
11291
d4d27edd6ab4
changed: #askForPackageChangeFrom:to:
Claus Gittinger <cg@exept.de>
parents:
11271
diff
changeset
|
2013 |
|
d4d27edd6ab4
changed: #askForPackageChangeFrom:to:
Claus Gittinger <cg@exept.de>
parents:
11271
diff
changeset
|
2014 |
"Modified: / 28-02-2012 / 10:41:52 / cg" |
2880
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2015 |
! |
ef6fcc02a924
give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents:
2846
diff
changeset
|
2016 |
|
203 | 2017 |
showNoneFound |
3244 | 2018 |
self warn:(self classResources string:'None found.'). |
203 | 2019 |
! |
36 | 2020 |
|
203 | 2021 |
showNoneFound:what |
1620 | 2022 |
|rs| |
2023 |
||
2024 |
rs := self classResources. |
|
3244 | 2025 |
self information:((rs string:what) , (rs string:'...\\... none found.')) withCRs. |
203 | 2026 |
! ! |
36 | 2027 |
|
4860 | 2028 |
!SystemBrowser class methodsFor:'private-instance creation'! |
203 | 2029 |
|
2030 |
newWithLabel:aString setupBlock:aBlock |
|
2031 |
"common helper method for all creation methods" |
|
2032 |
||
2033 |
^ self newWithLabel:aString setupBlock:aBlock onDevice:Screen current |
|
36 | 2034 |
! |
2035 |
||
203 | 2036 |
newWithLabel:aString setupBlock:aBlock onDevice:aWorkstation |
2037 |
"common helper method for all creation methods" |
|
36 | 2038 |
|
203 | 2039 |
|newBrowser| |
45 | 2040 |
|
203 | 2041 |
newBrowser := BrowserView onDevice:aWorkstation. |
2042 |
newBrowser title:aString. |
|
2043 |
aBlock value:newBrowser. |
|
45 | 2044 |
|
203 | 2045 |
newBrowser open. |
2046 |
^ newBrowser |
|
2047 |
! |
|
45 | 2048 |
|
203 | 2049 |
newWithLabel:aString setupSelector:aSymbol arg:arg |
2050 |
"common helper method for all creation methods" |
|
36 | 2051 |
|
203 | 2052 |
^ self newWithLabel:aString setupSelector:aSymbol arg:arg onDevice:Screen current |
36 | 2053 |
! |
2054 |
||
203 | 2055 |
newWithLabel:aString setupSelector:aSymbol arg:arg onDevice:aWorkstation |
2056 |
"common helper method for all creation methods" |
|
2057 |
||
2058 |
|newBrowser| |
|
52 | 2059 |
|
203 | 2060 |
newBrowser := BrowserView onDevice:aWorkstation. |
2061 |
newBrowser title:aString. |
|
2062 |
newBrowser perform:aSymbol with:arg. |
|
2063 |
newBrowser open. |
|
2064 |
^ newBrowser |
|
2065 |
! ! |
|
2066 |
||
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2067 |
!SystemBrowser class methodsFor:'special search startup'! |
203 | 2068 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2069 |
allCallsOn:aSelectorString |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2070 |
"return a collection of methods which send aSelector." |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2071 |
|
9007 | 2072 |
^ self |
2073 |
allCallsOn:aSelectorString |
|
2074 |
in:(Smalltalk allClasses) |
|
2075 |
ignoreCase:false |
|
2076 |
match:false |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2077 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2078 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2079 |
SystemBrowser allCallsOn:#at:put: |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2080 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2081 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2082 |
"Created: 24.1.1997 / 19:42:57 / cg" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2083 |
! |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2084 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2085 |
allCallsOn:aSelectorString in:aCollectionOfClasses |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2086 |
"return a collection of methods which send aSelector. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2087 |
Methods from classes in aCollectionOfClasses are searched only." |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2088 |
|
9007 | 2089 |
^ self |
2090 |
allCallsOn:aSelectorString |
|
2091 |
in:aCollectionOfClasses |
|
2092 |
ignoreCase:false |
|
2093 |
match:false |
|
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2094 |
! |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2095 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2096 |
allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2097 |
"return a collection of methods which send aSelector. |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2098 |
Methods from classes in aCollectionOfClasses are searched only." |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2099 |
|
9007 | 2100 |
^ self |
2101 |
allCallsOn:aSelectorString |
|
2102 |
in:aCollectionOfClasses |
|
2103 |
ignoreCase:ignoreCase |
|
2104 |
match:true |
|
4270 | 2105 |
|
2106 |
" |
|
2107 |
SystemBrowser allCallsOn:#at:put: in:(Smalltalk allClasses) |
|
2108 |
" |
|
2109 |
||
2110 |
"Modified: 18.4.1997 / 10:32:50 / cg" |
|
2111 |
! |
|
2112 |
||
2113 |
allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
2114 |
"return a collection of methods which send aSelector. |
|
2115 |
Methods from classes in aCollectionOfClasses are searched only." |
|
2116 |
||
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
2117 |
|sel searchBlock classesSearched| |
3471
4c4b41516d96
care for empty selector in allCallsOn.
Claus Gittinger <cg@exept.de>
parents:
3470
diff
changeset
|
2118 |
|
4c4b41516d96
care for empty selector in allCallsOn.
Claus Gittinger <cg@exept.de>
parents:
3470
diff
changeset
|
2119 |
aSelectorString size == 0 ifTrue:[ ^ #() ]. |
4270 | 2120 |
doMatch ifFalse:[ |
5090 | 2121 |
ignoreCase ifFalse:[ |
2122 |
sel := aSelectorString asSymbolIfInterned. |
|
2123 |
sel isNil ifTrue:[ |
|
2124 |
^ #() "/ none (no such selector) |
|
2125 |
]. |
|
4270 | 2126 |
]. |
2127 |
]. |
|
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
2128 |
|
2901 | 2129 |
classesSearched := aCollectionOfClasses. |
4270 | 2130 |
(doMatch and:[aSelectorString includesMatchCharacters]) ifFalse:[ |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
2131 |
"/ exclude javaClasses, if selector cannot be a valid java-selector |
4270 | 2132 |
(aSelectorString includes:$() ifFalse:[ |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
2133 |
classesSearched := classesSearched select:[:eachClass | eachClass theNonMetaclass isJavaClass not]. |
2846 | 2134 |
]. |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2135 |
]. |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
2136 |
|
4270 | 2137 |
searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatch. |
4332 | 2138 |
searchBlock isNil ifTrue:[ |
2139 |
^ #() "/ none (no such selector) |
|
2140 |
]. |
|
2901 | 2141 |
^ self allMethodsIn:classesSearched where:searchBlock |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2142 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2143 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2144 |
SystemBrowser allCallsOn:#at:put: in:(Smalltalk allClasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2145 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2146 |
|
1143
0707461e582a
avoid compilation of lazy methods when searching for senders
Claus Gittinger <cg@exept.de>
parents:
1059
diff
changeset
|
2147 |
"Modified: 18.4.1997 / 10:32:50 / cg" |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2148 |
! |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2149 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2150 |
allMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2151 |
"return a collection of methods which pass the given test. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2152 |
wantInst/wantClass control if instMethods and/or classMethods are to be |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2153 |
considered. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2154 |
Only classes in aCollectionOfClasses are inspected in the search" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2155 |
|
2769 | 2156 |
|list activePriority| |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2157 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2158 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2159 |
since this may take a long time, lower my priority ... |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2160 |
" |
2769 | 2161 |
activePriority := Processor activePriority. |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
2162 |
Processor activeProcess |
2769 | 2163 |
withPriority:activePriority-1 to:activePriority |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
2164 |
do:[ |
2484
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2165 |
|checkedClasses checkBlock detectedMethods| |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2166 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2167 |
checkedClasses := IdentitySet new. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2168 |
list := OrderedCollection new. |
2484
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2169 |
detectedMethods := IdentitySet new. |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2170 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2171 |
checkBlock := [:cls | |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2172 |
(checkedClasses includes:cls) ifFalse:[ |
8554
441ea25ad1fd
Do not complain about obsolete classes which are unloaded when searching
Stefan Vogel <sv@exept.de>
parents:
8505
diff
changeset
|
2173 |
(cls isObsolete and:[cls isLoaded]) ifTrue:[ |
2882 | 2174 |
Transcript showCR:'Browser method search: skipping obsolete class: ' , cls displayString |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2175 |
] ifFalse:[ |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2176 |
cls methodDictionary keysAndValuesDo:[:sel :method | |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2177 |
(aBlock value:cls value:method value:sel) ifTrue:[ |
2484
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2178 |
"/ care for methods being in multiple classes (should not happen) |
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2179 |
(detectedMethods includes:method) ifFalse:[ |
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2180 |
list add:method. |
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2181 |
detectedMethods add:method |
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2182 |
] |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2183 |
] |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2184 |
]. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2185 |
checkedClasses add:cls. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2186 |
] |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2187 |
] |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2188 |
]. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2189 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2190 |
aCollectionOfClasses do:[:aClass | |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2191 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2192 |
output disabled - it slows down things too much (when searching for |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2193 |
implementors or senders) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2194 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2195 |
wantInst ifTrue:[ |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2196 |
"/ Transcript show:'searching '; show:aClass name; showCR:' ...'; endEntry. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2197 |
checkBlock value:aClass |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2198 |
]. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2199 |
wantClass ifTrue:[ |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2200 |
"/ Transcript show:'searching '; show:aClass class name; showCR:' ...'; endEntry. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2201 |
checkBlock value:(aClass class) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2202 |
]. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2203 |
Processor yield |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2204 |
] |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2205 |
]. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2206 |
^ list |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2207 |
|
2484
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2208 |
"Created: / 24.1.1997 / 19:41:12 / cg" |
afd8d8dbd9e2
care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents:
2439
diff
changeset
|
2209 |
"Modified: / 14.12.1999 / 14:59:02 / cg" |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2210 |
! |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2211 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2212 |
allMethodsIn:aCollectionOfClasses where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2213 |
"return a collection of methods which pass the given test. |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2214 |
Only classes in aCollectionOfClasses are inspected in the search" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2215 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2216 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2217 |
allMethodsIn:aCollectionOfClasses |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2218 |
inst:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2219 |
class:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2220 |
where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2221 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2222 |
"Created: 24.1.1997 / 19:41:49 / cg" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2223 |
! |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2224 |
|
203 | 2225 |
aproposSearch:aString |
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
2226 |
"browse all methods, which have aString in their selector." |
203 | 2227 |
|
2228 |
^ self aproposSearch:aString in:(Smalltalk allClasses) |
|
75 | 2229 |
|
52 | 2230 |
! |
2231 |
||
203 | 2232 |
aproposSearch:aString in:aCollectionOfClasses |
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
2233 |
"browse all methods, which have aString. |
203 | 2234 |
This is relatively slow, since all source must be processed." |
52 | 2235 |
|
203 | 2236 |
|matchString list s searchBlock browser| |
52 | 2237 |
|
203 | 2238 |
matchString := '*' , aString , '*'. |
52 | 2239 |
|
203 | 2240 |
list := OrderedCollection new. |
52 | 2241 |
|
203 | 2242 |
(aString includesMatchCharacters) ifTrue:[ |
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
2243 |
s := '*' , aString asLowercase , '*'. |
256 | 2244 |
"a matchString" |
2245 |
searchBlock := [:text | (text asCollectionOfLinesfindFirst:[:line | s match:line]) ~~ 0]. |
|
203 | 2246 |
] ifFalse:[ |
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
2247 |
searchBlock := [:source | (source findString:aString asLowercase) ~~ 0] |
203 | 2248 |
]. |
52 | 2249 |
|
203 | 2250 |
browser := self browseMethodsIn:aCollectionOfClasses |
256 | 2251 |
where:[:class :method :sel | |
2252 |
|comment| |
|
52 | 2253 |
|
2655
9e90bbd1eb18
apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents:
2642
diff
changeset
|
2254 |
(searchBlock value:sel asLowercase) |
256 | 2255 |
] |
2729
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
2256 |
title:(self classResources string:'selectors containing: %1' with:aString). |
52 | 2257 |
|
203 | 2258 |
browser notNil ifTrue:[ |
256 | 2259 |
browser autoSearch:aString |
203 | 2260 |
]. |
2261 |
^ browser |
|
52 | 2262 |
|
2263 |
" |
|
203 | 2264 |
SystemBrowser aproposSearch:'append' in:(Collection withAllSubclasses) |
2265 |
SystemBrowser aproposSearch:'add' in:(Collection withAllSubclasses) |
|
2266 |
SystemBrowser aproposSearch:'sort' in:(Collection withAllSubclasses) |
|
2267 |
SystemBrowser aproposSearch:'[Aa]bsent' in:(Collection withAllSubclasses) |
|
52 | 2268 |
" |
203 | 2269 |
|
256 | 2270 |
"Created: 9.12.1995 / 18:02:36 / cg" |
204
6f4460d5a09d
added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
2271 |
! |
6f4460d5a09d
added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents:
203
diff
changeset
|
2272 |
|
203 | 2273 |
browseAllCallsOn:aSelectorString |
4490 | 2274 |
"launch a browser for all senders of aSelector. |
2275 |
Notice: better go via Smalltalk browseAllCallsOn:, which honors the tool-preferences" |
|
52 | 2276 |
|
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2277 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2278 |
browseAllCallsOn:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2279 |
in:(Smalltalk allClasses) |
52 | 2280 |
|
2281 |
" |
|
203 | 2282 |
SystemBrowser browseAllCallsOn:#+ |
52 | 2283 |
" |
256 | 2284 |
|
2285 |
"Created: 9.12.1995 / 18:00:41 / cg" |
|
666 | 2286 |
"Modified: 10.7.1996 / 10:26:15 / cg" |
2287 |
! |
|
2288 |
||
2289 |
browseAllCallsOn:aSelectorString in:aSetOfClasses |
|
2290 |
"launch a browser for all senders of aSelector" |
|
2291 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2292 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2293 |
browseAllCallsOn:aSelectorString |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2294 |
in:aSetOfClasses |
4200 | 2295 |
title:(self classResources string:'Senders of: %1' with:aSelectorString) |
666 | 2296 |
|
2297 |
" |
|
2298 |
SystemBrowser browseAllCallsOn:#+ in:(Number withAllSubclasses) |
|
2299 |
" |
|
2300 |
||
2301 |
"Created: 10.7.1996 / 10:25:49 / cg" |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2302 |
"Modified: 24.1.1997 / 19:49:34 / cg" |
52 | 2303 |
! |
2304 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2305 |
browseAllCallsOn:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2306 |
"launch a browser for all senders of aSelector" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2307 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2308 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2309 |
browseAllCallsOn:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2310 |
in:aSetOfClasses |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2311 |
ignoreCase:ignoreCase |
6476 | 2312 |
title:(self classResources string:'Senders of: %1' with:aSelectorString) |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2313 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2314 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2315 |
SystemBrowser browseAllCallsOn:#+ in:(Number withAllSubclasses) |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2316 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2317 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2318 |
"Created: 10.7.1996 / 10:25:49 / cg" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2319 |
"Modified: 24.1.1997 / 19:49:34 / cg" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2320 |
! |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2321 |
|
11271 | 2322 |
browseAllCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:match title:titleArg |
52 | 2323 |
"launch a browser for all senders of aSelector in aCollectionOfClasses" |
2324 |
||
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2325 |
|list list2 browser selWithColon title rs| |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2326 |
|
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2327 |
title := titleArg. |
4200 | 2328 |
|
4270 | 2329 |
list := self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:true. |
4200 | 2330 |
list isEmpty ifTrue:[ |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2331 |
aSelectorString numArgs == 0 ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2332 |
selWithColon := aSelectorString , ':'. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2333 |
selWithColon knownAsSymbol ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2334 |
list2 := self allCallsOn:selWithColon in:aCollectionOfClasses ignoreCase:ignoreCase match:true. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2335 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2336 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2337 |
list2 size == 0 ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2338 |
self showNoneFound:title. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2339 |
^ nil |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2340 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2341 |
rs := self classResources. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2342 |
(Dialog confirm:((rs string:title) , |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2343 |
(rs string:'...\\... none found.') , |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2344 |
(rs string:'\\But I found %1 sends of the "%2" message (with colon).\\Browse those ?' |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2345 |
with:list2 size |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2346 |
with:selWithColon allBold)) withCRs) ifFalse:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2347 |
^ nil |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2348 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2349 |
list := list2. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2350 |
title := title , ':'. |
4200 | 2351 |
]. |
2352 |
||
2353 |
browser := self browseMethods:list title:title. |
|
52 | 2354 |
browser notNil ifTrue:[ |
648
6ec086b7972c
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
634
diff
changeset
|
2355 |
|s| |
52 | 2356 |
|
8139
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2357 |
"/ " |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2358 |
"/ kludge for now, if its a multipart selector, |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2359 |
"/ no easy search is (as yet) possible |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2360 |
"/ " |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2361 |
"/ s := aSelectorString. |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2362 |
"/ (s includes:$:) ifTrue:[ |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2363 |
"/ s := s copyTo:(s indexOf:$:) |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2364 |
"/ ]. |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2365 |
"/ browser autoSearch:s |
acdaec7c63a0
auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents:
8129
diff
changeset
|
2366 |
browser autoSearchSelector:aSelectorString ignoreCase:ignoreCase doMatch:true. |
52 | 2367 |
]. |
2368 |
^ browser |
|
648
6ec086b7972c
Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents:
634
diff
changeset
|
2369 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2370 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2371 |
SystemBrowser |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2372 |
browseAllCallsOn:#+ |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2373 |
in:(Number withAllSubclasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2374 |
title:'just a test' |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2375 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2376 |
|
11271 | 2377 |
"Modified: / 24-01-1997 / 19:48:54 / cg" |
2378 |
"Created: / 14-02-2012 / 14:19:51 / cg" |
|
2379 |
! |
|
2380 |
||
2381 |
browseAllCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg |
|
2382 |
"launch a browser for all senders of aSelector in aCollectionOfClasses" |
|
2383 |
||
2384 |
^ self |
|
2385 |
browseAllCallsOn:aSelectorString |
|
2386 |
in:aCollectionOfClasses |
|
2387 |
ignoreCase:ignoreCase |
|
2388 |
match:true |
|
2389 |
title:titleArg |
|
2390 |
||
2391 |
" |
|
2392 |
SystemBrowser |
|
2393 |
browseAllCallsOn:#+ |
|
2394 |
in:(Number withAllSubclasses) |
|
2395 |
title:'just a test' |
|
2396 |
" |
|
2397 |
||
2398 |
"Modified: / 14-02-2012 / 14:20:17 / cg" |
|
52 | 2399 |
! |
2400 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2401 |
browseAllCallsOn:aSelectorString in:aCollectionOfClasses title:title |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2402 |
"launch a browser for all senders of aSelector in aCollectionOfClasses" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2403 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2404 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2405 |
browseAllCallsOn:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2406 |
in:aCollectionOfClasses |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2407 |
ignoreCase:false |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2408 |
title:title |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2409 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2410 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2411 |
SystemBrowser |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2412 |
browseAllCallsOn:#+ |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2413 |
in:(Number withAllSubclasses) |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2414 |
title:'just a test' |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2415 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2416 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2417 |
"Modified: 24.1.1997 / 19:48:54 / cg" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2418 |
! |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2419 |
|
203 | 2420 |
browseCallsOn:aSelectorString under:aClass |
2421 |
"launch a browser for all senders of aSelector in aClass and subclasses" |
|
2422 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2423 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2424 |
browseAllCallsOn:aSelectorString |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2425 |
in:(aClass withAllSubclasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2426 |
title:(self classResources |
6476 | 2427 |
string:'Senders of: %1 (in and below %2)' |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2428 |
with:aSelectorString |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2429 |
with:aClass name) |
203 | 2430 |
|
2431 |
" |
|
256 | 2432 |
SystemBrowser browseCallsOn:#+ under:Number |
203 | 2433 |
" |
256 | 2434 |
|
2435 |
"Created: 9.12.1995 / 17:59:57 / cg" |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
2436 |
"Modified: 24.1.1997 / 19:50:33 / cg" |
203 | 2437 |
! |
2438 |
||
2439 |
browseClassRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly |
|
2440 |
"launch a browser for all methods in aClass where the classVar named |
|
2441 |
aString is referenced; if modsOnly is true, browse only methods where the |
|
2442 |
classvar is modified" |
|
2443 |
||
2444 |
^ self browseRefsTo:aString classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly |
|
2445 |
! |
|
2446 |
||
2447 |
browseClassRefsTo:varName in:aCollectionOfClasses modificationsOnly:modsOnly title:title |
|
2448 |
"launch a browser for all methods in aCollectionOfClasses, |
|
2449 |
where the classVar named aString is referenced; |
|
2450 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
2451 |
||
2452 |
^ self browseRefsTo:varName classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly title:title |
|
2453 |
! |
|
2454 |
||
2455 |
browseClassRefsTo:aString under:aClass modificationsOnly:modsOnly |
|
2456 |
"launch a browser for all methods in aClass and subclasses |
|
2457 |
where the classVar named aString is referenced; |
|
2458 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
2459 |
||
2460 |
^ self browseClassRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly |
|
2461 |
||
2462 |
! |
|
2463 |
||
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2464 |
browseForResource:aResourceSymbol containing:item in:aCollectionOfClasses title:title |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2465 |
"launch a browser for all methods which have a particular (or any, ifNil) |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2466 |
resource in aCollectionOfClasses. |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2467 |
If aKey is nonNil, only methods which have aKey in the (any) resourceSpec |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2468 |
are parsed. |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2469 |
I.e. to find all methods, which access the styleSheets, use: |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2470 |
browseForResource:#style containing:nil in:... title:... |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2471 |
to find methods which access the 'arrowButtonDownForm' styleSheet entry, use: |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2472 |
browseForResource:#style containing:'arrowButtonDownForm' in:... title:..." |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2473 |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
2474 |
|browser searchBlock| |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2475 |
|
1356 | 2476 |
"/ search for any resource can be done without looking |
2477 |
"/ at the source ... |
|
2478 |
(aResourceSymbol isNil and:[item isNil]) ifTrue:[ |
|
2479 |
searchBlock := [:class :method :s | method hasResource] |
|
2480 |
] ifFalse:[ |
|
2481 |
searchBlock := [:class :method :s | |
|
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2482 |
|rsrc val found| |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2483 |
|
1356 | 2484 |
found := false. |
2485 |
method hasResource ifTrue:[ |
|
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2486 |
rsrc := method resources. |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2487 |
rsrc notNil ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2488 |
aResourceSymbol isNil ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2489 |
item isNil ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2490 |
found := true |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2491 |
] ifFalse:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2492 |
rsrc isCollection ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2493 |
rsrc keysAndValuesDo:[:rsrc :val | |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2494 |
val isCollection ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2495 |
val do:[:v | |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2496 |
found := item match:v printString |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2497 |
] |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2498 |
] ifFalse:[ |
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2499 |
found := item match:val printString |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2500 |
] |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2501 |
] |
1356 | 2502 |
] ifFalse:[ |
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2503 |
found := item match:rsrc printString |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2504 |
] |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2505 |
] |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2506 |
] ifFalse:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2507 |
(rsrc includesKey:aResourceSymbol) ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2508 |
item isNil ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2509 |
found := true |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2510 |
] ifFalse:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2511 |
rsrc isCollection ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2512 |
val := rsrc at:aResourceSymbol. |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2513 |
val isCollection ifTrue:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2514 |
val do:[:v | |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2515 |
found := item match:v printString |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2516 |
] |
1356 | 2517 |
] ifFalse:[ |
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2518 |
found := item match:val printString |
1356 | 2519 |
] |
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2520 |
] ifFalse:[ |
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2521 |
found := item match:rsrc printString |
1356 | 2522 |
] |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2523 |
] |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2524 |
] |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2525 |
] |
1356 | 2526 |
]. |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2527 |
]. |
1356 | 2528 |
found |
2529 |
]. |
|
2530 |
]. |
|
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2531 |
|
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2532 |
browser := self browseMethodsIn:aCollectionOfClasses |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2533 |
where:searchBlock |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2534 |
title:title. |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2535 |
browser notNil ifTrue:[ |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2536 |
browser autoSearch:'resource:' |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2537 |
]. |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2538 |
^ browser |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2539 |
|
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2540 |
" |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2541 |
SystemBrowser |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2542 |
browseForResource:nil |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2543 |
in:Smalltalk allClasses |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2544 |
title:'methods with a resource' |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2545 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2546 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2547 |
SystemBrowser |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2548 |
browseForResource:#style |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2549 |
containing:nil |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2550 |
in:Smalltalk allClasses |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2551 |
title:'methods with a #style resource' |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2552 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2553 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2554 |
SystemBrowser |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2555 |
browseForResource:#style |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2556 |
containing:'arrowButton*' |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2557 |
in:Smalltalk allClasses |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2558 |
title:'methods with a #style resource' |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2559 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2560 |
|
1573
4b6ce12dff2b
dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents:
1561
diff
changeset
|
2561 |
"Modified: / 22.4.1998 / 10:29:20 / cg" |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2562 |
! |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2563 |
|
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2564 |
browseForResource:aResourceSymbol in:aCollectionOfClasses title:title |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2565 |
"launch a browser for all methods which have a particular (or any, ifNil) |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2566 |
resource in aCollectionOfClasses" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2567 |
|
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2568 |
^ self |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2569 |
browseForResource:aResourceSymbol |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2570 |
containing:nil |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2571 |
in:aCollectionOfClasses |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2572 |
title:title |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2573 |
|
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2574 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2575 |
SystemBrowser |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2576 |
browseForResource:#style |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2577 |
in:Smalltalk allClasses |
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2578 |
title:'methods accessing styleSheet values' |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2579 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2580 |
" |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2581 |
SystemBrowser |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2582 |
browseForResource:#keyboard |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2583 |
in:Smalltalk allClasses |
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2584 |
title:'methods handling keyboard events' |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2585 |
" |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2586 |
" |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2587 |
SystemBrowser |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2588 |
browseForResource:nil |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2589 |
in:Smalltalk allClasses |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2590 |
title:'methods with a resource' |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2591 |
" |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2592 |
|
929
a2275f1b4c94
enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents:
825
diff
changeset
|
2593 |
"Modified: 9.1.1997 / 12:44:38 / cg" |
573
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2594 |
! |
e32bd3e46a72
added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents:
553
diff
changeset
|
2595 |
|
203 | 2596 |
browseForString:aString |
2597 |
"launch a browser for all methods containing a string in their source. |
|
2598 |
This may be slow, since source-code has to be scanned." |
|
2599 |
||
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2600 |
^ self browseForString:aString in:(Smalltalk allClasses) ignoreCase:false |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2601 |
|
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2602 |
"Modified: / 18.6.1998 / 16:42:39 / cg" |
203 | 2603 |
! |
2604 |
||
2605 |
browseForString:aString in:aCollectionOfClasses |
|
2606 |
"launch a browser for all methods in aCollectionOfClasses |
|
2607 |
containing a string in their source. |
|
2608 |
This may be slow, since source-code has to be scanned." |
|
2609 |
||
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2610 |
^ self |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2611 |
browseForString:aString |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2612 |
in:aCollectionOfClasses |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2613 |
ignoreCase:false |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2614 |
|
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2615 |
" |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2616 |
SystemBrowser browseForString:'all' in:(Array with:Object) |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2617 |
SystemBrowser browseForString:'should' in:(Array with:Object) |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2618 |
SystemBrowser browseForString:'[eE]rror' in:(Array with:Object) |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2619 |
" |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2620 |
|
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2621 |
"Created: / 9.12.1995 / 18:03:12 / cg" |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2622 |
"Modified: / 18.6.1998 / 16:43:27 / cg" |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2623 |
! |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2624 |
|
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2625 |
browseForString:aString in:aCollectionOfClasses ignoreCase:ignoreCase |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2626 |
"launch a browser for all methods in aCollectionOfClasses |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2627 |
containing a string in their source. |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2628 |
This may be slow, since source-code has to be scanned." |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2629 |
|
203 | 2630 |
|browser searchBlock title s| |
2631 |
||
6476 | 2632 |
title := self classResources string:'Methods containing: %1' with:aString displayString. |
203 | 2633 |
|
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2634 |
(aString includesMatchCharacters |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2635 |
or:[ignoreCase]) ifTrue:[ |
256 | 2636 |
s := '*' , aString , '*'. |
2637 |
"a matchString" |
|
475
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2638 |
searchBlock := [:c :m :sel | |
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2639 |
|src| |
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2640 |
src := m source. |
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2641 |
src isNil ifTrue:[ |
2208
e077aa992f7a
check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents:
1937
diff
changeset
|
2642 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2643 |
false |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2644 |
] ifFalse:[ |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2645 |
s match:src ignoreCase:ignoreCase |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2646 |
] |
475
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2647 |
] |
203 | 2648 |
] ifFalse:[ |
475
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2649 |
searchBlock := [:c :m :sel | |
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2650 |
|src| |
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2651 |
|
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2652 |
src := m source. |
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2653 |
src isNil ifTrue:[ |
2208
e077aa992f7a
check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents:
1937
diff
changeset
|
2654 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2655 |
false |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2656 |
] ifFalse:[ |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2657 |
(src findString:aString) ~~ 0 |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2658 |
] |
475
b14b3ab39af6
dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents:
436
diff
changeset
|
2659 |
] |
203 | 2660 |
]. |
2661 |
browser := self browseMethodsIn:aCollectionOfClasses where:searchBlock title:title. |
|
2662 |
||
2663 |
browser notNil ifTrue:[ |
|
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2664 |
browser autoSearch:aString ignoreCase:ignoreCase |
203 | 2665 |
]. |
2666 |
^ browser |
|
2667 |
||
2668 |
" |
|
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2669 |
SystemBrowser browseForString:'all' in:(Array with:Object) |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2670 |
SystemBrowser browseForString:'should' in:(Array with:Object) |
203 | 2671 |
SystemBrowser browseForString:'[eE]rror' in:(Array with:Object) |
2672 |
" |
|
2673 |
||
1703
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2674 |
"Created: / 18.6.1998 / 16:42:50 / cg" |
ea66390f879b
added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents:
1681
diff
changeset
|
2675 |
"Modified: / 18.6.1998 / 16:51:25 / cg" |
203 | 2676 |
! |
2677 |
||
2678 |
browseForSymbol:aSymbol |
|
2679 |
"launch a browser for all methods referencing aSymbol" |
|
2680 |
||
666 | 2681 |
^ self |
2682 |
browseForSymbol:aSymbol |
|
6476 | 2683 |
title:(self classResources string:'Users of: %1' with:aSymbol) |
666 | 2684 |
warnIfNone:true |
256 | 2685 |
|
2686 |
"Created: 9.12.1995 / 18:04:34 / cg" |
|
666 | 2687 |
"Modified: 10.7.1996 / 10:35:34 / cg" |
2688 |
! |
|
2689 |
||
2690 |
browseForSymbol:aSymbol in:aSetOfClasses title:title warnIfNone:doWarn |
|
2691 |
"launch a browser for all methods referencing aSymbol" |
|
2692 |
||
7914 | 2693 |
^ self |
2694 |
browseForSymbol:aSymbol |
|
2695 |
in:aSetOfClasses |
|
2696 |
title:title |
|
2697 |
warnIfNone:doWarn |
|
2698 |
searchFor:aSymbol |
|
203 | 2699 |
! |
2700 |
||
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2701 |
browseForSymbol:aSymbol in:aSetOfClasses title:title warnIfNone:doWarn searchFor:searchString |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2702 |
"launch a browser for all methods referencing aSymbol" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2703 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2704 |
|browser searchBlock sym| |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2705 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2706 |
(aSymbol includesMatchCharacters) ifTrue:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2707 |
"a matchString" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2708 |
searchBlock := [:c :m :s | |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2709 |
(m literalsDetect:[:aLiteral| |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2710 |
(aLiteral isMemberOf:Symbol) |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2711 |
and:[aSymbol match:aLiteral] |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2712 |
] ifNone:nil) notNil |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2713 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2714 |
] ifFalse:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2715 |
" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2716 |
can do a faster search |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2717 |
" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2718 |
sym := aSymbol asSymbolIfInterned. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2719 |
sym isNil ifTrue:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2720 |
self showNoneFound:title. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2721 |
^ nil |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2722 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2723 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2724 |
searchBlock := [:c :m :s | |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2725 |
(m literalsDetect:[:aLiteral| |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2726 |
(sym == aLiteral) |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2727 |
] ifNone:nil) notNil |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2728 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2729 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2730 |
doWarn ifFalse:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2731 |
WarningSignal ignoreIn:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2732 |
browser := self browseMethodsIn:aSetOfClasses where:searchBlock title:title. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2733 |
] |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2734 |
] ifTrue:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2735 |
browser := self browseMethodsIn:aSetOfClasses where:searchBlock title:title. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2736 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2737 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2738 |
(browser notNil |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2739 |
and:[searchString notNil]) ifTrue:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2740 |
browser autoSearch:searchString |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2741 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2742 |
^ browser |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2743 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2744 |
"Modified: 24.6.1996 / 14:39:07 / stefan" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2745 |
"Modified: 30.6.1996 / 16:45:25 / cg" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2746 |
"Created: 31.10.1996 / 14:57:30 / cg" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2747 |
! |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2748 |
|
2409 | 2749 |
browseForSymbol:aSymbol title:title ifNone:actionIfNoneFound searchFor:searchString |
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2750 |
"launch a browser for all methods referencing aSymbol" |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2751 |
|
11452 | 2752 |
|browser searchBlock| |
2753 |
||
2754 |
searchBlock := self searchBlockForSymbol:aSymbol. |
|
2409 | 2755 |
|
2756 |
WarningSignal ignoreIn:[ |
|
2757 |
InformationSignal ignoreIn:[ |
|
375 | 2758 |
browser := self browseMethodsWhere:searchBlock title:title. |
2759 |
] |
|
2409 | 2760 |
]. |
2761 |
browser isNil ifTrue:[ |
|
2762 |
actionIfNoneFound value |
|
215
244f3a9b2a60
check for existing class in rename; avoid warnbox if no refs are found after rename
Claus Gittinger <cg@exept.de>
parents:
204
diff
changeset
|
2763 |
]. |
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2764 |
|
11452 | 2765 |
(browser notNil and:[searchString notNil]) ifTrue:[ |
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2766 |
browser autoSearch:searchString |
203 | 2767 |
]. |
2768 |
^ browser |
|
375 | 2769 |
|
11452 | 2770 |
"Modified: / 24-06-1996 / 14:39:07 / stefan" |
2771 |
"Created: / 31-10-1996 / 14:45:08 / cg" |
|
2772 |
"Modified: / 22-03-2012 / 06:58:07 / cg" |
|
203 | 2773 |
! |
2774 |
||
2409 | 2775 |
browseForSymbol:aSymbol title:title warnIfNone:doWarn |
2776 |
"launch a browser for all methods referencing aSymbol" |
|
2777 |
||
2778 |
^ self |
|
2779 |
browseForSymbol:aSymbol |
|
2780 |
title:title |
|
2781 |
warnIfNone:doWarn |
|
2782 |
searchFor:aSymbol |
|
2783 |
||
2784 |
"Modified: 31.10.1996 / 14:45:38 / cg" |
|
2785 |
! |
|
2786 |
||
2787 |
browseForSymbol:aSymbol title:title warnIfNone:doWarn searchFor:searchString |
|
2788 |
"launch a browser for all methods referencing aSymbol" |
|
2789 |
||
2414 | 2790 |
|b| |
2791 |
||
2792 |
doWarn ifTrue: [ |
|
4158 | 2793 |
b := [self showNoneFound:title] |
2414 | 2794 |
]. |
2409 | 2795 |
^ self |
2796 |
browseForSymbol:aSymbol |
|
2797 |
title:title |
|
2414 | 2798 |
ifNone:b |
2409 | 2799 |
searchFor:searchString |
2800 |
! |
|
2801 |
||
4158 | 2802 |
browseImplementorsMatching:aSelectorString |
2803 |
"launch a browser for all implementors of aSelector" |
|
2804 |
||
2805 |
^ self |
|
2806 |
browseImplementorsMatching:aSelectorString |
|
2807 |
in:(Smalltalk allClasses) |
|
2808 |
||
2809 |
" |
|
2810 |
SystemBrowser browseImplementorsOf:#+ |
|
2811 |
NewSystemBrowser browseImplementorsOf:#+ |
|
2812 |
" |
|
2813 |
||
2814 |
"Created: / 9.12.1995 / 18:01:18 / cg" |
|
2815 |
"Modified: / 5.11.2001 / 17:31:11 / cg" |
|
2816 |
! |
|
2817 |
||
2818 |
browseImplementorsMatching:aSelectorString in:aSetOfClasses |
|
2819 |
"launch a browser for all implementors of aSelector" |
|
2820 |
||
2821 |
^ self |
|
2822 |
browseImplementorsMatching:aSelectorString |
|
2823 |
in:aSetOfClasses |
|
2824 |
title:(self classResources string:'implementors of: %1' with:aSelectorString) |
|
2825 |
||
2826 |
" |
|
2827 |
SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
2828 |
NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
2829 |
" |
|
2830 |
||
2831 |
"Created: / 10.7.1996 / 10:20:59 / cg" |
|
2832 |
"Modified: / 5.11.2001 / 17:30:57 / cg" |
|
2833 |
! |
|
2834 |
||
2835 |
browseImplementorsMatching:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase |
|
2836 |
"launch a browser for all implementors of aSelector" |
|
2837 |
||
2838 |
^ self |
|
2839 |
browseImplementorsMatching:aSelectorString |
|
2840 |
in:aSetOfClasses |
|
2841 |
ignoreCase:ignoreCase |
|
2842 |
title:(self classResources string:'implementors of: %1' with:aSelectorString) |
|
2843 |
||
2844 |
" |
|
2845 |
SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
2846 |
NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
2847 |
" |
|
2848 |
||
2849 |
"Created: / 10.7.1996 / 10:20:59 / cg" |
|
2850 |
"Modified: / 5.11.2001 / 17:30:43 / cg" |
|
2851 |
! |
|
2852 |
||
2853 |
browseImplementorsMatching:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:title |
|
2854 |
"launch a browser for all implementors of aSelector in |
|
2855 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
2856 |
||
2857 |
|list| |
|
2858 |
||
2859 |
list := self |
|
2860 |
findImplementorsMatching:aSelectorString |
|
2861 |
in:aCollectionOfClasses |
|
2862 |
ignoreCase:ignoreCase. |
|
2863 |
||
2864 |
list size == 0 ifTrue:[ |
|
2865 |
self showNoneFound:title. |
|
2866 |
^ nil |
|
2867 |
]. |
|
2868 |
||
2869 |
^ self browseMethods:list asOrderedCollection title:title |
|
2870 |
||
2871 |
" |
|
2872 |
SystemBrowser browseImplementorsOf:#+ |
|
2873 |
in:(Array with:Number |
|
2874 |
with:Float |
|
2875 |
with:SmallInteger) |
|
2876 |
title:'some implementors of +' |
|
2877 |
||
2878 |
NewSystemBrowser browseImplementorsOf:#+ |
|
2879 |
in:(Array with:Number |
|
2880 |
with:Float |
|
2881 |
with:SmallInteger) |
|
2882 |
title:'some implementors of +' |
|
2883 |
" |
|
2884 |
||
2885 |
"Modified: / 4.9.1995 / 17:33:39 / claus" |
|
2886 |
"Modified: / 19.6.1996 / 14:19:02 / stefan" |
|
2887 |
"Modified: / 5.11.2001 / 17:30:38 / cg" |
|
2888 |
! |
|
2889 |
||
2890 |
browseImplementorsMatching:aSelectorString in:aCollectionOfClasses title:title |
|
2891 |
"launch a browser for all implementors of aSelector in |
|
2892 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
2893 |
||
2894 |
^ self |
|
2895 |
browseImplementorsMatching:aSelectorString |
|
2896 |
in:aCollectionOfClasses |
|
2897 |
ignoreCase:false |
|
2898 |
title:title |
|
2899 |
! |
|
2900 |
||
2901 |
browseImplementorsMatching:aSelectorString under:aClass |
|
2902 |
"launch a browser for all implementors of aSelector in aClass |
|
2903 |
and its subclasses" |
|
2904 |
||
2905 |
^ self |
|
2906 |
browseImplementorsMatching:aSelectorString |
|
2907 |
in:(aClass withAllSubclasses) |
|
2908 |
title:(self classResources |
|
2909 |
string:'implementors of: %1 (in and below %2)' |
|
2910 |
with:aSelectorString |
|
2911 |
with:aClass name) |
|
2912 |
||
2913 |
" |
|
2914 |
SystemBrowser browseImplementorsOf:#+ under:Integer |
|
2915 |
NewSystemBrowser browseImplementorsOf:#+ under:Integer |
|
2916 |
" |
|
2917 |
||
2918 |
"Created: / 9.12.1995 / 18:06:09 / cg" |
|
2919 |
"Modified: / 5.11.2001 / 17:30:15 / cg" |
|
2920 |
! |
|
2921 |
||
52 | 2922 |
browseImplementorsOf:aSelectorString |
2923 |
"launch a browser for all implementors of aSelector" |
|
2924 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2925 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2926 |
browseImplementorsOf:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2927 |
in:(Smalltalk allClasses) |
52 | 2928 |
|
2929 |
" |
|
2930 |
SystemBrowser browseImplementorsOf:#+ |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2931 |
NewSystemBrowser browseImplementorsOf:#+ |
52 | 2932 |
" |
256 | 2933 |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2934 |
"Created: / 9.12.1995 / 18:01:18 / cg" |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2935 |
"Modified: / 5.11.2001 / 17:31:11 / cg" |
666 | 2936 |
! |
2937 |
||
2938 |
browseImplementorsOf:aSelectorString in:aSetOfClasses |
|
2939 |
"launch a browser for all implementors of aSelector" |
|
2940 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2941 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2942 |
browseImplementorsOf:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2943 |
in:aSetOfClasses |
8704 | 2944 |
title:(self classResources string:'Implementors of: %1' with:aSelectorString allBold) |
666 | 2945 |
|
2946 |
" |
|
2947 |
SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2948 |
NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
666 | 2949 |
" |
2950 |
||
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2951 |
"Created: / 10.7.1996 / 10:20:59 / cg" |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2952 |
"Modified: / 5.11.2001 / 17:30:57 / cg" |
52 | 2953 |
! |
2954 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2955 |
browseImplementorsOf:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2956 |
"launch a browser for all implementors of aSelector" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2957 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2958 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2959 |
browseImplementorsOf:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2960 |
in:aSetOfClasses |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2961 |
ignoreCase:ignoreCase |
6476 | 2962 |
title:(self classResources string:'Implementors of: %1' with:aSelectorString) |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2963 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2964 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2965 |
SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2966 |
NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2967 |
" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2968 |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2969 |
"Created: / 10.7.1996 / 10:20:59 / cg" |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
2970 |
"Modified: / 5.11.2001 / 17:30:43 / cg" |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2971 |
! |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
2972 |
|
11271 | 2973 |
browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch title:titleArg |
2974 |
"launch a browser for all implementors of aSelector in |
|
2975 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
2976 |
||
2977 |
doMatch ifTrue:[ |
|
2978 |
self browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg |
|
2979 |
] ifFalse:[ |
|
2980 |
self browseImplementorsMatching:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg |
|
2981 |
]. |
|
2982 |
||
2983 |
"Created: / 14-02-2012 / 13:55:23 / cg" |
|
2984 |
! |
|
2985 |
||
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2986 |
browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg |
36 | 2987 |
"launch a browser for all implementors of aSelector in |
2988 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
2989 |
||
8688 | 2990 |
|list list2 rs selWithColon title top20 allSelectors choice| |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2991 |
|
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2992 |
title := titleArg. |
2642 | 2993 |
list := self |
4158 | 2994 |
findImplementorsOf:aSelectorString |
2642 | 2995 |
in:aCollectionOfClasses |
2996 |
ignoreCase:ignoreCase. |
|
45 | 2997 |
|
2642 | 2998 |
list size == 0 ifTrue:[ |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
2999 |
aSelectorString numArgs == 0 ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3000 |
selWithColon := aSelectorString , ':'. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3001 |
selWithColon knownAsSymbol ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3002 |
list2 := self findImplementorsOf:selWithColon in:aCollectionOfClasses ignoreCase:ignoreCase. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3003 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3004 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3005 |
list2 size == 0 ifTrue:[ |
8678 | 3006 |
"/ self showNoneFound:title. |
3007 |
"/ ^ self |
|
8688 | 3008 |
allSelectors := Set new. |
8678 | 3009 |
top20 := SortedCollection new. |
3010 |
top20 sortBlock:[:a :b | (a spellAgainst:aSelectorString) > (b spellAgainst:aSelectorString)]. |
|
8759 | 3011 |
Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector | |
12475 | 3012 |
((eachSelector asLowercase startsWith:aSelectorString) or:[(eachSelector spellAgainst:aSelectorString) > 50]) ifTrue:[ |
8759 | 3013 |
(allSelectors includes:eachSelector) ifFalse:[ |
3014 |
allSelectors add:eachSelector. |
|
3015 |
top20 add:eachSelector. |
|
3016 |
top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ]. |
|
3017 |
] |
|
8678 | 3018 |
] |
3019 |
]. |
|
9685
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3020 |
top20 isEmpty ifTrue:[ |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3021 |
|lcSelector| |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3022 |
|
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3023 |
lcSelector := aSelectorString asLowercase. |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3024 |
Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector | |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3025 |
(eachSelector asLowercase spellAgainst:lcSelector) > 50 ifTrue:[ |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3026 |
(allSelectors includes:eachSelector) ifFalse:[ |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3027 |
allSelectors add:eachSelector. |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3028 |
top20 add:eachSelector. |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3029 |
top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ]. |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3030 |
] |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3031 |
] |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3032 |
]. |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3033 |
]. |
12575 | 3034 |
(Smalltalk classNamed:aSelectorString) notNil ifTrue:[ |
3035 |
top20 := (OrderedCollection withAll:top20) addFirst:('>> Browse class ',aSelectorString,' <<'); yourself. |
|
3036 |
]. |
|
8678 | 3037 |
choice := Dialog |
8704 | 3038 |
choose:(title,' - none found.\\Browse implementors of a similar selector or cancel:' withCRs) |
8678 | 3039 |
fromList:top20 |
3040 |
lines:10. |
|
3041 |
choice notEmptyOrNil ifTrue:[ |
|
12575 | 3042 |
(choice startsWith:'>>') ifTrue:[ |
3043 |
self openInClass:(Smalltalk classNamed:aSelectorString) selector:nil. |
|
3044 |
] ifFalse:[ |
|
3045 |
self browseImplementorsOf:choice in:aCollectionOfClasses ignoreCase:ignoreCase title:'Implementors of ',choice. |
|
3046 |
] |
|
8678 | 3047 |
]. |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3048 |
^ nil |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3049 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3050 |
rs := self classResources. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3051 |
(Dialog confirm:((rs string:title) , |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3052 |
(rs string:'...\\... none found.') , |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3053 |
(rs string:'\\But I found %1 implementor(s) of the "%2" message (with colon).\\Browse those ?' |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3054 |
with:list2 size |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3055 |
with:selWithColon allBold)) withCRs) ifFalse:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3056 |
^ nil |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3057 |
]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3058 |
list := list2. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3059 |
title := title , ':'. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
3060 |
|
36 | 3061 |
]. |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3062 |
|
270 | 3063 |
^ self browseMethods:list asOrderedCollection title:title |
36 | 3064 |
|
3065 |
" |
|
3066 |
SystemBrowser browseImplementorsOf:#+ |
|
270 | 3067 |
in:(Array with:Number |
3068 |
with:Float |
|
3069 |
with:SmallInteger) |
|
3070 |
title:'some implementors of +' |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3071 |
|
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3072 |
NewSystemBrowser browseImplementorsOf:#+ |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3073 |
in:(Array with:Number |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3074 |
with:Float |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3075 |
with:SmallInteger) |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3076 |
title:'some implementors of +' |
36 | 3077 |
" |
132 | 3078 |
|
9685
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3079 |
"Modified: / 04-09-1995 / 17:33:39 / claus" |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3080 |
"Modified: / 19-06-1996 / 14:19:02 / stefan" |
629e1d789a2d
changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents:
9660
diff
changeset
|
3081 |
"Modified: / 15-01-2011 / 14:35:56 / cg" |
36 | 3082 |
! |
3083 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3084 |
browseImplementorsOf:aSelectorString in:aCollectionOfClasses title:title |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3085 |
"launch a browser for all implementors of aSelector in |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3086 |
the classes contained in aCollectionOfClasses and its metaclasses" |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3087 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3088 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3089 |
browseImplementorsOf:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3090 |
in:aCollectionOfClasses |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3091 |
ignoreCase:false |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3092 |
title:title |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3093 |
|
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3094 |
! |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3095 |
|
52 | 3096 |
browseImplementorsOf:aSelectorString under:aClass |
3097 |
"launch a browser for all implementors of aSelector in aClass |
|
3098 |
and its subclasses" |
|
3099 |
||
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3100 |
^ self |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3101 |
browseImplementorsOf:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3102 |
in:(aClass withAllSubclasses) |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3103 |
title:(self classResources |
6476 | 3104 |
string:'Implementors of: %1 (in and below %2)' |
2623
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3105 |
with:aSelectorString |
9e488daf53da
allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents:
2551
diff
changeset
|
3106 |
with:aClass name) |
52 | 3107 |
|
3108 |
" |
|
3109 |
SystemBrowser browseImplementorsOf:#+ under:Integer |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3110 |
NewSystemBrowser browseImplementorsOf:#+ under:Integer |
52 | 3111 |
" |
256 | 3112 |
|
3360
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3113 |
"Created: / 9.12.1995 / 18:06:09 / cg" |
2eab40d1a498
isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
3354
diff
changeset
|
3114 |
"Modified: / 5.11.2001 / 17:30:15 / cg" |
52 | 3115 |
! |
3116 |
||
3663 | 3117 |
browseImplementorsOfAny:setOfSelectors |
3118 |
"launch a browser for all implementors of aSelector" |
|
3119 |
||
3120 |
^ self |
|
3121 |
browseImplementorsOfAny:setOfSelectors |
|
3122 |
in:(Smalltalk allClasses) |
|
3123 |
||
3124 |
" |
|
3125 |
SystemBrowser browseImplementorsOfAny:#( #+ #- ) |
|
3126 |
NewSystemBrowser browseImplementorsOfAny:#( #+ #- ) |
|
3127 |
" |
|
3128 |
||
3129 |
"Created: / 9.12.1995 / 18:01:18 / cg" |
|
3130 |
"Modified: / 5.11.2001 / 17:31:11 / cg" |
|
3131 |
! |
|
3132 |
||
3133 |
browseImplementorsOfAny:setOfSelectors in:aSetOfClasses |
|
3134 |
"launch a browser for all implementors of aSelector" |
|
3135 |
||
8047
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3136 |
|title| |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3137 |
|
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3138 |
setOfSelectors size == 1 ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3139 |
title := self classResources |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3140 |
string:'Implementors of %1' |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3141 |
with:(setOfSelectors asOrderedCollection first). |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3142 |
] ifFalse:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3143 |
setOfSelectors size == 2 ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3144 |
title := self classResources |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3145 |
string:'Implementors of %1 or %2' |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3146 |
with:(setOfSelectors asOrderedCollection first) |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3147 |
with:(setOfSelectors asOrderedCollection second). |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3148 |
] ifFalse:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3149 |
title := self classResources string:'Implementors of some'. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3150 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3151 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3152 |
|
3663 | 3153 |
^ self |
3154 |
browseImplementorsOfAny:setOfSelectors |
|
3155 |
in:aSetOfClasses |
|
8047
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
3156 |
title:title |
3663 | 3157 |
|
3158 |
" |
|
3159 |
SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
3160 |
NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses) |
|
3161 |
" |
|
3162 |
||
3163 |
"Created: / 10.7.1996 / 10:20:59 / cg" |
|
3164 |
"Modified: / 5.11.2001 / 17:30:57 / cg" |
|
3165 |
! |
|
3166 |
||
3167 |
browseImplementorsOfAny:setOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase title:title |
|
3168 |
"launch a browser for all implementors of aSelector in |
|
3169 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
3170 |
||
3171 |
|list| |
|
3172 |
||
3173 |
list := self |
|
3174 |
findImplementorsOfAny:setOfSelectors |
|
3175 |
in:aCollectionOfClasses |
|
3176 |
ignoreCase:ignoreCase. |
|
3177 |
||
3178 |
list size == 0 ifTrue:[ |
|
3179 |
self showNoneFound:title. |
|
3180 |
^ nil |
|
3181 |
]. |
|
3182 |
||
3183 |
^ self browseMethods:list asOrderedCollection title:title |
|
3184 |
||
3185 |
" |
|
3186 |
SystemBrowser browseImplementorsOf:#+ |
|
3187 |
in:(Array with:Number |
|
3188 |
with:Float |
|
3189 |
with:SmallInteger) |
|
3190 |
title:'some implementors of +' |
|
3191 |
||
3192 |
NewSystemBrowser browseImplementorsOf:#+ |
|
3193 |
in:(Array with:Number |
|
3194 |
with:Float |
|
3195 |
with:SmallInteger) |
|
3196 |
title:'some implementors of +' |
|
3197 |
" |
|
3198 |
||
3199 |
"Modified: / 4.9.1995 / 17:33:39 / claus" |
|
3200 |
"Modified: / 19.6.1996 / 14:19:02 / stefan" |
|
3201 |
"Modified: / 5.11.2001 / 17:30:38 / cg" |
|
3202 |
! |
|
3203 |
||
3204 |
browseImplementorsOfAny:setOfSelectors in:aCollectionOfClasses title:title |
|
3205 |
"launch a browser for all implementors of aSelector in |
|
3206 |
the classes contained in aCollectionOfClasses and its metaclasses" |
|
3207 |
||
3208 |
^ self |
|
3209 |
browseImplementorsOfAny:setOfSelectors |
|
3210 |
in:aCollectionOfClasses |
|
3211 |
ignoreCase:false |
|
3212 |
title:title |
|
3213 |
! |
|
3214 |
||
203 | 3215 |
browseInstRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly |
3216 |
"launch a browser for all methods in aClass where the instVar named |
|
3217 |
aString is referenced; if modsOnly is true, browse only methods where the |
|
3218 |
instvar is modified" |
|
45 | 3219 |
|
203 | 3220 |
^ self browseRefsTo:aString classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly |
36 | 3221 |
! |
3222 |
||
203 | 3223 |
browseInstRefsTo:varName in:aCollectionOfClasses modificationsOnly:modsOnly title:title |
3224 |
"launch a browser for all methods in aClass where the instVar named |
|
3225 |
varName is referenced; if modsOnly is true, browse only methods where the |
|
3226 |
instvar is modified" |
|
52 | 3227 |
|
203 | 3228 |
^ self browseRefsTo:varName classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly title:title |
52 | 3229 |
! |
3230 |
||
203 | 3231 |
browseInstRefsTo:aString under:aClass modificationsOnly:modsOnly |
3232 |
"launch a browser for all methods in aClass and subclasses |
|
3233 |
where the instVar named aString is referenced; |
|
3234 |
if modsOnly is true, browse only methods where the instvar is modified" |
|
36 | 3235 |
|
203 | 3236 |
^ self browseInstRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly |
36 | 3237 |
! |
3238 |
||
3239 |
browseReferendsOf:aGlobalName |
|
3240 |
"launch a browser for all methods referencing a global |
|
1367 | 3241 |
named aGlobalName. The argument may be a symbol, a string or |
3242 |
a matchPattern. |
|
36 | 3243 |
" |
3244 |
||
3245 |
^ self browseReferendsOf:aGlobalName warnIfNone:true |
|
3246 |
||
3247 |
" |
|
3248 |
Browser browseReferendsOf:#Transcript |
|
1367 | 3249 |
Browser browseReferendsOf:'Tr*' |
36 | 3250 |
" |
75 | 3251 |
|
1367 | 3252 |
"Modified: / 30.10.1997 / 23:45:52 / cg" |
36 | 3253 |
! |
3254 |
||
2409 | 3255 |
browseReferendsOf:aGlobalName ifNone:actionIfNone |
3256 |
"launch a browser for all methods referencing a global |
|
3257 |
named aGlobalName. |
|
3258 |
" |
|
3259 |
||
3260 |
^ self |
|
3261 |
browseReferendsOf:aGlobalName |
|
6476 | 3262 |
title:(self classResources string:'Users of: %1' with:aGlobalName) |
2409 | 3263 |
ifNone:actionIfNone |
3264 |
||
3265 |
"Modified: / 31.10.1997 / 15:42:05 / cg" |
|
3266 |
! |
|
3267 |
||
666 | 3268 |
browseReferendsOf:aGlobalName in:aSetOfClasses |
3269 |
"launch a browser for all methods referencing a global |
|
3270 |
named aGlobalName. |
|
3271 |
" |
|
3272 |
||
3273 |
^ self browseReferendsOf:aGlobalName in:aSetOfClasses warnIfNone:true |
|
3274 |
||
3275 |
" |
|
3276 |
Browser browseReferendsOf:#Transcript |
|
3277 |
" |
|
3278 |
||
3279 |
"Created: 10.7.1996 / 10:37:30 / cg" |
|
3280 |
! |
|
3281 |
||
3282 |
browseReferendsOf:aGlobalName in:aSetOfClasses warnIfNone:doWarn |
|
3283 |
"launch a browser for all methods referencing a global |
|
3284 |
named aGlobalName. |
|
3285 |
" |
|
3286 |
||
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3287 |
|globalsPlainName idx| |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3288 |
|
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3289 |
globalsPlainName := aGlobalName. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3290 |
(idx := globalsPlainName lastIndexOf:$:) ~~ 0 ifTrue:[ |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3291 |
globalsPlainName := globalsPlainName copyFrom:idx+1 |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3292 |
]. |
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3293 |
|
666 | 3294 |
^ self browseForSymbol:aGlobalName |
3295 |
in:aSetOfClasses |
|
6476 | 3296 |
title:(self classResources string:'Users of: %1' with:aGlobalName) |
666 | 3297 |
warnIfNone:doWarn |
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3298 |
searchFor:globalsPlainName |
666 | 3299 |
|
3300 |
"Created: 10.7.1996 / 10:37:02 / cg" |
|
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
3301 |
"Modified: 31.10.1996 / 14:56:38 / cg" |
666 | 3302 |
! |
3303 |
||
2409 | 3304 |
browseReferendsOf:aGlobalName title:title ifNone:actionIfNone |
9002 | 3305 |
"launch a browser for all methods referencing a global named aGlobalName." |
3306 |
||
3307 |
|searchBlock browser| |
|
3308 |
||
3309 |
searchBlock := self searchBlockForReferendsOf:aGlobalName. |
|
3310 |
browser := self |
|
3311 |
browseMethodsWhere:searchBlock |
|
3312 |
title:title |
|
3313 |
ifNone:[ |
|
3314 |
actionIfNone value. |
|
3315 |
^ nil |
|
3316 |
]. |
|
3317 |
||
2828 | 3318 |
browser isNil ifTrue:[ |
3319 |
actionIfNone value |
|
3320 |
] ifFalse:[ |
|
9010
fa5c1fef4aef
changed: #browseReferendsOf:title:ifNone:
Claus Gittinger <cg@exept.de>
parents:
9007
diff
changeset
|
3321 |
browser autoSearchVariable:aGlobalName. |
2828 | 3322 |
]. |
3323 |
^ browser |
|
9002 | 3324 |
|
3325 |
" |
|
3326 |
Tools::NewSystemBrowser browseReferendsOf:'SortedCollection' title:'foo' ifNone:[ self halt ] |
|
3327 |
" |
|
2409 | 3328 |
! |
3329 |
||
3330 |
browseReferendsOf:aGlobalName title:title warnIfNone:doWarn |
|
3331 |
"launch a browser for all methods referencing a global |
|
3332 |
named aGlobalName. |
|
3333 |
" |
|
3334 |
||
2414 | 3335 |
|b| |
3336 |
||
3337 |
doWarn ifTrue: [ |
|
4158 | 3338 |
b := [self showNoneFound:title] |
2414 | 3339 |
]. |
3340 |
||
2409 | 3341 |
^ self |
3342 |
browseReferendsOf:aGlobalName |
|
3343 |
title:title |
|
2414 | 3344 |
ifNone:b |
2409 | 3345 |
|
1367 | 3346 |
! |
3347 |
||
3348 |
browseReferendsOf:aGlobalName warnIfNone:doWarn |
|
3349 |
"launch a browser for all methods referencing a global |
|
3350 |
named aGlobalName. |
|
3351 |
" |
|
3352 |
||
3353 |
^ self |
|
3354 |
browseReferendsOf:aGlobalName |
|
6476 | 3355 |
title:(self classResources string:'Users of: %1' with:aGlobalName) |
1367 | 3356 |
warnIfNone:doWarn |
3357 |
||
3358 |
"Modified: / 31.10.1997 / 15:42:05 / cg" |
|
203 | 3359 |
! |
3360 |
||
4198
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3361 |
browseReferendsOfUnboundGlobalsWithTitle:title ifNone:actionIfNone |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3362 |
"launch a browser for all methods referencing an unbound global. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3363 |
" |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3364 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3365 |
|globalsPlainName searchBlock browser| |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3366 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3367 |
searchBlock := [:cls :mthd :sel | |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3368 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3369 |
|mSource globals potentialNames| |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3370 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3371 |
"/ kludge: Lazy methods do not include symbols in the literal array - sigh |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3372 |
mthd isLazyMethod ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3373 |
mSource := mthd source. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3374 |
mSource notNil ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3375 |
globals := mthd usedGlobals. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3376 |
]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3377 |
] ifFalse:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3378 |
"/ try hard to avoid the usedGlobals - its expensive |
6640 | 3379 |
potentialNames := mthd literals select:[:lit | lit isSymbol and:[lit size > 0 and:[lit isUppercaseFirst]]]. |
4198
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3380 |
potentialNames notEmpty ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3381 |
potentialNames := potentialNames select:[:lit | (Smalltalk at:lit) isNil]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3382 |
potentialNames notEmpty ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3383 |
globals := mthd usedGlobals. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3384 |
] |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3385 |
] |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3386 |
]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3387 |
globals notNil ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3388 |
globals contains:[:aGlobalKey | (Smalltalk at:aGlobalKey asSymbol) isNil]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3389 |
] ifFalse:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3390 |
false |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3391 |
] |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3392 |
]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3393 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3394 |
browser := self browseMethodsWhere:searchBlock title:title ifNone:[actionIfNone value. ^ nil]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3395 |
browser isNil ifTrue:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3396 |
actionIfNone value |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3397 |
] ifFalse:[ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3398 |
browser autoSearch:globalsPlainName |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3399 |
]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3400 |
^ browser |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3401 |
! |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3402 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3403 |
browseReferendsOfUnboundGlobalsWithTitle:title warnIfNone:doWarn |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3404 |
"launch a browser for all methods referencing an unbound global. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3405 |
" |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3406 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3407 |
|b| |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3408 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3409 |
doWarn ifTrue: [ |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3410 |
b := [self showNoneFound:title] |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3411 |
]. |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3412 |
|
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3413 |
^ self |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3414 |
browseReferendsOfUnboundGlobalsWithTitle:title |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3415 |
ifNone:b |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3416 |
! |
de8b73b42e1e
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4167
diff
changeset
|
3417 |
|
203 | 3418 |
browseRefsTo:aString classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly |
3419 |
"launch a browser for all methods in aClass where the instVar/classVar named |
|
3420 |
aString is referenced; if modsOnly is true, browse only methods where the |
|
3421 |
instvar is modified" |
|
3422 |
||
3423 |
|title| |
|
3424 |
||
3425 |
modsOnly ifTrue:[ |
|
6476 | 3426 |
title := 'Modifications of: %1' |
203 | 3427 |
] ifFalse:[ |
6476 | 3428 |
title := 'References to: %1 ' |
203 | 3429 |
]. |
3430 |
^ self |
|
256 | 3431 |
browseRefsTo:aString |
3432 |
classVars:classVars |
|
3433 |
in:aCollectionOfClasses |
|
3434 |
modificationsOnly:modsOnly |
|
3435 |
title:(self classResources string:title with:aString) |
|
3436 |
||
3437 |
"Created: 9.12.1995 / 18:07:05 / cg" |
|
3438 |
"Modified: 9.12.1995 / 18:11:49 / cg" |
|
203 | 3439 |
! |
3440 |
||
3441 |
browseRefsTo:varName classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly title:title |
|
3442 |
"launch a browser for all methods in aClass where the instVar/classVar named |
|
3443 |
varName is referenced; if modsOnly is true, browse only methods where the |
|
3444 |
instvar is modified" |
|
3445 |
||
3446 |
|filter browser pattern| |
|
3447 |
||
3448 |
filter := self filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly. |
|
2677 | 3449 |
browser := self browseMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter title:title. |
203 | 3450 |
|
3451 |
browser notNil ifTrue:[ |
|
2677 | 3452 |
modsOnly ifTrue:[ |
3453 |
pattern := varName , ' :=' |
|
3454 |
] ifFalse:[ |
|
3455 |
pattern := varName |
|
3456 |
]. |
|
3457 |
browser autoSearch:pattern |
|
203 | 3458 |
]. |
3459 |
^ browser |
|
3460 |
! |
|
3461 |
||
3407 | 3462 |
browseSendersOf:aSelectorString |
3463 |
"launch a browser for all senders of aSelector" |
|
3464 |
||
3465 |
^ self browseAllCallsOn:aSelectorString |
|
3466 |
||
3467 |
" |
|
3468 |
SystemBrowser browseSendersOf:#+ |
|
7914 | 3469 |
UserPreferences current systemBrowserClass browseSendersOf:#+ |
3407 | 3470 |
" |
3471 |
||
3472 |
"Modified: / 10.7.1996 / 10:26:15 / cg" |
|
3473 |
"Created: / 13.11.2001 / 13:52:12 / cg" |
|
3474 |
! |
|
3475 |
||
256 | 3476 |
browseSuperCallsIn:aCollectionOfClasses title:title |
3477 |
"launch a browser for all super sends in aCollectionOfClasses" |
|
3478 |
||
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3479 |
|browser searchBlock| |
256 | 3480 |
|
3481 |
searchBlock := [:class :method :s | |
|
504 | 3482 |
|src parser| |
256 | 3483 |
|
504 | 3484 |
src := method source. |
2208
e077aa992f7a
check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents:
1937
diff
changeset
|
3485 |
(src notNil and:[src findString:'super']) ~~ 0 ifTrue:[ |
504 | 3486 |
parser := Parser |
2208
e077aa992f7a
check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents:
1937
diff
changeset
|
3487 |
parseMethod:src |
504 | 3488 |
in:class |
3489 |
ignoreErrors:true |
|
3490 |
ignoreWarnings:true. |
|
3491 |
||
7711 | 3492 |
(parser notNil and:[parser ~~ #Error and:[parser usesSuper]]) |
504 | 3493 |
] ifFalse:[ |
3494 |
false |
|
3495 |
] |
|
256 | 3496 |
]. |
3497 |
||
3498 |
browser := self browseMethodsIn:aCollectionOfClasses |
|
504 | 3499 |
where:searchBlock |
3500 |
title:title. |
|
256 | 3501 |
|
3502 |
browser notNil ifTrue:[ |
|
504 | 3503 |
browser autoSearch:'super' |
256 | 3504 |
]. |
3505 |
^ browser |
|
3506 |
||
504 | 3507 |
" |
3508 |
SystemBrowser |
|
3509 |
browseSuperCallsIn:(Array with:SortedCollection) |
|
3510 |
title:'superSends in SortedCollection' |
|
3511 |
" |
|
3512 |
||
7711 | 3513 |
"Created: / 23-11-1995 / 14:08:55 / cg" |
3514 |
"Modified: / 06-03-2007 / 14:00:12 / cg" |
|
256 | 3515 |
! |
3516 |
||
3517 |
browseSuperCallsUnder:aClass |
|
3518 |
"launch a browser for all supersends in aClass and subclasses" |
|
3519 |
||
3520 |
^ self browseSuperCallsIn:(aClass withAllSubclasses) |
|
6476 | 3521 |
title:(self classResources string:'Supersends (in and below %1)' with:aClass name) |
256 | 3522 |
|
3523 |
" |
|
3524 |
SystemBrowser browseSuperCallsUnder:Number |
|
3525 |
" |
|
3526 |
||
3527 |
"Created: 23.11.1995 / 12:06:06 / cg" |
|
3528 |
"Modified: 9.12.1995 / 18:11:59 / cg" |
|
3529 |
! |
|
3530 |
||
52 | 3531 |
browseUsesOf:aClass |
3532 |
|dict owners offsets |
|
3533 |
sz "{ Class: SmallInteger }" |
|
3534 |
n "{ Class: SmallInteger }" |
|
3535 |
removeSet newDict| |
|
3536 |
||
3537 |
owners := ObjectMemory whoReferencesInstancesOf:aClass. |
|
3538 |
||
3539 |
" |
|
3540 |
collect set of offsets in dict; key is class |
|
3541 |
" |
|
3542 |
dict := IdentityDictionary new. |
|
3543 |
owners do:[:someObject | |
|
4158 | 3544 |
|cls create| |
3545 |
||
3546 |
someObject isContext ifFalse:[ |
|
3547 |
" |
|
3548 |
someObject refers to an instance of aClass; |
|
3549 |
find out, which instVar(s) |
|
3550 |
" |
|
3551 |
cls := someObject class. |
|
3552 |
cls ~~ Array ifTrue:[ |
|
3553 |
n := cls instSize. |
|
3554 |
create := [|s| s := Set new. dict at:cls put:s. s]. |
|
3555 |
||
3556 |
1 to:n do:[:i | |
|
3557 |
|ref| |
|
3558 |
||
3559 |
ref := someObject instVarAt:i. |
|
3560 |
(ref isMemberOf:aClass) ifTrue:[ |
|
3561 |
offsets := dict at:cls ifAbsent:create. |
|
3562 |
offsets add:i. |
|
3563 |
] |
|
3564 |
]. |
|
3565 |
cls isVariable ifTrue:[ |
|
3566 |
cls isPointers ifTrue:[ |
|
3567 |
| idx "{ Class: SmallInteger }" | |
|
3568 |
||
3569 |
sz := someObject basicSize. |
|
3570 |
idx := 1. |
|
3571 |
[idx <= sz] whileTrue:[ |
|
3572 |
|ref| |
|
3573 |
||
3574 |
ref := someObject basicAt:idx. |
|
3575 |
(ref isMemberOf:aClass) ifTrue:[ |
|
3576 |
offsets := dict at:cls ifAbsent:create. |
|
3577 |
offsets add:0. |
|
3578 |
idx := sz |
|
3579 |
]. |
|
3580 |
idx := idx + 1 |
|
3581 |
] |
|
3582 |
] |
|
3583 |
] |
|
3584 |
] |
|
3585 |
] |
|
52 | 3586 |
]. |
3587 |
||
3588 |
" |
|
3589 |
merge with superclass refs |
|
3590 |
" |
|
3591 |
dict keysAndValuesDo:[:cls :set | |
|
4158 | 3592 |
cls allSuperclasses do:[:aSuperclass | |
3593 |
|superSet| |
|
3594 |
||
3595 |
superSet := dict at:aSuperclass ifAbsent:[]. |
|
3596 |
superSet notNil ifTrue:[ |
|
3597 |
|removeSet| |
|
3598 |
||
3599 |
superSet := dict at:aSuperclass. |
|
3600 |
removeSet := Set new. |
|
3601 |
set do:[:offset | |
|
3602 |
(superSet includes:offset) ifTrue:[ |
|
3603 |
removeSet add:offset |
|
3604 |
] |
|
3605 |
]. |
|
3606 |
set removeAll:removeSet |
|
3607 |
] |
|
3608 |
] |
|
52 | 3609 |
]. |
3610 |
||
3611 |
" |
|
3612 |
remove empty ones |
|
3613 |
" |
|
3614 |
removeSet := Set new. |
|
3615 |
dict keysAndValuesDo:[:cls :set | |
|
4158 | 3616 |
set isEmpty ifTrue:[ |
3617 |
removeSet add:cls |
|
3618 |
] |
|
52 | 3619 |
]. |
9334 | 3620 |
dict removeAllKeys:removeSet. |
52 | 3621 |
|
3622 |
" |
|
3623 |
replace the indices by real names |
|
3624 |
" |
|
3625 |
newDict := IdentityDictionary new. |
|
3626 |
dict keysAndValuesDo:[:cls :set | |
|
4158 | 3627 |
|newSet names| |
3628 |
||
3629 |
names := cls allInstVarNames. |
|
3630 |
newSet := set collect:[:index | |
|
3631 |
index == 0 ifTrue:['*indexed*'] ifFalse:[names at:index]. |
|
3632 |
]. |
|
3633 |
newDict at:cls put:newSet |
|
52 | 3634 |
]. |
3635 |
||
3636 |
newDict inspect |
|
3637 |
! |
|
3638 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3639 |
filterToSearchRefsTo:varName classVars:classVars access:accessType |
7914 | 3640 |
"return a searchblock for variable references (obsolete)" |
3641 |
||
3642 |
^ self |
|
3643 |
filterToSearchRefsTo:varName |
|
3644 |
instVars:(classVars not) |
|
3645 |
classVars:classVars |
|
11934 | 3646 |
globals:false |
3647 |
poolVars:false |
|
7914 | 3648 |
access:accessType |
3649 |
! |
|
3650 |
||
3651 |
filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly |
|
3652 |
"return a searchblock for variable references" |
|
3653 |
||
3654 |
^ self |
|
3655 |
filterToSearchRefsTo:varName |
|
3656 |
classVars:classVars |
|
3657 |
access:(modsOnly ifTrue:#write ifFalse:#readWrite) |
|
3658 |
! |
|
3659 |
||
3660 |
filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals access:accessType |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3661 |
"return a searchblock for variable references" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3662 |
|
11934 | 3663 |
^ self |
3664 |
filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals |
|
3665 |
poolVars:false access:accessType |
|
3666 |
! |
|
3667 |
||
3668 |
filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals poolVars:doPoolVars access:accessType |
|
3669 |
"return a searchblock for variable references" |
|
3670 |
||
3671 |
|searchBlock needMatch baseVarName| |
|
3672 |
||
3673 |
needMatch := varName includesMatchCharacters. |
|
3674 |
(varName includes:$:) ifTrue:[ |
|
3675 |
baseVarName := varName copyFrom:(varName lastIndexOf:$:)+1 |
|
3676 |
] ifFalse:[ |
|
3677 |
baseVarName := varName |
|
3678 |
]. |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3679 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3680 |
searchBlock := [:c :m :s | |
11934 | 3681 |
|src result parser vars instVars classVars poolVars globals| |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3682 |
|
7914 | 3683 |
result := false. |
3684 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3685 |
src := m source. |
7914 | 3686 |
src notNil ifTrue:[ |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3687 |
needMatch ifFalse:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3688 |
" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3689 |
before doing a slow parse, quickly scan the |
10897
77388222c40e
comment: #filterToSearchRefsTo:instVars:classVars:globals:access:
Claus Gittinger <cg@exept.de>
parents:
10546
diff
changeset
|
3690 |
method's source for the variable's name ... |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3691 |
" |
11934 | 3692 |
result := (src findString:baseVarName) ~~ 0. |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3693 |
] ifTrue:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3694 |
result := true. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3695 |
]. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3696 |
result ifTrue:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3697 |
result := false. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3698 |
parser := Parser |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3699 |
parseMethod:src |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3700 |
in:c |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3701 |
ignoreErrors:true |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3702 |
ignoreWarnings:true. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3703 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3704 |
(parser notNil and:[parser ~~ #Error]) ifTrue:[ |
7914 | 3705 |
vars := Set new. |
3706 |
doInstVars ifTrue:[ |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3707 |
accessType == #read ifTrue:[ |
7914 | 3708 |
instVars := parser readInstVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3709 |
] ifFalse:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3710 |
accessType == #write ifTrue:[ |
7914 | 3711 |
instVars := parser modifiedInstVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3712 |
] ifFalse:[ |
7914 | 3713 |
instVars := parser usedInstVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3714 |
] |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3715 |
]. |
7914 | 3716 |
vars addAll:instVars. |
3717 |
]. |
|
3718 |
doClassVars ifTrue:[ |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3719 |
accessType == #read ifTrue:[ |
7914 | 3720 |
classVars := parser readClassVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3721 |
] ifFalse:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3722 |
accessType == #write ifTrue:[ |
7914 | 3723 |
classVars := parser modifiedClassVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3724 |
] ifFalse:[ |
7914 | 3725 |
classVars := parser usedClassVars |
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3726 |
] |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3727 |
]. |
7914 | 3728 |
vars addAll:classVars. |
3729 |
]. |
|
11934 | 3730 |
doPoolVars ifTrue:[ |
3731 |
accessType == #read ifTrue:[ |
|
3732 |
poolVars := parser readPoolVars |
|
3733 |
] ifFalse:[ |
|
3734 |
accessType == #write ifTrue:[ |
|
3735 |
poolVars := parser modifiedPoolVars |
|
3736 |
] ifFalse:[ |
|
3737 |
poolVars := parser usedPoolVars |
|
3738 |
] |
|
3739 |
]. |
|
3740 |
vars addAll:poolVars. |
|
3741 |
]. |
|
7914 | 3742 |
doGlobals ifTrue:[ |
3743 |
accessType == #read ifTrue:[ |
|
3744 |
globals := parser readGlobals |
|
3745 |
] ifFalse:[ |
|
3746 |
accessType == #write ifTrue:[ |
|
3747 |
globals := parser modifiedGlobals |
|
3748 |
] ifFalse:[ |
|
3749 |
globals := parser usedGlobals |
|
3750 |
] |
|
3751 |
]. |
|
3752 |
vars addAll:globals. |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3753 |
]. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3754 |
vars size > 0 ifTrue:[ |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3755 |
needMatch ifTrue:[ |
7914 | 3756 |
result := vars contains:[:cv | (varName match:cv)] |
504 | 3757 |
] ifFalse:[ |
3758 |
result := vars includes:varName |
|
3759 |
] |
|
3760 |
] |
|
3761 |
]. |
|
3762 |
]. |
|
3763 |
]. |
|
3764 |
Processor yield. |
|
3765 |
result |
|
36 | 3766 |
]. |
203 | 3767 |
^ searchBlock |
504 | 3768 |
|
10897
77388222c40e
comment: #filterToSearchRefsTo:instVars:classVars:globals:access:
Claus Gittinger <cg@exept.de>
parents:
10546
diff
changeset
|
3769 |
"Modified: / 19-06-1997 / 18:27:57 / cg" |
77388222c40e
comment: #filterToSearchRefsTo:instVars:classVars:globals:access:
Claus Gittinger <cg@exept.de>
parents:
10546
diff
changeset
|
3770 |
"Modified (format): / 25-11-2011 / 14:00:44 / cg" |
2642 | 3771 |
! |
3772 |
||
2743
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3773 |
findAnyResourceIn:aCollectionOfClasses |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3774 |
"return a collection of all methods in aCollectionOfClasses containing any resource." |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3775 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3776 |
^ self findMethodsIn:aCollectionOfClasses where:[:c :m :sel | m hasResource ]. |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3777 |
|
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3778 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3779 |
SystemBrowser findAnyResourceIn:(ApplicationModel withAllSubclasses) |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3780 |
" |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3781 |
! |
4fa5e36bef74
code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents:
2741
diff
changeset
|
3782 |
|
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3783 |
findClassRefsTo:aString in:aCollectionOfClasses access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3784 |
"return all methods in aCollectionOfClasses where the classVar named |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3785 |
aString is referenced; |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3786 |
if modsOnly is true, browse only methods where the classvar is modified" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3787 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3788 |
^ self findRefsTo:aString classVars:true in:aCollectionOfClasses access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3789 |
! |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3790 |
|
2677 | 3791 |
findClassRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly |
2728 | 3792 |
"return all methods in aCollectionOfClasses where the classVar named |
2677 | 3793 |
aString is referenced; |
3794 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
3795 |
||
3796 |
^ self findRefsTo:aString classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly |
|
3797 |
! |
|
3798 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3799 |
findClassRefsTo:aString inClass:aClass access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3800 |
"return all methods in aClass where the classVar named |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3801 |
aString is referenced; |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3802 |
if modsOnly is true, browse only methods where the classvar is modified" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3803 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3804 |
^ self findRefsTo:aString classVars:true in:(Array with:aClass) access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3805 |
! |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3806 |
|
2728 | 3807 |
findClassRefsTo:aString inClass:aClass modificationsOnly:modsOnly |
3808 |
"return all methods in aClass where the classVar named |
|
3809 |
aString is referenced; |
|
3810 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
3811 |
||
3812 |
^ self findRefsTo:aString classVars:true in:(Array with:aClass) modificationsOnly:modsOnly |
|
3813 |
! |
|
3814 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3815 |
findClassRefsTo:aString under:aClass access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3816 |
"return all methods in aClass and subclasses |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3817 |
where the classVar named aString is referenced; |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3818 |
if modsOnly is true, browse only methods where the classvar is modified" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3819 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3820 |
^ self findClassRefsTo:aString in:(aClass withAllSubclasses) access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3821 |
! |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
3822 |
|
2677 | 3823 |
findClassRefsTo:aString under:aClass modificationsOnly:modsOnly |
3824 |
"return all methods in aClass and subclasses |
|
3825 |
where the classVar named aString is referenced; |
|
3826 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
3827 |
||
3828 |
^ self findClassRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly |
|
3829 |
||
3830 |
! |
|
3831 |
||
5094 | 3832 |
findCode:aCodeString in:aCollectionOfClasses isMethod:isMethod |
5243 | 3833 |
"return a collection of all methods in aCollectionOfClasses |
5094 | 3834 |
containing a matching piece of code. |
3835 |
This may be slow, since source-code has to be scanned." |
|
3836 |
||
3837 |
|searchBlock| |
|
3838 |
||
9879 | 3839 |
searchBlock := self searchBlockForCode:aCodeString in:aCollectionOfClasses isMethod:isMethod. |
5226 | 3840 |
searchBlock isNil ifTrue:[ ^ nil]. |
5094 | 3841 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
9879 | 3842 |
|
3843 |
"Modified: / 02-05-2011 / 13:25:15 / sr" |
|
5094 | 3844 |
! |
3845 |
||
5243 | 3846 |
findCode:aCodeString inMethods:aCollectionOfMethods isMethod:isMethod |
3847 |
"return a collection of all methods in aCollectionOfMethods |
|
3848 |
containing a matching piece of code." |
|
3849 |
||
3850 |
|searchBlock| |
|
3851 |
||
9879 | 3852 |
searchBlock := self searchBlockForCode:aCodeString in:(aCollectionOfMethods collect:[:each | each mclass]) isMethod:isMethod. |
5243 | 3853 |
searchBlock isNil ifTrue:[ ^ nil]. |
3854 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
|
9879 | 3855 |
|
3856 |
"Modified: / 02-05-2011 / 13:25:39 / sr" |
|
5243 | 3857 |
! |
3858 |
||
9482 | 3859 |
findExceptionHandlersIn:aCollectionOfClasses |
3860 |
"return a collection of all methods in aCollectionOfClasses |
|
3861 |
containing an exception raiser. |
|
3862 |
This may be slow, since source-code has to be scanned." |
|
3863 |
||
3864 |
^ self findUsingParseTreeSearcher:(ParseTreeSearcher handlesException) in:aCollectionOfClasses |
|
3865 |
||
3866 |
"Modified: / 11-05-2010 / 16:18:55 / cg" |
|
3867 |
! |
|
3868 |
||
3869 |
findExceptionHandlersInMethods:aCollectionOfMethods |
|
3870 |
"return a collection of all methods in aCollectionOfClasses |
|
3871 |
containing an exception raiser. |
|
3872 |
This may be slow, since source-code has to be scanned." |
|
3873 |
||
3874 |
^ self findUsingParseTreeSearcher:(ParseTreeSearcher handlesException) inMethods:aCollectionOfMethods |
|
3875 |
||
3876 |
"Created: / 11-05-2010 / 16:20:48 / cg" |
|
3877 |
! |
|
3878 |
||
3879 |
findExceptionRaisersIn:aCollectionOfClasses |
|
3880 |
"return a collection of all methods in aCollectionOfClasses |
|
3881 |
containing an exception raiser. |
|
3882 |
This may be slow, since source-code has to be scanned." |
|
3883 |
||
3884 |
^ self findUsingParseTreeSearcher:(ParseTreeSearcher raisesException) in:aCollectionOfClasses |
|
3885 |
||
3886 |
"Modified: / 11-05-2010 / 16:18:48 / cg" |
|
3887 |
! |
|
3888 |
||
3889 |
findExceptionRaisersInMethods:aCollectionOfMethods |
|
3890 |
"return a collection of all methods in aCollectionOfClasses |
|
3891 |
containing an exception raiser. |
|
3892 |
This may be slow, since source-code has to be scanned." |
|
3893 |
||
3894 |
^ self findUsingParseTreeSearcher:(ParseTreeSearcher raisesException) inMethods:aCollectionOfMethods |
|
3895 |
||
3896 |
"Created: / 11-05-2010 / 16:20:36 / cg" |
|
3897 |
! |
|
3898 |
||
8129 | 3899 |
findHelpSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase |
3314 | 3900 |
"return a collection of all help-spec methods in aCollectionOfClasses |
3901 |
containing a string in their source. |
|
3902 |
This may be slow, since source-code has to be scanned." |
|
8129 | 3903 |
|
3904 |
^ self |
|
3905 |
findSpecMethodsFor:#help |
|
3906 |
withString:aString |
|
3907 |
in:aCollectionOfClasses |
|
3908 |
ignoreCase:ignoreCase |
|
3909 |
! |
|
3910 |
||
3911 |
findHelpSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
3912 |
"return a collection of all help-spec methods in aCollectionOfClasses |
|
3913 |
containing a string in their source. |
|
3914 |
This may be slow, since source-code has to be scanned." |
|
3915 |
||
3916 |
^ self |
|
3917 |
findSpecMethodsFor:#help |
|
3918 |
withString:aString |
|
3919 |
in:aCollectionOfClasses |
|
3920 |
ignoreCase:ignoreCase |
|
3921 |
match:doMatch |
|
3314 | 3922 |
! |
3923 |
||
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3924 |
findImplementors:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
3675 | 3925 |
"search for all implementors of aSelector in |
3926 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
3927 |
Return a collection of methods" |
|
3928 |
||
11452 | 3929 |
|lcSelector list compare testST testJava srchBlockST srchBlockJava| |
3675 | 3930 |
|
3931 |
list := IdentitySet new. |
|
6051 | 3932 |
aSelectorMatchString size == 0 ifTrue:[ ^ list ]. |
3933 |
||
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3934 |
doMatch ifTrue:[ |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3935 |
compare := [:sel :search | sel match:search]. |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3936 |
] ifFalse:[ |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3937 |
compare := [:sel :search | sel = search]. |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3938 |
]. |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
3939 |
|
3675 | 3940 |
ignoreCase == true ifTrue:[ |
3941 |
lcSelector := aSelectorMatchString asLowercase. |
|
3942 |
||
7847 | 3943 |
testST := [:aSelector :aMethod | (compare value:lcSelector value:(aMethod name ? '') asLowercase) ]. |
6776
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3944 |
testJava := [:aSelector :aMethod | (compare value:aSelector value:aMethod name asLowercase) ]. |
3675 | 3945 |
] ifFalse:[ |
6776
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3946 |
testST := [:aSelector :aMethod | (compare value:aSelectorMatchString value:aSelector) ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3947 |
testJava := [:aSelector :aMethod | (compare value:aSelectorMatchString value:aMethod name) ]. |
3675 | 3948 |
]. |
3949 |
||
11452 | 3950 |
srchBlockST := [:sel :mthd | (testST value:sel value:mthd) ifTrue:[ list add:mthd]]. |
3951 |
srchBlockJava := [:sel :mthd | (testJava value:sel value:mthd) ifTrue:[ list add:mthd]]. |
|
3952 |
||
3675 | 3953 |
aCollectionOfClasses do:[:aClass | |
11452 | 3954 |
|srchBlock| |
3675 | 3955 |
|
3956 |
aClass isObsolete ifFalse:[ |
|
11452 | 3957 |
srchBlock := aClass isJavaClass |
3958 |
ifTrue:[ srchBlockJava ] |
|
3959 |
ifFalse:[ srchBlockST ]. |
|
3960 |
||
3675 | 3961 |
aClass methodDictionary keysAndValuesDo:srchBlock. |
3962 |
aClass isMeta ifFalse:[ |
|
3963 |
aClass class methodDictionary keysAndValuesDo:srchBlock |
|
3964 |
] |
|
3965 |
] |
|
3966 |
]. |
|
3967 |
||
3968 |
^ list |
|
3969 |
||
3970 |
" |
|
11452 | 3971 |
SystemBrowser |
3972 |
findImplementorsOf:#+ |
|
3973 |
in: { Number . Float . SmallInteger } |
|
3974 |
ignoreCase: false |
|
3975 |
" |
|
3976 |
||
3977 |
"Modified (format): / 22-03-2012 / 07:28:50 / cg" |
|
3675 | 3978 |
! |
3979 |
||
6776
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3980 |
findImplementors:aSelectorMatchString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3981 |
"search for all implementors of aSelector in |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3982 |
the classes contained in aCollectionOfClasses and its metaclasses. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3983 |
Return a collection of methods" |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3984 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3985 |
|list compare testST testJava lcSelector| |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3986 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3987 |
list := IdentitySet new. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3988 |
aSelectorMatchString size == 0 ifTrue:[ ^ list ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3989 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3990 |
doMatch ifTrue:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3991 |
compare := [:sel :search | sel match:search]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3992 |
] ifFalse:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3993 |
compare := [:sel :search | sel = search]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3994 |
]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3995 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3996 |
ignoreCase == true ifTrue:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3997 |
lcSelector := aSelectorMatchString asLowercase. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3998 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
3999 |
testST := [:aSelector :aMethod | (compare value:lcSelector value:aMethod name asLowercase) ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4000 |
testJava := [:aSelector :aMethod | (compare value:aSelector value:aMethod name asLowercase) ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4001 |
] ifFalse:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4002 |
testST := [:aSelector :aMethod | (compare value:aSelectorMatchString value:aSelector) ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4003 |
testJava := [:aSelector :aMethod | (compare value:aSelectorMatchString value:aMethod name) ]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4004 |
]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4005 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4006 |
aCollectionOfMethods do:[:eachMethod | |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4007 |
|cls sel testBlock| |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4008 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4009 |
cls := eachMethod mclass. |
7066 | 4010 |
(cls isNil or:[cls isObsolete]) ifFalse:[ |
6776
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4011 |
cls isJavaClass ifTrue:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4012 |
testBlock := testJava |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4013 |
] ifFalse:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4014 |
testBlock := testST |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4015 |
]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4016 |
sel := eachMethod selector. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4017 |
(testBlock value:sel value:eachMethod) ifTrue:[ |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4018 |
list add:eachMethod |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4019 |
]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4020 |
] |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4021 |
]. |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4022 |
|
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4023 |
^ list |
7066 | 4024 |
|
4025 |
"Modified: / 29-08-2006 / 14:33:42 / cg" |
|
6776
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4026 |
! |
5f5fd533b1f4
implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents:
6705
diff
changeset
|
4027 |
|
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4028 |
findImplementorsMatching:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4029 |
"search for all implementors of aSelector in |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4030 |
the classes contained in aCollectionOfClasses and its metaclasses. |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4031 |
Return a collection of methods" |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4032 |
|
11452 | 4033 |
^ self |
4034 |
findImplementors:aSelectorMatchString |
|
4035 |
in:aCollectionOfClasses |
|
4036 |
ignoreCase:ignoreCase |
|
4037 |
match:true |
|
4038 |
||
4039 |
" |
|
4040 |
SystemBrowser |
|
4041 |
findImplementorsOf:#+ |
|
4042 |
in:{ Number . Float . SmallInteger } |
|
4043 |
" |
|
4044 |
||
4045 |
"Modified (comment): / 22-03-2012 / 07:20:42 / cg" |
|
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4046 |
! |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4047 |
|
3675 | 4048 |
findImplementorsMatchingAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase |
4049 |
"search for all implementors of any in aCollectionOfSelectors in |
|
4050 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4051 |
Return a collection of methods. |
|
4052 |
CAVEAT: searches multiple times (could be tuned alot if heavily used)" |
|
4053 |
||
6052 | 4054 |
^ aCollectionOfSelectors |
4055 |
collectAll:[:eachSelector | |
|
4056 |
self findImplementorsMatching:eachSelector |
|
4057 |
in:aCollectionOfClasses |
|
4058 |
ignoreCase:ignoreCase. |
|
4059 |
]. |
|
4060 |
||
4061 |
"/ |implementors| |
|
4062 |
"/ |
|
6051 | 4063 |
"/ implementors := IdentitySet new. |
4064 |
"/ aCollectionOfSelectors do:[:eachSelector | |
|
4065 |
"/ implementors addAll:(self findImplementorsMatching:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase). |
|
4066 |
"/ ]. |
|
6052 | 4067 |
"/ ^ implementors |
6051 | 4068 |
|
4069 |
" |
|
4070 |
self |
|
4071 |
findImplementorsMatchingAny:#( 'at*:' '*size') |
|
4072 |
in:(Smalltalk allClasses) |
|
4073 |
ignoreCase:true |
|
4074 |
" |
|
3675 | 4075 |
! |
4076 |
||
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4077 |
findImplementorsOf:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase |
2642 | 4078 |
"search for all implementors of aSelector in |
4079 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4080 |
Return a collection of methods" |
|
4081 |
||
6480 | 4082 |
^ self |
4083 |
findImplementors:aSelectorMatchString |
|
4084 |
in:aCollectionOfClasses |
|
4085 |
ignoreCase:ignoreCase |
|
4086 |
match:false |
|
2642 | 4087 |
|
4088 |
" |
|
4089 |
SystemBrowser findImplementorsOf:#+ |
|
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4090 |
in:(Array with:Number |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4091 |
with:Float |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4092 |
with:SmallInteger) |
2642 | 4093 |
" |
4094 |
! |
|
4095 |
||
2811 | 4096 |
findImplementorsOfAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase |
4097 |
"search for all implementors of any in aCollectionOfSelectors in |
|
4098 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4099 |
Return a collection of methods. |
|
4100 |
CAVEAT: searches multiple times (could be tuned alot if heavily used)" |
|
4101 |
||
6052 | 4102 |
^ aCollectionOfSelectors |
4103 |
collectAll:[:eachSelector | |
|
4104 |
self findImplementorsOf:eachSelector |
|
4105 |
in:aCollectionOfClasses |
|
4106 |
ignoreCase:ignoreCase. |
|
4107 |
]. |
|
4108 |
||
4109 |
"/ |implementors| |
|
4110 |
"/ |
|
4111 |
"/ implementors := IdentitySet new. |
|
4112 |
"/ aCollectionOfSelectors do:[:eachSelector | |
|
4113 |
"/ implementors addAll:(self findImplementorsOf:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase). |
|
4114 |
"/ ]. |
|
4115 |
"/ ^ implementors |
|
2811 | 4116 |
! |
4117 |
||
2741 | 4118 |
findInstRefsTo:aString in:aCollectionOfClasses access:accessType |
4119 |
"return all methods in aCollectionOfClasses where the instVar named |
|
4120 |
aString is referenced; |
|
4121 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
4122 |
||
4123 |
^ self findRefsTo:aString classVars:false in:aCollectionOfClasses access:accessType |
|
4124 |
! |
|
4125 |
||
2677 | 4126 |
findInstRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly |
2728 | 4127 |
"return all methods in aCollectionOfClasses where the instVar named |
2677 | 4128 |
aString is referenced; if modsOnly is true, browse only methods where the |
4129 |
instvar is modified" |
|
4130 |
||
4131 |
^ self findRefsTo:aString classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly |
|
4132 |
! |
|
4133 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4134 |
findInstRefsTo:aString inClass:aClass access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4135 |
"return all methods in aClass where the instVar named |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4136 |
aString is referenced; if modsOnly is true, browse only methods where the |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4137 |
instvar is modified" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4138 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4139 |
^ self findRefsTo:aString classVars:false in:(Array with:aClass) access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4140 |
! |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4141 |
|
2728 | 4142 |
findInstRefsTo:aString inClass:aClass modificationsOnly:modsOnly |
4143 |
"return all methods in aClass where the instVar named |
|
4144 |
aString is referenced; if modsOnly is true, browse only methods where the |
|
4145 |
instvar is modified" |
|
4146 |
||
4147 |
^ self findRefsTo:aString classVars:false in:(Array with:aClass) modificationsOnly:modsOnly |
|
4148 |
! |
|
4149 |
||
2741 | 4150 |
findInstRefsTo:aString under:aClass access:accessType |
4151 |
"return all methods in aClass and subclasses |
|
4152 |
where the classVar named aString is referenced; |
|
4153 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
4154 |
||
4155 |
^ self findInstRefsTo:aString in:(aClass withAllSubclasses) access:accessType |
|
4156 |
! |
|
4157 |
||
2677 | 4158 |
findInstRefsTo:aString under:aClass modificationsOnly:modsOnly |
4159 |
"return all methods in aClass and subclasses |
|
4160 |
where the instVar named aString is referenced; |
|
4161 |
if modsOnly is true, browse only methods where the instvar is modified" |
|
4162 |
||
4163 |
^ self findInstRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly |
|
4164 |
! |
|
4165 |
||
8129 | 4166 |
findMenuSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase |
3314 | 4167 |
"return a collection of all menu-spec methods in aCollectionOfClasses |
4168 |
containing a string in their source. |
|
4169 |
This may be slow, since source-code has to be scanned." |
|
8129 | 4170 |
|
4171 |
^ self |
|
4172 |
findSpecMethodsFor:#menu |
|
4173 |
withString:aString |
|
4174 |
in:aCollectionOfClasses |
|
4175 |
ignoreCase:ignoreCase |
|
4176 |
! |
|
4177 |
||
4178 |
findMenuSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
4179 |
"return a collection of all menu-spec methods in aCollectionOfClasses |
|
4180 |
containing a string in their source. |
|
4181 |
This may be slow, since source-code has to be scanned." |
|
4182 |
||
4183 |
^ self |
|
4184 |
findSpecMethodsFor:#menu |
|
4185 |
withString:aString |
|
4186 |
in:aCollectionOfClasses |
|
4187 |
ignoreCase:ignoreCase |
|
4188 |
match:doMatch |
|
3314 | 4189 |
! |
4190 |
||
11934 | 4191 |
findPoolVarRefsTo:aString inClass:aClass access:accessType |
4192 |
"return all methods in aClass where the pool variable named aString is referenced; |
|
4193 |
if modsOnly is true, browse only methods where the classvar is modified" |
|
4194 |
||
4195 |
|filter| |
|
4196 |
||
4197 |
filter := self |
|
4198 |
filterToSearchRefsTo:aString |
|
4199 |
instVars:false classVars:false globals:false poolVars:true |
|
4200 |
access:accessType. |
|
4201 |
||
4202 |
^ self findMethodsIn:(Array with:aClass) inst:true class:true where:filter. |
|
4203 |
! |
|
4204 |
||
2736
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4205 |
findRefsTo:varName classVars:classVars in:aCollectionOfClasses access:accessType |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4206 |
"return a list of all methods in aCollectionOfClasses where the instVar/classVar named |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4207 |
varName is referenced; |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4208 |
if modsOnly is true, browse only methods where the instvar is modified" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4209 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4210 |
|filter| |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4211 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4212 |
filter := self filterToSearchRefsTo:varName classVars:classVars access:accessType. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4213 |
^ self findMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter. |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4214 |
|
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4215 |
" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4216 |
self |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4217 |
findRefsTo:'x' |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4218 |
classVars:false |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4219 |
in:(Array with:Point) |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4220 |
modificationsOnly:true |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4221 |
" |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4222 |
! |
5b585170e14a
added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents:
2729
diff
changeset
|
4223 |
|
2677 | 4224 |
findRefsTo:varName classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly |
4225 |
"return a list of all methods in aCollectionOfClasses where the instVar/classVar named |
|
4226 |
varName is referenced; |
|
4227 |
if modsOnly is true, browse only methods where the instvar is modified" |
|
4228 |
||
4229 |
|filter| |
|
4230 |
||
4231 |
filter := self filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly. |
|
4232 |
^ self findMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter. |
|
4233 |
||
4234 |
" |
|
4235 |
self |
|
4236 |
findRefsTo:'x' |
|
4237 |
classVars:false |
|
4238 |
in:(Array with:Point) |
|
4239 |
modificationsOnly:true |
|
4240 |
" |
|
4241 |
! |
|
4242 |
||
2692 | 4243 |
findResource:aResourceSymbolOrCollectionOfSymbols in:aCollectionOfClasses |
4244 |
"return a collection of all methods in aCollectionOfClasses |
|
4245 |
containing a resource." |
|
4246 |
||
4247 |
|searchBlock| |
|
4248 |
||
4249 |
aResourceSymbolOrCollectionOfSymbols isSymbol ifTrue:[ |
|
4250 |
searchBlock := [:c :m :sel | |resources| |
|
4251 |
(resources := m resources) size > 0 |
|
4252 |
and:[resources includesKey:aResourceSymbolOrCollectionOfSymbols] |
|
4253 |
]. |
|
4254 |
] ifFalse:[ |
|
4255 |
searchBlock := [:c :m :sel | |resources| |
|
4256 |
(resources := m resources) size > 0 |
|
4257 |
and:[resources keys includesAny:aResourceSymbolOrCollectionOfSymbols] |
|
4258 |
]. |
|
4259 |
]. |
|
4260 |
||
4261 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
|
4262 |
||
4263 |
" |
|
4264 |
SystemBrowser findResource:#image in:(ApplicationModel withAllSubclasses) |
|
4265 |
SystemBrowser findResource:#menu in:(ApplicationModel withAllSubclasses) |
|
4266 |
SystemBrowser findResource:#(menu programMenu) in:(ApplicationModel withAllSubclasses) |
|
4267 |
" |
|
4268 |
! |
|
4269 |
||
10188
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4270 |
findResource:aStringOrEmpty match:doMatch ignoreCase:ignoreCase in:aCollectionOfClasses |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4271 |
"return a collection of all methods in aCollectionOfClasses containing a matching resource." |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4272 |
|
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4273 |
|matchCheck lcSearchString| |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4274 |
|
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4275 |
aStringOrEmpty isEmptyOrNil ifTrue:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4276 |
matchCheck := [:aResourceName | true ] |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4277 |
] ifFalse:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4278 |
doMatch ifTrue:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4279 |
matchCheck := [:aResourceName | aStringOrEmpty match:aResourceName ignoreCase:ignoreCase] |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4280 |
] ifFalse:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4281 |
ignoreCase ifTrue:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4282 |
lcSearchString := aStringOrEmpty asLowercase. |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4283 |
matchCheck := [:aResourceName | aResourceName asLowercase = lcSearchString] |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4284 |
] ifFalse:[ |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4285 |
matchCheck := [:aResourceName | aResourceName = aStringOrEmpty ] |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4286 |
] |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4287 |
]. |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4288 |
]. |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4289 |
|
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4290 |
^ self |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4291 |
findMethodsIn:aCollectionOfClasses |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4292 |
where:[:c :m :sel | |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4293 |
m hasResource |
12073 | 4294 |
and:[m resources notNil and:[m resources keys contains:matchCheck]] |
10188
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4295 |
]. |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4296 |
|
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4297 |
" |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4298 |
SystemBrowser findResource:'*debug*' match:true ignoreCase:true in:(GenericException withAllSubclasses) |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4299 |
" |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4300 |
|
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4301 |
"Created: / 06-07-2011 / 12:14:24 / cg" |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4302 |
! |
95e82ec734ff
added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents:
10173
diff
changeset
|
4303 |
|
2642 | 4304 |
findSendersOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase |
4305 |
"search for all senders of aSelector in |
|
4306 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4307 |
Return a collection of methods" |
|
4308 |
||
4270 | 4309 |
^ self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:true |
2642 | 4310 |
|
4311 |
" |
|
4312 |
SystemBrowser findSendersOf:#+ |
|
4313 |
in:(Array with:Number |
|
4314 |
with:Float |
|
4315 |
with:SmallInteger) |
|
4316 |
ignoreCase:false |
|
4317 |
" |
|
4270 | 4318 |
! |
4319 |
||
4320 |
findSendersOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
4321 |
"search for all senders of aSelector in |
|
4322 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4323 |
Return a collection of methods" |
|
4324 |
||
4325 |
^ self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
4326 |
||
4327 |
" |
|
4328 |
SystemBrowser findSendersOf:#+ |
|
4329 |
in:(Array with:Number |
|
4330 |
with:Float |
|
4331 |
with:SmallInteger) |
|
4332 |
ignoreCase:false |
|
4333 |
" |
|
2675 | 4334 |
! |
4335 |
||
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4336 |
findSendersOf:aSelectorString inMethods:aCollectionOfMethods ignoreCase:ignoreCase |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4337 |
"search for all senders of aSelector in aCollectionOfMethods. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4338 |
Return a collection of methods" |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4339 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4340 |
|searchBlock| |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4341 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4342 |
searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase. |
9313
44795fcbf414
changed: #findSendersOf:inMethods:ignoreCase:
Claus Gittinger <cg@exept.de>
parents:
9312
diff
changeset
|
4343 |
searchBlock isNil ifTrue:[^ #() ]. |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4344 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4345 |
! |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4346 |
|
4350 | 4347 |
findSendersOf:aSelectorString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch |
4348 |
"search for all senders of aSelector in aCollectionOfMethods. |
|
4349 |
Return a collection of methods" |
|
4350 |
||
4351 |
|searchBlock| |
|
4352 |
||
4353 |
searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatch. |
|
9312
71f84182390a
changed: #findSendersOf:inMethods:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
9189
diff
changeset
|
4354 |
searchBlock isNil ifTrue:[^ #() ]. |
4350 | 4355 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
4356 |
! |
|
4357 |
||
2811 | 4358 |
findSendersOfAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase |
4359 |
"search for all senders of any selector in aCollectionOfSelectors in |
|
4360 |
the classes contained in aCollectionOfClasses and its metaclasses. |
|
4361 |
Return a collection of methods. |
|
4362 |
CAVEAT: searches multiple times (could be tuned alot if heavily used)" |
|
4363 |
||
6052 | 4364 |
^ aCollectionOfSelectors |
4365 |
collectAll:[:eachSelector | |
|
6184 | 4366 |
(self allCallsOn:eachSelector |
6052 | 4367 |
in:aCollectionOfClasses |
4368 |
ignoreCase:ignoreCase |
|
6184 | 4369 |
match:false) asSet. |
6052 | 4370 |
]. |
4371 |
||
4372 |
"/ |allSenders| |
|
4373 |
"/ |
|
4374 |
"/ allSenders := IdentitySet new. |
|
4375 |
"/ aCollectionOfSelectors do:[:eachSelector | |
|
4376 |
"/ allSenders addAll:(self allCallsOn:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase match:true) |
|
4377 |
"/ ]. |
|
4378 |
"/ ^ allSenders |
|
2811 | 4379 |
|
4380 |
" |
|
4381 |
SystemBrowser findSendersOfAny:#(#'+' #'-') |
|
4382 |
in:(Array with:Number |
|
4383 |
with:Float |
|
4384 |
with:SmallInteger) |
|
4385 |
ignoreCase:false |
|
4386 |
" |
|
4387 |
! |
|
4388 |
||
3314 | 4389 |
findSpecMethodsFor:specSymbol withString:aString in:aCollectionOfClasses ignoreCase:ignoreCase |
4390 |
"return a collection of all specSymbol-spec methods in aCollectionOfClasses |
|
4391 |
containing a string in their source. |
|
4392 |
This may be slow, since source-code has to be scanned." |
|
4393 |
||
8129 | 4394 |
self |
4395 |
findSpecMethodsFor:specSymbol |
|
4396 |
withString:aString |
|
4397 |
in:aCollectionOfClasses |
|
4398 |
ignoreCase:ignoreCase |
|
4399 |
match:true |
|
4400 |
! |
|
4401 |
||
4402 |
findSpecMethodsFor:specSymbol withString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
|
4403 |
"return a collection of all specSymbol-spec methods in aCollectionOfClasses |
|
4404 |
containing a string in their source. |
|
4405 |
This may be slow, since source-code has to be scanned." |
|
4406 |
||
4407 |
|searchBlock innerSearchBlock| |
|
4408 |
||
4409 |
innerSearchBlock := self searchBlockForString:aString ignoreCase:ignoreCase match:doMatch. |
|
4410 |
||
4411 |
searchBlock := [:c :m :sel | |
|
4412 |
|resources| |
|
3314 | 4413 |
|
4414 |
((resources := m resources) size > 0 |
|
4415 |
and:[resources includesKey:specSymbol]) ifTrue:[ |
|
8129 | 4416 |
innerSearchBlock value:c value:m value:sel |
3314 | 4417 |
] |
8129 | 4418 |
]. |
4419 |
||
3314 | 4420 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
4421 |
! |
|
4422 |
||
8129 | 4423 |
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase |
5243 | 4424 |
"return a collection of all methods in aCollectionOfClasses |
2675 | 4425 |
containing a string in their source. |
4426 |
This may be slow, since source-code has to be scanned." |
|
8129 | 4427 |
|
4428 |
^ self |
|
4429 |
findString:aString |
|
4430 |
in:aCollectionOfClasses |
|
4431 |
ignoreCase:ignoreCase |
|
4432 |
match:true |
|
4433 |
||
4434 |
" |
|
4435 |
SystemBrowser findString:'should' in:(Array with:Object) ignoreCase:false |
|
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4436 |
" |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4437 |
! |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4438 |
|
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4439 |
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
5243 | 4440 |
"return a collection of all methods in aCollectionOfClasses |
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4441 |
containing a string in their source. |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4442 |
This may be slow, since source-code has to be scanned." |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
4443 |
|
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4444 |
|searchBlock| |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4445 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4446 |
searchBlock := self searchBlockForString:aString ignoreCase:ignoreCase match:doMatch. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4447 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4448 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4449 |
" |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4450 |
SystemBrowser findString:'should' in:(Array with:Object) ignoreCase:false |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4451 |
" |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4452 |
! |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4453 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4454 |
findString:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch |
5243 | 4455 |
"return a collection of all methods in aCollectionOfClasses |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4456 |
containing a string in their source. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4457 |
This may be slow, since source-code has to be scanned." |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4458 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4459 |
|searchBlock| |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4460 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4461 |
searchBlock := self searchBlockForString:aString ignoreCase:ignoreCase match:doMatch. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4462 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4463 |
! |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4464 |
|
5877 | 4465 |
findStringLiteral:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch |
4466 |
"return a collection of all methods in aCollectionOfClasses |
|
4467 |
containing a string in any of their string-literals." |
|
4468 |
||
4469 |
|searchBlock| |
|
4470 |
||
4471 |
searchBlock := self searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatch. |
|
4472 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
|
4473 |
||
4474 |
" |
|
4475 |
SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false |
|
4476 |
" |
|
4477 |
! |
|
4478 |
||
4479 |
findStringLiteral:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch |
|
4480 |
"return a collection of all methods in aCollectionOfClasses |
|
4481 |
containing a string in any of their string-literals." |
|
4482 |
||
4483 |
|searchBlock| |
|
4484 |
||
4485 |
searchBlock := self searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatch. |
|
4486 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
|
4487 |
! |
|
4488 |
||
9482 | 4489 |
findUsingParseTreeSearcher:searcher in:aCollectionOfClasses |
4490 |
"return a collection of all methods in aCollectionOfClasses |
|
4491 |
containing an exception raiser. |
|
4492 |
This may be slow, since source-code has to be scanned." |
|
4493 |
||
4494 |
|searchBlock| |
|
4495 |
||
4496 |
searchBlock := self searchBlockForParseTreeSearcher:searcher isMethod:false. |
|
4497 |
searchBlock isNil ifTrue:[ ^ nil]. |
|
4498 |
^ self findMethodsIn:aCollectionOfClasses where:searchBlock. |
|
4499 |
||
4500 |
"Created: / 11-05-2010 / 16:18:36 / cg" |
|
4501 |
! |
|
4502 |
||
4503 |
findUsingParseTreeSearcher:searcher inMethods:aCollectionOfMethods |
|
4504 |
"return a collection of all methods in aCollectionOfClasses |
|
4505 |
containing an exception raiser. |
|
4506 |
This may be slow, since source-code has to be scanned." |
|
4507 |
||
4508 |
|searchBlock| |
|
4509 |
||
4510 |
searchBlock := self searchBlockForParseTreeSearcher:searcher isMethod:false. |
|
4511 |
searchBlock isNil ifTrue:[ ^ nil]. |
|
4512 |
^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector]. |
|
4513 |
||
4514 |
"Created: / 11-05-2010 / 16:20:12 / cg" |
|
4515 |
! |
|
4516 |
||
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4517 |
searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase |
4270 | 4518 |
^ self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:true |
4519 |
! |
|
4520 |
||
4521 |
searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatch |
|
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4522 |
|sel searchBlock lcString quickMatch| |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4523 |
|
10416
82d17ccb68ad
changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
10386
diff
changeset
|
4524 |
((doMatch |
4270 | 4525 |
and:[(aSelectorString ~= '*') |
10416
82d17ccb68ad
changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
10386
diff
changeset
|
4526 |
and:[aSelectorString includesMatchCharacters]]) |
82d17ccb68ad
changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
10386
diff
changeset
|
4527 |
or:[ignoreCase]) ifTrue:[ |
8685
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4528 |
"/ a matchString or ignoreCase - need string matching procedure |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4529 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4530 |
ignoreCase ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4531 |
lcString := aSelectorString asLowercase. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4532 |
] ifFalse:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4533 |
lcString := aSelectorString. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4534 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4535 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4536 |
quickMatch := aSelectorString. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4537 |
(quickMatch startsWith:'*') ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4538 |
quickMatch := quickMatch copyFrom:2 |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4539 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4540 |
(quickMatch endsWith:'*') ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4541 |
quickMatch := quickMatch copyWithoutLast:1 |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4542 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4543 |
(quickMatch includes:$:) ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4544 |
quickMatch := quickMatch copyTo:(quickMatch indexOf:$:)-1. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4545 |
]. |
8685
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4546 |
|
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4547 |
(ignoreCase not and:[quickMatch includesMatchCharacters not]) ifTrue:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4548 |
searchBlock := [:class :method :s | |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4549 |
|src inLiterals| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4550 |
|
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4551 |
inLiterals := false. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4552 |
method isLazyMethod ifTrue:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4553 |
src := method source. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4554 |
(src notNil and:[src includesString:quickMatch]) ifTrue:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4555 |
method makeRealMethod. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4556 |
inLiterals := (method |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4557 |
literalsDetect:[:aLiteral| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4558 |
(aLiteral isMemberOf:Symbol) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4559 |
and:[(lcString includesString:quickMatch) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4560 |
and:[(lcString match:aLiteral)]]] |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4561 |
ifNone:nil) notNil |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4562 |
] |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4563 |
] ifFalse:[ |
8685
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4564 |
inLiterals := (method |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4565 |
literalsDetect:[:aLiteral| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4566 |
(aLiteral isMemberOf:Symbol) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4567 |
and:[(lcString includesString:quickMatch) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4568 |
and:[(lcString match:aLiteral)]]] |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4569 |
ifNone:nil) notNil |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4570 |
]. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4571 |
inLiterals |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4572 |
and:[ method messagesSent contains:[:anySelector | aSelectorString match:anySelector ignoreCase:ignoreCase] ] |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4573 |
]. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4574 |
] ifFalse:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4575 |
searchBlock := [:class :method :s | |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4576 |
|src inLiterals| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4577 |
|
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4578 |
"/ expensive search |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4579 |
inLiterals := false. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4580 |
method isLazyMethod ifTrue:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4581 |
src := method source. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4582 |
(src notNil and:[src includesMatchString:aSelectorString]) ifTrue:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4583 |
method makeRealMethod. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4584 |
inLiterals := (method |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4585 |
literalsDetect:[:aLiteral| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4586 |
(aLiteral isMemberOf:Symbol) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4587 |
and:[(ignoreCase and:[lcString match:aLiteral asLowercase]) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4588 |
or:[ignoreCase not and:[lcString match:aLiteral]]]] |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4589 |
ifNone:nil) notNil |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4590 |
] |
8685
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4591 |
] ifFalse:[ |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4592 |
inLiterals := (method literalsDetect:[:aLiteral| |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4593 |
(aLiteral isMemberOf:Symbol) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4594 |
and:[(ignoreCase and:[lcString match:aLiteral asLowercase]) |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4595 |
or:[ignoreCase not and:[lcString match:aLiteral]]]] |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4596 |
ifNone:nil) notNil |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4597 |
]. |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4598 |
inLiterals |
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4599 |
and:[ method messagesSent contains:[:anySelector | aSelectorString match:anySelector ignoreCase:ignoreCase] ] |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4600 |
]. |
8685
b39dc53c40ae
dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents:
8678
diff
changeset
|
4601 |
]. |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4602 |
] ifFalse:[ |
4270 | 4603 |
(doMatch and:[aSelectorString = '*']) ifTrue:[ |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4604 |
searchBlock := [:class :method :s | true]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4605 |
] ifFalse:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4606 |
"/ no matchString - can do it much faster |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4607 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4608 |
sel := aSelectorString asSymbolIfInterned. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4609 |
sel isNil ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4610 |
^ nil "/ none |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4611 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4612 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4613 |
quickMatch := sel. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4614 |
(quickMatch includes:$:) ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4615 |
quickMatch := quickMatch copyTo:(quickMatch indexOf:$:)-1. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4616 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4617 |
searchBlock := [:class :method :s | |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4618 |
|src| |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4619 |
|
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4620 |
method isLazyMethod ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4621 |
src := method source. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4622 |
(src notNil and:[src includesString:quickMatch]) ifTrue:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4623 |
method makeRealMethod. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4624 |
method sends:sel. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4625 |
] ifFalse:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4626 |
false |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4627 |
] |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4628 |
] ifFalse:[ |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4629 |
method sends:sel |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4630 |
] |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4631 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4632 |
] |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4633 |
]. |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4634 |
^ searchBlock |
10416
82d17ccb68ad
changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
10386
diff
changeset
|
4635 |
|
82d17ccb68ad
changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents:
10386
diff
changeset
|
4636 |
"Modified: / 28-07-2011 / 10:52:51 / cg" |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4637 |
! |
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4638 |
|
9879 | 4639 |
searchBlockForCode:aCodeString in:aCollectionOfClasses isMethod:isMethod |
10546
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4640 |
"return a block to search for a piece of code. |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4641 |
intelligent search: because parsing and the parseTree-match is a relatively |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4642 |
expensive operation, we try hard to reduce the amount of searched methods by: |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4643 |
- extracting sent messages from the pattern, and limiting the search to |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4644 |
methods which also send all those messages, |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4645 |
- extracting accessed globals from the pattern, and limiting the search to |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4646 |
methods which also refer to those globals" |
5094 | 4647 |
|
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4648 |
|errAction searchTree searcher globalVariablesUsed usedSymbols usedStrings |
9879 | 4649 |
sentMessages searchBlock foundMatch numMethodArgs methodSelector nameSpacesForGlobals| |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4650 |
|
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4651 |
"/self halt. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4652 |
"/rule := ParseTreeLintRule |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4653 |
"/ createParseTreeRule: (Array with: aCodeString) |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4654 |
"/ method: isMethod |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4655 |
"/ name: 'Search for: ' , aCodeString. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4656 |
"/self halt. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4657 |
"/ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4658 |
"/ searchBlock := [:c :m :sel | |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4659 |
"/ rslt := SmalllintChecker |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4660 |
"/ runRule:rule |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4661 |
"/ onEnvironment: (ClassEnvironment onEnvironment:(BrowserEnvironment new) classes:(Array with:c)). |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4662 |
"/ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4663 |
"/ self halt. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4664 |
"/ ]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4665 |
"/^ searchBlock. |
5226 | 4666 |
|
4667 |
errAction := [:str :pos | |
|
4668 |
Dialog warn:'Error during parse: ' , str , ' (position ' , pos printString , ')'. |
|
4669 |
^ nil |
|
4670 |
]. |
|
5094 | 4671 |
|
4672 |
isMethod ifTrue:[ |
|
4673 |
searchTree := RBParser |
|
4674 |
parseRewriteMethod:aCodeString |
|
5226 | 4675 |
onError: errAction. |
8281
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4676 |
numMethodArgs := searchTree arguments size. |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4677 |
methodSelector := searchTree selector. |
5094 | 4678 |
] ifFalse:[ |
4679 |
searchTree := RBParser |
|
4680 |
parseRewriteExpression:aCodeString |
|
5226 | 4681 |
onError: errAction. |
5094 | 4682 |
]. |
4683 |
||
10546
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4684 |
"/ extract messages sent by the pattern |
6368 | 4685 |
Error handle:[:ex | |
12056 | 4686 |
self halt. |
6368 | 4687 |
] do:[ |
6549 | 4688 |
sentMessages := searchTree sentMessages. |
5135 | 4689 |
]. |
6581 | 4690 |
|
9879 | 4691 |
nameSpacesForGlobals := Set with:Smalltalk. |
4692 |
aCollectionOfClasses do:[:eachClass | |
|
4693 |
nameSpacesForGlobals add:eachClass topNameSpace |
|
4694 |
]. |
|
4695 |
||
10546
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4696 |
"/ extract globals used by the pattern |
9879 | 4697 |
globalVariablesUsed := OrderedCollection new. |
4698 |
searchTree referencedVariables do:[:node | |
|
4699 |
|nm ns alternatives| |
|
4700 |
||
4701 |
node isPatternNode ifFalse:[ |
|
4702 |
nm := node name. |
|
4703 |
ns := nameSpacesForGlobals detect:[:ns | ns includesKey: nm asSymbol] ifNone:nil. |
|
4704 |
ns notNil ifTrue:[ |
|
4705 |
alternatives := OrderedCollection new. |
|
4706 |
nm asSymbolIfInterned notNil ifTrue:[ alternatives add: nm asSymbol ]. |
|
4707 |
('Smalltalk::',nm) asSymbolIfInterned notNil ifTrue:[ alternatives add: ('Smalltalk::',nm) asSymbol ]. |
|
4708 |
(ns name,'::',nm) asSymbolIfInterned notNil ifTrue:[ alternatives add: (ns name,'::',nm) asSymbol ]. |
|
4709 |
nm asSymbolIfInterned notNil ifTrue:[ alternatives add: nm asSymbol ]. |
|
4710 |
globalVariablesUsed add:alternatives |
|
4711 |
]. |
|
4712 |
] |
|
4713 |
]. |
|
5135 | 4714 |
|
10546
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4715 |
"/ sorry: |
174df6f8a170
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
10416
diff
changeset
|
4716 |
"/ cannot use literals to speedup the search, because stc does not store |
12056 | 4717 |
"/ constants in the literal-array. However, we can do a string search on |
4718 |
"/ them, to avoid parsing. |
|
4719 |
usedSymbols := searchTree usedSymbols. |
|
4720 |
usedStrings := searchTree usedLiterals select:[:lit | lit isString]. |
|
7395 | 4721 |
|
5094 | 4722 |
searcher := ParseTreeSearcher new. |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4723 |
isMethod ifTrue:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4724 |
searcher |
8281
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4725 |
matchesMethod:aCodeString |
5256
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4726 |
do:[:aNode :answer | foundMatch := true]. |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4727 |
] ifFalse:[ |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4728 |
searcher |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4729 |
matchesTree:searchTree |
c37bc91f2460
better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents:
5254
diff
changeset
|
4730 |
do:[:aNode :answer | foundMatch := true]. |
6303 | 4731 |
]. |
5094 | 4732 |
|
6581 | 4733 |
searchBlock := [:c :m :sel | |
12056 | 4734 |
|isSTCCompiled allSelectorsInLiteralArray allMessagesSent |
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4735 |
allGlobalsReferenced allUsedSymbolsInLiteralArray allStringsInLiteralArray |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4736 |
allSent src rslt parseTree |
9544
0947c3513df7
changed: #searchBlockForCode:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9483
diff
changeset
|
4737 |
literalsInMethod| |
6581 | 4738 |
|
4739 |
foundMatch := false. |
|
4740 |
||
8281
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4741 |
"/ can speedup the search, by filtering for number of message-args first... |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4742 |
(isMethod not |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4743 |
or:[ numMethodArgs isNil |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4744 |
or:[ numMethodArgs == m numArgs ]]) ifTrue:[ |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4745 |
m isLazyMethod ifTrue:[ |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4746 |
src := m source. |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4747 |
src notNil ifTrue:[ |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4748 |
m makeRealMethod. |
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4749 |
]. |
5135 | 4750 |
]. |
12056 | 4751 |
"/ can speedup the search, by filtering for sent messages... |
9544
0947c3513df7
changed: #searchBlockForCode:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9483
diff
changeset
|
4752 |
literalsInMethod := m literals. |
0947c3513df7
changed: #searchBlockForCode:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9483
diff
changeset
|
4753 |
allSelectorsInLiteralArray := sentMessages isEmptyOrNil or:[ literalsInMethod includesAll:sentMessages ]. |
8281
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4754 |
allSelectorsInLiteralArray ifTrue:[ |
12056 | 4755 |
"/ and used symbols/globals first... |
9544
0947c3513df7
changed: #searchBlockForCode:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9483
diff
changeset
|
4756 |
allUsedSymbolsInLiteralArray := usedSymbols isEmptyOrNil or:[ literalsInMethod includesAll:usedSymbols ]. |
8281
67f0cd20adf0
method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents:
8158
diff
changeset
|
4757 |
allUsedSymbolsInLiteralArray ifTrue:[ |
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4758 |
"/ not true, but I am lazy: if ANY string is in match, ANY string must be in method |
12056 | 4759 |
"/ that does not work for stc compiled code, because it does not put strings into the literal array |
4760 |
isSTCCompiled := m byteCode isNil. |
|
4761 |
isSTCCompiled ifTrue:[ |
|
4762 |
allStringsInLiteralArray := true. "/ stc-compiled: don't know |
|
4763 |
] ifFalse:[ |
|
4764 |
allStringsInLiteralArray := usedStrings isEmptyOrNil |
|
4765 |
or:[ literalsInMethod includesAll:usedStrings "literalsInMethod contains:[:lit | lit isString]" ]. |
|
4766 |
]. |
|
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4767 |
allStringsInLiteralArray ifTrue:[ |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4768 |
allGlobalsReferenced := globalVariablesUsed conform:[:varNames | varNames contains:[:varName | m referencesGlobal:varName]]. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4769 |
allGlobalsReferenced ifTrue:[ |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4770 |
allMessagesSent := sentMessages isEmptyOrNil or:[ m messages includesAll:sentMessages ]. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4771 |
allMessagesSent ifTrue:[ |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4772 |
allSent := sentMessages conform:[:sel | (m sends:sel)]. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4773 |
allSent ifTrue:[ |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4774 |
src := m source. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4775 |
src isNil ifTrue:[ |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4776 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4777 |
] ifFalse:[ |
12056 | 4778 |
isSTCCompiled ifTrue:[ |
4779 |
usedStrings notEmptyOrNil ifTrue:[ |
|
4780 |
"/ now that we have the source, scan the source for the literal strings, |
|
4781 |
"/ before doing a slow parse |
|
4782 |
allStringsInLiteralArray := usedStrings conform:[:eachString | src includesString:eachString]. |
|
4783 |
] |
|
4784 |
]. |
|
4785 |
allStringsInLiteralArray ifTrue:[ |
|
4786 |
"/ the rest is done by the slower RB-match process... |
|
4787 |
parseTree := RBParser |
|
4788 |
parseSearchMethod:src |
|
4789 |
onError: [:str :pos | |
|
4790 |
"/ self halt. |
|
4791 |
Transcript show:'Error during search in '; showCR:m. |
|
4792 |
Transcript showCR:str. |
|
4793 |
Transcript showCR:pos. |
|
4794 |
nil]. |
|
4795 |
||
4796 |
parseTree notNil ifTrue:[ |
|
4797 |
searcher executeTree:parseTree. |
|
4798 |
"/ notice: searcher sets foundMatch !! |
|
4799 |
]. |
|
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4800 |
]. |
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4801 |
] |
6552
343882b29fec
code search bug - leftover foundMatch flag (must be cleared)
Claus Gittinger <cg@exept.de>
parents:
6549
diff
changeset
|
4802 |
] |
6368 | 4803 |
] |
4804 |
] |
|
5251
847d633792ce
tuned code search if global vars are involved
Claus Gittinger <cg@exept.de>
parents:
5243
diff
changeset
|
4805 |
] |
5135 | 4806 |
] |
6581 | 4807 |
] |
4808 |
]. |
|
4809 |
foundMatch. |
|
4810 |
]. |
|
5094 | 4811 |
^ searchBlock. |
7395 | 4812 |
|
9879 | 4813 |
"Created: / 02-05-2011 / 13:25:01 / sr" |
11638
344d7d06f1d2
changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents:
11506
diff
changeset
|
4814 |
"Modified: / 20-07-2012 / 19:07:36 / cg" |
9879 | 4815 |
! |
4816 |
||
4817 |
searchBlockForCode:aCodeString isMethod:isMethod |
|
4818 |
"return a block to search for a piece of code (intelligent search)." |
|
4819 |
||
4820 |
^ self searchBlockForCode:aCodeString in:#() isMethod:isMethod |
|
4821 |
||
4822 |
"Modified: / 02-05-2011 / 13:26:18 / sr" |
|
5094 | 4823 |
! |
4824 |
||
9482 | 4825 |
searchBlockForParseTreeSearcher:searcher isMethod:isMethod |
4826 |
"return a block to search for a piece of code (intelligent search)." |
|
4827 |
||
4828 |
|errAction searchBlock foundMatch| |
|
4829 |
||
4830 |
errAction := [:str :pos | |
|
4831 |
Dialog warn:'Error during parse: ' , str , ' (position ' , pos printString , ')'. |
|
4832 |
^ nil |
|
4833 |
]. |
|
4834 |
||
4835 |
searchBlock := [:c :m :sel | |
|
9483
eead021c9729
changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9482
diff
changeset
|
4836 |
|src parseTree| |
9482 | 4837 |
|
4838 |
foundMatch := false. |
|
4839 |
||
4840 |
m isLazyMethod ifTrue:[ |
|
4841 |
src := m source. |
|
4842 |
src notNil ifTrue:[ |
|
4843 |
m makeRealMethod. |
|
4844 |
]. |
|
4845 |
]. |
|
4846 |
||
4847 |
src := m source. |
|
4848 |
src isNil ifTrue:[ |
|
4849 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
|
4850 |
false |
|
4851 |
] ifFalse:[ |
|
4852 |
parseTree := RBParser |
|
4853 |
parseSearchMethod:src |
|
4854 |
onError: [:str :pos | |
|
4855 |
Transcript show:'Error in '; showCR:m. |
|
4856 |
Transcript showCR:str. |
|
4857 |
Transcript showCR:pos. |
|
4858 |
nil]. |
|
4859 |
||
4860 |
parseTree notNil ifTrue:[ |
|
9483
eead021c9729
changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9482
diff
changeset
|
4861 |
foundMatch := searcher executeTree:parseTree initialAnswer:false. |
9482 | 4862 |
] |
4863 |
]. |
|
4864 |
foundMatch. |
|
4865 |
]. |
|
4866 |
||
4867 |
^ searchBlock. |
|
4868 |
||
4869 |
"Created: / 11-05-2010 / 16:14:25 / cg" |
|
9483
eead021c9729
changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents:
9482
diff
changeset
|
4870 |
"Modified: / 11-05-2010 / 22:05:09 / cg" |
9482 | 4871 |
! |
4872 |
||
9002 | 4873 |
searchBlockForReferendsOf:aGlobalName |
4874 |
"return a block which searches for all methods which reference a global named aGlobalName, |
|
4875 |
which may be a matchpattern" |
|
4876 |
||
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4877 |
|globalsPlainName idx matchingGlobalNames sym1 sym2| |
9002 | 4878 |
|
4879 |
globalsPlainName := aGlobalName. |
|
4880 |
(idx := globalsPlainName lastIndexOf:$:) ~~ 0 ifTrue:[ |
|
4881 |
globalsPlainName := globalsPlainName copyFrom:idx+1. |
|
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4882 |
(globalsPlainName size == 0 or:[globalsPlainName = '*']) ifTrue:[ |
9002 | 4883 |
globalsPlainName := aGlobalName |
4884 |
] |
|
4885 |
]. |
|
4886 |
||
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4887 |
"/ matchingGlobalNames := OrderedCollection new. |
9002 | 4888 |
|
4889 |
aGlobalName includesMatchCharacters ifFalse:[ |
|
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4890 |
sym1 := aGlobalName asSymbolIfInterned. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4891 |
sym2 := globalsPlainName asSymbolIfInterned. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4892 |
(sym1 isNil and:[ sym2 isNil ]) ifTrue:[ |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4893 |
^ [:cls :mthd :sel | false ]. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4894 |
]. |
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4895 |
"/ if any is nil, search for the same |
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4896 |
sym1 := sym1 ? sym2. |
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4897 |
sym2 := sym2 ? sym1. |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4898 |
|
9002 | 4899 |
^ [:cls :mthd :sel | |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4900 |
|mSource ok m usedGlobals| |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4901 |
|
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4902 |
ok := false. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4903 |
"/ kludge: Lazy methods do not include symbols in the literal array - sigh |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4904 |
mthd isLazyMethod ifTrue:[ |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4905 |
mSource := mthd source. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4906 |
(mSource notNil) ifTrue:[ |
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4907 |
(mSource includesString:(sym2)) ifTrue:[ |
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4908 |
usedGlobals := mthd usedGlobals. |
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4909 |
(usedGlobals includes:sym1) ifTrue:[ |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4910 |
ok := true |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4911 |
] ifFalse:[ |
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4912 |
(sym1 ~= sym2 and:[usedGlobals includes:sym2]) ifTrue:[ |
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4913 |
ok := true |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4914 |
] |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4915 |
] |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4916 |
] |
9002 | 4917 |
] |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4918 |
] ifFalse:[ |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4919 |
(m := mthd) isWrapped ifTrue:[ |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4920 |
m := m originalMethod. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4921 |
]. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4922 |
|
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4923 |
((m refersToLiteral:sym1) or:[ sym1 ~= sym2 and:[m refersToLiteral:sym2] ]) ifTrue:[ |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4924 |
usedGlobals := m usedGlobals. |
11964
8670bf08f225
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
11941
diff
changeset
|
4925 |
ok := (usedGlobals includes:sym1) or:[ sym1 ~= sym2 and:[usedGlobals includes:sym2] ] |
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4926 |
]. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4927 |
]. |
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4928 |
ok |
9002 | 4929 |
]. |
4930 |
]. |
|
4931 |
||
4932 |
^ [:cls :mthd :sel | |
|
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4933 |
|mSource usedGlobals global m| |
9002 | 4934 |
|
4935 |
"/ kludge: Lazy methods do not include symbols in the literal array - sigh |
|
4936 |
mthd isLazyMethod ifTrue:[ |
|
4937 |
mSource := mthd source. |
|
4938 |
mSource notNil ifTrue:[ |
|
4939 |
usedGlobals := mthd usedGlobals |
|
4940 |
] |
|
4941 |
] ifFalse:[ |
|
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4942 |
(m := mthd) isWrapped ifTrue:[ |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4943 |
m := m originalMethod. |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4944 |
]. |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4945 |
(m literals contains:[:lit | (aGlobalName match:lit) or:[globalsPlainName match:lit]]) ifTrue:[ |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4946 |
usedGlobals := m usedGlobals |
9002 | 4947 |
]. |
4948 |
]. |
|
4949 |
usedGlobals notNil ifTrue:[ |
|
4950 |
global := usedGlobals detect:[:lit | aGlobalName match:lit] ifNone:nil. |
|
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4951 |
global isNil ifTrue:[ |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4952 |
global := usedGlobals detect:[:lit | globalsPlainName match:lit] ifNone:nil. |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4953 |
]. |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4954 |
"/ global notNil ifTrue:[ |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4955 |
"/ matchingGlobalNames add:global. |
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4956 |
"/ ] |
9002 | 4957 |
]. |
4958 |
global notNil |
|
4959 |
]. |
|
9660
e8b452501452
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
9578
diff
changeset
|
4960 |
|
10386
105f6c60ce2d
changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents:
10346
diff
changeset
|
4961 |
"Modified: / 24-07-2011 / 09:50:30 / cg" |
9002 | 4962 |
! |
4963 |
||
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4964 |
searchBlockForString:aString ignoreCase:ignoreCase match:doMatch |
5094 | 4965 |
"return a block to search for a string." |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4966 |
|
8129 | 4967 |
|searchBlock s| |
5891 | 4968 |
|
4969 |
(doMatch and:[ aString includesMatchCharacters ]) ifTrue:[ |
|
2675 | 4970 |
s := '*' , aString , '*'. |
4971 |
"a matchString" |
|
4972 |
searchBlock := [:c :m :sel | |
|
4973 |
|src| |
|
4974 |
src := m source. |
|
4975 |
src isNil ifTrue:[ |
|
4976 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
|
4977 |
false |
|
4978 |
] ifFalse:[ |
|
4979 |
s match:src ignoreCase:ignoreCase |
|
4980 |
] |
|
4981 |
] |
|
4982 |
] ifFalse:[ |
|
8129 | 4983 |
searchBlock := |
4984 |
[:c :m :sel | |
|
4985 |
|src| |
|
4986 |
||
4987 |
src := m source. |
|
4988 |
src isNil ifTrue:[ |
|
4989 |
('Browser [info]: no source for ' , m printString) infoPrintCR. |
|
4990 |
false |
|
4991 |
] ifFalse:[ |
|
4992 |
(src findString:aString ignoreCase:ignoreCase) ~~ 0 |
|
4993 |
] |
|
5891 | 4994 |
] |
2675 | 4995 |
]. |
4235
bba308f409dd
images & another special case startup
Claus Gittinger <cg@exept.de>
parents:
4222
diff
changeset
|
4996 |
^ searchBlock. |
2675 | 4997 |
|
4998 |
" |
|
4999 |
SystemBrowser findString:'should' in:(Array with:Object) ignoreCase:false |
|
5000 |
" |
|
4152
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
5001 |
! |
92e3975f1904
allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents:
4150
diff
changeset
|
5002 |
|
5877 | 5003 |
searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatch |
5004 |
"return a block to search for a string-literal." |
|
5005 |
||
5006 |
|searchBlock s| |
|
5007 |
||
5891 | 5008 |
(doMatch and:[ aString includesMatchCharacters]) ifTrue:[ |
5877 | 5009 |
s := '*' , aString , '*'. |
5010 |
"a matchString" |
|
5011 |
searchBlock := [:c :m :sel | |
|
5012 |
|lits| |
|
5013 |
lits := m literals ? #(). |
|
5014 |
lits contains:[:lit | |
|
5015 |
lit isString |
|
5016 |
and:[lit isSymbol not |
|
5017 |
and:[s match:lit ignoreCase:ignoreCase]] |
|
5018 |
] |
|
5019 |
] |
|
5020 |
] ifFalse:[ |
|
5891 | 5021 |
ignoreCase ifTrue:[ |
5022 |
s := aString asLowercase. |
|
5023 |
searchBlock := [:c :m :sel | |
|
5024 |
|lits| |
|
5025 |
lits := m literals ? #(). |
|
5026 |
lits contains:[:lit | |
|
5027 |
lit isString |
|
5028 |
and:[lit isSymbol not |
|
5029 |
and:[s = lit asLowercase]] |
|
5030 |
] |
|
5031 |
] |
|
5032 |
] ifFalse:[ |
|
5033 |
searchBlock := [:c :m :sel | |
|
5034 |
|lits| |
|
5035 |
lits := m literals ? #(). |
|
5036 |
lits contains:[:lit | |
|
5037 |
lit isString |
|
5038 |
and:[lit isSymbol not |
|
5039 |
and:[s = lit]] |
|
5040 |
] |
|
5041 |
] |
|
5042 |
]. |
|
5877 | 5043 |
]. |
5044 |
^ searchBlock. |
|
5045 |
||
5046 |
" |
|
5047 |
SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:true |
|
5048 |
SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false |
|
5049 |
SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:true |
|
5050 |
SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:false |
|
5051 |
" |
|
11452 | 5052 |
! |
5053 |
||
5054 |
searchBlockForSymbol:aSymbol |
|
5055 |
"return a matchblock to search for all methods referencing aSymbol" |
|
5056 |
||
5057 |
(aSymbol includesMatchCharacters) ifTrue:[ |
|
5058 |
"a matchString" |
|
5059 |
^ [:c :m :s | |
|
5060 |
(m literalsDetect:[:aLiteral| |
|
5061 |
(aLiteral isMemberOf:Symbol) |
|
5062 |
and:[aSymbol match:aLiteral] |
|
5063 |
] |
|
5064 |
ifNone:nil |
|
5065 |
) notNil |
|
5066 |
]. |
|
5067 |
] ifFalse:[ |
|
5068 |
^ [:c :m :s | |
|
5069 |
(m literalsDetect:[:aLiteral| |
|
5070 |
(aSymbol == aLiteral) |
|
5071 |
] |
|
5072 |
ifNone:nil |
|
5073 |
) notNil |
|
5074 |
]. |
|
5075 |
]. |
|
5076 |
||
5077 |
"Created: / 22-03-2012 / 06:56:51 / cg" |
|
203 | 5078 |
! ! |
5079 |
||
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5080 |
!SystemBrowser class methodsFor:'startup'! |
36 | 5081 |
|
203 | 5082 |
browseAllSelect:aBlock |
5083 |
"launch a browser for all methods where aBlock returns true. |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5084 |
The block is called with 3 arguments, class, method and selector." |
203 | 5085 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5086 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5087 |
browseMethodsWhere:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5088 |
title:'selected messages' |
36 | 5089 |
|
53 | 5090 |
" |
203 | 5091 |
SystemBrowser browseAllSelect:[:aClass :aMethod :selector | selector numArgs == 3] |
53 | 5092 |
" |
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5093 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5094 |
"Modified: 24.1.1997 / 19:45:05 / cg" |
203 | 5095 |
! |
75 | 5096 |
|
203 | 5097 |
browseClass:aClass |
4490 | 5098 |
"launch a browser for aClass. |
5099 |
Notice: better go via Smalltalk browseClass:, which honors the tool-preferences" |
|
203 | 5100 |
|
5101 |
^ self |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5102 |
newWithLabel:aClass name |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5103 |
setupSelector:#setupForClass: |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5104 |
arg:aClass |
203 | 5105 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5106 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5107 |
SystemBrowser browseClass:Object |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5108 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5109 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5110 |
"Modified: 24.1.1997 / 19:45:16 / cg" |
203 | 5111 |
! |
5112 |
||
5113 |
browseClass:aClass methodCategory:aCategory |
|
5114 |
"launch a browser for all methods under aCategory in aClass" |
|
5115 |
||
5116 |
^ self newWithLabel:(aClass name , ' ' , aCategory) |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5117 |
setupBlock:[:browser | browser setupForClass:aClass methodCategory:aCategory] |
203 | 5118 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5119 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5120 |
SystemBrowser browseClass:String methodCategory:'copying' |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5121 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5122 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5123 |
"Modified: 24.1.1997 / 19:45:23 / cg" |
203 | 5124 |
! |
5125 |
||
5126 |
browseClass:aClass selector:selector |
|
4490 | 5127 |
"launch a browser for the method at selector in aClass." |
203 | 5128 |
|
5129 |
^ self |
|
4158 | 5130 |
newWithLabel:(aClass name , ' ' , selector , ' ' , selector) |
5131 |
setupBlock:[:newBrowser | newBrowser setupForClass:aClass selector:selector] |
|
203 | 5132 |
|
5133 |
" |
|
5134 |
SystemBrowser browseClass:Object selector:#printString |
|
5135 |
" |
|
36 | 5136 |
! |
5137 |
||
203 | 5138 |
browseClassCategory:aClassCategory |
5139 |
"launch a browser for all classes under aCategory" |
|
5140 |
||
5141 |
^ self |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5142 |
newWithLabel:aClassCategory |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5143 |
setupSelector:#setupForClassCategory: |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5144 |
arg:aClassCategory |
203 | 5145 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5146 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5147 |
SystemBrowser browseClassCategory:'Kernel-Objects' |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5148 |
" |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5149 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5150 |
"Modified: 24.1.1997 / 19:45:32 / cg" |
203 | 5151 |
! |
5152 |
||
5153 |
browseClassHierarchy:aClass |
|
5154 |
"launch a browser for aClass and all its superclasses. |
|
5155 |
this is different from the fullProtocol browser." |
|
36 | 5156 |
|
203 | 5157 |
^ self |
4158 | 5158 |
newWithLabel:(aClass name , '-' , 'hierarchy') |
5159 |
setupSelector:#setupForClassHierarchy: |
|
5160 |
arg:aClass |
|
203 | 5161 |
|
5162 |
" |
|
5163 |
SystemBrowser browseClassHierarchy:Number |
|
5164 |
" |
|
5165 |
! |
|
5166 |
||
8702 | 5167 |
browseClasses:aList label:title |
203 | 5168 |
"launch a browser for all classes in aList" |
5169 |
||
5170 |
^ self |
|
576
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5171 |
newWithLabel:title |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5172 |
setupBlock:[:b | b setupForClassList:aList sort:true] |
203 | 5173 |
|
5174 |
" |
|
5175 |
SystemBrowser browseClasses:(Array with:Object |
|
576
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5176 |
with:Float) |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5177 |
title:'two classes' |
203 | 5178 |
" |
576
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5179 |
|
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5180 |
"Modified: 28.5.1996 / 13:52:25 / cg" |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5181 |
! |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5182 |
|
8702 | 5183 |
browseClasses:aList label:title sort:doSort |
576
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5184 |
"launch a browser for all classes in aList" |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5185 |
|
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5186 |
^ self |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5187 |
newWithLabel:title |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5188 |
setupBlock:[:b | b setupForClassList:aList sort:doSort] |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5189 |
|
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5190 |
" |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5191 |
SystemBrowser browseClasses:(Array with:Object |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5192 |
with:Float) |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5193 |
title:'two classes' |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5194 |
" |
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5195 |
|
62dc6c67d71c
show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents:
573
diff
changeset
|
5196 |
"Created: 28.5.1996 / 13:52:09 / cg" |
52 | 5197 |
! |
5198 |
||
8702 | 5199 |
browseClasses:aList title:title |
5200 |
<resource: #obsolete> |
|
5201 |
"launch a browser for all classes in aList" |
|
5202 |
||
5203 |
self obsoleteMethodWarning. |
|
5204 |
^ self browseClasses:aList label:title |
|
5205 |
! |
|
5206 |
||
5207 |
browseClasses:aList title:title sort:doSort |
|
5208 |
<resource: #obsolete> |
|
5209 |
"launch a browser for all classes in aList" |
|
5210 |
||
5211 |
self obsoleteMethodWarning. |
|
5212 |
^ self browseClasses:aList label:title sort:doSort |
|
5213 |
||
5214 |
"Created: 28.5.1996 / 13:52:09 / cg" |
|
5215 |
! |
|
5216 |
||
203 | 5217 |
browseFullClassProtocol:aClass |
5218 |
"launch a browser for aClasses full protocol. |
|
5219 |
This is different from hierarchy browsing." |
|
5220 |
||
5221 |
^ self |
|
4158 | 5222 |
newWithLabel:(aClass name , '-' , 'full protocol') |
5223 |
setupSelector:#setupForFullClassProtocol: |
|
5224 |
arg:aClass |
|
203 | 5225 |
|
5226 |
" |
|
5227 |
SystemBrowser browseFullClassProtocol:Number |
|
5228 |
" |
|
5229 |
! |
|
36 | 5230 |
|
203 | 5231 |
browseFullClasses |
5232 |
"launch a browser showing all methods at once" |
|
5233 |
||
5234 |
^ self |
|
4158 | 5235 |
newWithLabel:'Full Class Browser' |
5236 |
setupBlock:[:newBrowser | newBrowser setupForFullClass] |
|
36 | 5237 |
|
203 | 5238 |
"SystemBrowser browseFullClasses" |
5239 |
! |
|
5240 |
||
5241 |
browseInstMethodsFrom:aClass where:aBlock title:title |
|
5242 |
"launch a browser for all instance methods in aClass and all subclasses |
|
5243 |
where aBlock evaluates to true" |
|
36 | 5244 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5245 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5246 |
browseMethodsIn:(aClass withAllSubclasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5247 |
inst:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5248 |
class:false |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5249 |
where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5250 |
title:title |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5251 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5252 |
"Modified: 24.1.1997 / 19:44:45 / cg" |
203 | 5253 |
! |
5254 |
||
5255 |
browseInstMethodsIn:aCollectionOfClasses where:aBlock title:title |
|
5256 |
"launch a browser for all instance methods of all classes in |
|
5257 |
aCollectionOfClasses where aBlock evaluates to true" |
|
5258 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5259 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5260 |
browseMethodsIn:aCollectionOfClasses |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5261 |
inst:true class:false |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5262 |
where:aBlock title:title |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5263 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5264 |
"Modified: 24.1.1997 / 19:43:41 / cg" |
203 | 5265 |
! |
36 | 5266 |
|
203 | 5267 |
browseInstMethodsOf:aClass where:aBlock title:title |
5268 |
"launch a browser for all instance methods in aClass |
|
5269 |
where aBlock evaluates to true" |
|
5270 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5271 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5272 |
browseMethodsIn:(Array with:aClass) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5273 |
inst:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5274 |
class:false |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5275 |
where:aBlock title:title |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5276 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5277 |
"Modified: 24.1.1997 / 19:43:50 / cg" |
203 | 5278 |
! |
5279 |
||
5280 |
browseMethodCategory:aCategory |
|
5281 |
"launch a browser for all methods where category = aCategory" |
|
5282 |
||
5283 |
|searchBlock| |
|
5284 |
||
5285 |
aCategory includesMatchCharacters ifTrue:[ |
|
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5286 |
searchBlock := [:c :m :s | aCategory match:m category]. |
53 | 5287 |
] ifFalse:[ |
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5288 |
searchBlock := [:c :m :s | m category = aCategory] |
53 | 5289 |
]. |
5290 |
||
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5291 |
^ self browseMethodsWhere:searchBlock title:('all methods with category of ' , aCategory) |
203 | 5292 |
|
5293 |
" |
|
5294 |
SystemBrowser browseMethodCategory:'printing & storing' |
|
5295 |
SystemBrowser browseMethodCategory:'print*' |
|
5296 |
" |
|
5297 |
! |
|
5298 |
||
3666 | 5299 |
browseMethods:aListOfMethods |
5300 |
"launch a multi-method browser." |
|
5301 |
||
5302 |
^ self browseMethods:aListOfMethods title:'some methods' |
|
5303 |
||
5304 |
" |
|
5305 |
self |
|
5306 |
browseMethods:(Array with:(Array compiledMethodAt:#at:) |
|
5307 |
with:(OrderedCollection compiledMethodAt:#at:)) |
|
5308 |
||
5309 |
self |
|
5310 |
browseMethods:(Array with:(Array compiledMethodAt:#at:) |
|
5311 |
with:(Array compiledMethodAt:#at:put:)) |
|
5312 |
" |
|
5313 |
! |
|
5314 |
||
203 | 5315 |
browseMethods:aList title:aString |
5316 |
"launch a browser for an explicit list of class/selectors. |
|
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5317 |
Each entry in the list can be either a method, or a string |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5318 |
consisting of the classes name and the selector, separated by spaces. |
634
24a678f81829
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
620
diff
changeset
|
5319 |
For class methods, the string ' class' must be appended to the classname." |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5320 |
|
1919
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5321 |
^ self |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5322 |
browseMethods:aList |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5323 |
title:aString |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5324 |
sort:true |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5325 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5326 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5327 |
" |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5328 |
SystemBrowser |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5329 |
browseMethods:#('Object printOn:' 'Collection add:') |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5330 |
title:'some methods' |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5331 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5332 |
SystemBrowser |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5333 |
browseMethods:#('Behavior new:' 'Setclass new:') |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5334 |
title:'some new: methods' |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5335 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5336 |
SystemBrowser |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5337 |
browseMethods:(Array with:(Object compiledMethodAt:#printOn:) |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5338 |
with:(Collection compiledMethodAt:#add:) |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5339 |
with:(Object class compiledMethodAt:#initialize)) |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5340 |
title:'some methods' |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5341 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5342 |
" |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5343 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5344 |
"Modified: 1.11.1996 / 16:30:17 / cg" |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5345 |
! |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5346 |
|
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5347 |
browseMethods:aList title:aString sort:doSort |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5348 |
"launch a browser for an explicit list of class/selectors. |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5349 |
Each entry in the list can be either a method, or a string |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5350 |
consisting of the classes name and the selector, separated by spaces. |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5351 |
For class methods, the string ' class' must be appended to the classname." |
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5352 |
|
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5353 |
|l| |
203 | 5354 |
|
5355 |
(aList size == 0) ifTrue:[ |
|
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5356 |
self showNoneFound:aString. |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5357 |
^ nil |
203 | 5358 |
]. |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5359 |
l := aList asOrderedCollection. |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5360 |
l := l collect:[:entry | |
1937
fc541342f2db
more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
5361 |
|who cls clsName| |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5362 |
|
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5363 |
entry isString ifTrue:[ |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5364 |
entry |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5365 |
] ifFalse:[ |
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5366 |
cls := entry mclass. |
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5367 |
cls isNil ifTrue:[ |
1031 | 5368 |
'??? unbound' |
5369 |
] ifFalse:[ |
|
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5370 |
cls isJavaClass ifTrue:[ |
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5371 |
clsName := 'JAVA::' , cls fullName |
1937
fc541342f2db
more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
5372 |
] ifFalse:[ |
2822
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5373 |
clsName := cls name |
8127e7726fdd
changes for environment browsing
Claus Gittinger <cg@exept.de>
parents:
2818
diff
changeset
|
5374 |
]. |
7915 | 5375 |
(cls selectorAtMethod:entry) isNil ifTrue:[ |
5376 |
clsName |
|
5377 |
, ' ' |
|
5378 |
, '???' |
|
5379 |
] ifFalse:[ |
|
5380 |
clsName |
|
5381 |
, ' ' |
|
5382 |
, (entry printStringForBrowserWithSelector:(cls selectorAtMethod:entry) inClass:cls) |
|
5383 |
] |
|
1031 | 5384 |
] |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5385 |
] |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5386 |
]. |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5387 |
|
1919
0652e55065f9
added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
5388 |
doSort ifTrue:[l sort]. |
1937
fc541342f2db
more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
5389 |
|
203 | 5390 |
^ self |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5391 |
newWithLabel:aString |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5392 |
setupSelector:#setupForList: |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5393 |
arg:l |
53 | 5394 |
|
203 | 5395 |
" |
5396 |
SystemBrowser |
|
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5397 |
browseMethods:#('Object printOn:' 'Collection add:') |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5398 |
title:'some methods' |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5399 |
|
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5400 |
SystemBrowser |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5401 |
browseMethods:#('Behavior new:' 'Setclass new:') |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5402 |
title:'some new: methods' |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5403 |
|
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5404 |
SystemBrowser |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5405 |
browseMethods:(Array with:(Object compiledMethodAt:#printOn:) |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5406 |
with:(Collection compiledMethodAt:#add:) |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5407 |
with:(Object class compiledMethodAt:#initialize)) |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5408 |
title:'some methods' |
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5409 |
|
203 | 5410 |
" |
279
062022b53f22
allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
5411 |
|
7711 | 5412 |
"Modified: / 17-06-1996 / 17:07:46 / stefan" |
5413 |
"Modified: / 05-03-2007 / 16:25:25 / cg" |
|
2826 | 5414 |
! |
53 | 5415 |
|
203 | 5416 |
browseMethodsFrom:aClass where:aBlock title:title |
5417 |
"launch a browser for all instance- and classmethods in aClass |
|
5418 |
and all its subclasses where aBlock evaluates to true. |
|
5419 |
The block is called with 3 arguments, class, method and seelctor." |
|
5420 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5421 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5422 |
browseMethodsIn:(aClass withAllSubclasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5423 |
where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5424 |
title:title |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5425 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5426 |
"Modified: 24.1.1997 / 19:44:00 / cg" |
203 | 5427 |
! |
5428 |
||
5429 |
browseMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock title:title |
|
5430 |
"launch a browser for all instance- (if wantInst is true) and/or |
|
5431 |
classmethods (if wantClass is true) from classes in aCollectionOfClasses, |
|
5432 |
where aBlock evaluates to true. |
|
270 | 5433 |
The block is called with 3 arguments, class, method and selector." |
203 | 5434 |
|
5435 |
|list| |
|
53 | 5436 |
|
5437 |
" |
|
203 | 5438 |
since this may take a long time, lower my priority ... |
53 | 5439 |
" |
2295
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
5440 |
Processor activeProcess |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
5441 |
withPriority:Processor activePriority-1 to:Processor activePriority |
4e05198e7dd8
execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents:
2208
diff
changeset
|
5442 |
do:[ |
2675 | 5443 |
list := self findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock |
203 | 5444 |
]. |
5445 |
^ self browseMethods:list title:title |
|
53 | 5446 |
! |
5447 |
||
3780 | 5448 |
browseMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock title:title ifNone:warnBlock |
5449 |
"launch a browser for all instance- (if wantInst is true) and/or |
|
5450 |
classmethods (if wantClass is true) from classes in aCollectionOfClasses, |
|
5451 |
where aBlock evaluates to true. |
|
5452 |
The block is called with 3 arguments, class, method and selector." |
|
5453 |
||
5454 |
|list| |
|
5455 |
||
5456 |
" |
|
5457 |
since this may take a long time, lower my priority ... |
|
5458 |
" |
|
5459 |
Processor activeProcess |
|
5460 |
withPriority:Processor activePriority-1 to:Processor activePriority |
|
5461 |
do:[ |
|
5462 |
list := self findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock. |
|
5463 |
list size == 0 ifTrue:[warnBlock value]. |
|
5464 |
]. |
|
5465 |
^ self browseMethods:list title:title |
|
5466 |
! |
|
5467 |
||
203 | 5468 |
browseMethodsIn:aCollectionOfClasses where:aBlock title:title |
5469 |
"launch a browser for all instance- and classmethods from |
|
5470 |
all classes in aCollectionOfClasses where aBlock evaluates to true. |
|
5471 |
The block is called with 3 arguments, class, method and seelctor." |
|
53 | 5472 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5473 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5474 |
browseMethodsIn:aCollectionOfClasses |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5475 |
inst:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5476 |
class:true |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5477 |
where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5478 |
title:title |
75 | 5479 |
|
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5480 |
"Modified: 24.1.1997 / 19:44:17 / cg" |
36 | 5481 |
! |
5482 |
||
3780 | 5483 |
browseMethodsIn:aCollectionOfClasses where:aBlock title:title ifNone:warnBlock |
5484 |
"launch a browser for all instance- and classmethods from |
|
5485 |
all classes in aCollectionOfClasses where aBlock evaluates to true. |
|
5486 |
The block is called with 3 arguments, class, method and seelctor." |
|
5487 |
||
5488 |
^ self |
|
5489 |
browseMethodsIn:aCollectionOfClasses |
|
5490 |
inst:true |
|
5491 |
class:true |
|
5492 |
where:aBlock |
|
5493 |
title:title |
|
5494 |
ifNone:warnBlock |
|
5495 |
||
5496 |
"Modified: 24.1.1997 / 19:44:17 / cg" |
|
5497 |
! |
|
5498 |
||
203 | 5499 |
browseMethodsOf:aClass where:aBlock title:title |
5500 |
"launch a browser for all instance- and classmethods in aClass |
|
5501 |
where aBlock evaluates to true. |
|
5502 |
The block is called with 3 arguments, class, method and seelctor." |
|
93 | 5503 |
|
203 | 5504 |
^ self browseMethodsIn:(Array with:aClass) where:aBlock title:title |
93 | 5505 |
! |
5506 |
||
203 | 5507 |
browseMethodsWhere:aBlock title:title |
5508 |
"launch a browser for all methods where aBlock returns true. |
|
5509 |
The block is called with 3 arguments, class, method and seelctor." |
|
5510 |
||
996
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5511 |
^ self |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5512 |
browseMethodsIn:(Smalltalk allClasses) |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5513 |
where:aBlock |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5514 |
title:title |
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5515 |
|
ed470d0b6029
more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
5516 |
"Modified: 24.1.1997 / 19:44:30 / cg" |
2675 | 5517 |
! |
5518 |
||
3780 | 5519 |
browseMethodsWhere:aBlock title:title ifNone:warnBlock |
5520 |
"launch a browser for all methods where aBlock returns true. |
|
5521 |
The block is called with 3 arguments, class, method and seelctor." |
|
5522 |
||
5523 |
^ self |
|
5524 |
browseMethodsIn:(Smalltalk allClasses) |
|
5525 |
where:aBlock |
|
5526 |
title:title |
|
5527 |
ifNone:warnBlock |
|
5528 |
||
5529 |
"Modified: 24.1.1997 / 19:44:30 / cg" |
|
5530 |
! |
|
5531 |
||
2675 | 5532 |
findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock |
5533 |
"return all instance- (if wantInst is true) and/or classmethods (if wantClass is true) |
|
5534 |
from classes in aCollectionOfClasses, where aBlock evaluates to true." |
|
5535 |
||
11506
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5536 |
|list checkedClasses checkBlock nClasses nClassesDone| |
2675 | 5537 |
|
5538 |
checkedClasses := IdentitySet new. |
|
5539 |
list := OrderedCollection new. |
|
5540 |
||
5541 |
checkBlock := [:cls | |
|
5542 |
(checkedClasses includes:cls) ifFalse:[ |
|
8554
441ea25ad1fd
Do not complain about obsolete classes which are unloaded when searching
Stefan Vogel <sv@exept.de>
parents:
8505
diff
changeset
|
5543 |
(cls isObsolete and:[cls isLoaded]) ifTrue:[ |
2882 | 5544 |
Transcript showCR:'Browser method search: skipping obsolete class: ' , cls displayString |
2675 | 5545 |
] ifFalse:[ |
11941
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5546 |
aBlock numArgs == 1 ifTrue:[ |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5547 |
cls methodDictionary keysAndValuesDo:[:sel :method | |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5548 |
(aBlock value:method) ifTrue:[ |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5549 |
list add:method "/ (cls name , ' ' , sel) |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5550 |
] |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5551 |
]. |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5552 |
] ifFalse:[ |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5553 |
cls methodDictionary keysAndValuesDo:[:sel :method | |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5554 |
(aBlock value:cls value:method value:sel) ifTrue:[ |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5555 |
list add:method "/ (cls name , ' ' , sel) |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5556 |
] |
55fec250ed02
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11934
diff
changeset
|
5557 |
]. |
2675 | 5558 |
]. |
5559 |
checkedClasses add:cls. |
|
5560 |
] |
|
5561 |
] |
|
5562 |
]. |
|
5563 |
||
11506
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5564 |
nClasses := aCollectionOfClasses size. |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5565 |
nClassesDone := 0. |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5566 |
|
2675 | 5567 |
aCollectionOfClasses do:[:aClass | |
3008 | 5568 |
(aClass notNil and:[aClass isObsolete not]) ifTrue:[ |
2675 | 5569 |
" |
5570 |
output disabled - it slows down things too much (when searching for |
|
5571 |
implementors or senders) |
|
5572 |
" |
|
5573 |
wantInst ifTrue:[ |
|
5574 |
"/ Transcript show:'searching '; show:aClass name; showCR:' ...'; endEntry. |
|
5575 |
checkBlock value:aClass |
|
5576 |
]. |
|
5577 |
wantClass ifTrue:[ |
|
5578 |
"/ Transcript show:'searching '; show:aClass class name; showCR:' ...'; endEntry. |
|
5579 |
checkBlock value:(aClass class) |
|
5580 |
]. |
|
11506
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5581 |
nClassesDone > 5 ifTrue:[ |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5582 |
"/ Processor yield |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5583 |
ProgressNotification progressPercentage:(nClassesDone / nClasses)*100. |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5584 |
]. |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5585 |
]. |
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5586 |
nClassesDone := nClassesDone + 1. |
2675 | 5587 |
]. |
5588 |
^ list |
|
11506
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5589 |
|
bc0fc32fd733
changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents:
11452
diff
changeset
|
5590 |
"Modified: / 15-05-2012 / 10:36:44 / cg" |
2675 | 5591 |
! |
5592 |
||
5593 |
findMethodsIn:aCollectionOfClasses where:aBlock |
|
5594 |
"return all instance- and classmethods |
|
5595 |
from classes in aCollectionOfClasses, where aBlock evaluates to true." |
|
5596 |
||
5597 |
^ self |
|
5598 |
findMethodsIn:aCollectionOfClasses |
|
5599 |
inst:true |
|
5600 |
class:true |
|
5601 |
where:aBlock |
|
203 | 5602 |
! ! |
93 | 5603 |
|
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5604 |
!SystemBrowser class methodsFor:'startup with query'! |
203 | 5605 |
|
5606 |
askThenBrowseClass |
|
5607 |
self getClassThenPerform:#browseClass: |
|
5608 |
||
5609 |
" |
|
5610 |
SystemBrowser askThenBrowseClass |
|
5611 |
" |
|
93 | 5612 |
! |
5613 |
||
203 | 5614 |
askThenBrowseClassHierarchy |
5615 |
self getClassThenPerform:#browseClassHierarchy: |
|
36 | 5616 |
|
203 | 5617 |
" |
5618 |
SystemBrowser askThenBrowseClassHierarchy |
|
5619 |
" |
|
36 | 5620 |
! |
5621 |
||
203 | 5622 |
askThenBrowseFullClassProtocol |
5623 |
self getClassThenPerform:#browseFullClassProtocol: |
|
36 | 5624 |
|
203 | 5625 |
" |
5626 |
SystemBrowser askThenBrowseFullClassProtocol |
|
5627 |
" |
|
52 | 5628 |
! |
5629 |
||
203 | 5630 |
getClassThenPerform:aSelector |
2729
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5631 |
|enterBox resources| |
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5632 |
|
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5633 |
resources := self classResources. |
52 | 5634 |
|
6353 | 5635 |
enterBox := EnterBox title:(self classResources stringWithCRs:'Browse which class:'). |
6640 | 5636 |
enterBox okText:(resources string:'Browse'). |
6873 | 5637 |
enterBox entryCompletionBlock:(DoWhatIMeanSupport classNameEntryCompletionBlock). |
203 | 5638 |
enterBox action:[:className | |
2729
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5639 |
|cls| |
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5640 |
|
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5641 |
cls := Smalltalk classNamed:className. |
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5642 |
cls isNil ifTrue:[ |
6640 | 5643 |
self warn:(resources string:'No such class'). |
2729
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5644 |
] ifFalse:[ |
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5645 |
self perform:aSelector with:cls |
9af04074a4bb
no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents:
2728
diff
changeset
|
5646 |
] |
203 | 5647 |
]. |
5648 |
enterBox showAtPointer |
|
75 | 5649 |
|
203 | 5650 |
" |
5651 |
SystemBrowser getClassThenPerform:#browseClass: |
|
5652 |
" |
|
6873 | 5653 |
|
5654 |
"Modified: / 10-08-2006 / 12:54:20 / cg" |
|
36 | 5655 |
! ! |
5656 |
||
2813 | 5657 |
!SystemBrowser class methodsFor:'utilities'! |
5658 |
||
3833 | 5659 |
classWithNameSimilarTo:className |
5660 |
"helper for class-name entry; finds a class by name tolerant w.r.t. case" |
|
5661 |
||
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5662 |
|allMatchingClasses| |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5663 |
|
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5664 |
allMatchingClasses := self classesWithNameSimilarTo:className. |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5665 |
^ allMatchingClasses firstIfEmpty:nil |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5666 |
! |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5667 |
|
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5668 |
classesWithNameSimilarTo:className |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5669 |
"helper for class-name entry; finds a class by name tolerant w.r.t. case" |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5670 |
|
6944 | 5671 |
^ self classesWithNameSimilarTo:className from:nil |
5672 |
||
5673 |
"Modified: / 22-08-2006 / 13:22:41 / cg" |
|
5674 |
! |
|
5675 |
||
5676 |
classesWithNameSimilarTo:className from:aNameSpaceOrNil |
|
5677 |
"helper for class-name entry; finds classes with a name similar to the argument, className" |
|
5678 |
||
5679 |
|nm lcName class allClasses triedDetectors triedMatchers allMatchingClasses |
|
5680 |
prefNameSpaceOrNil prefLcNameSpace| |
|
5681 |
||
5682 |
prefNameSpaceOrNil := (aNameSpaceOrNil == Smalltalk) ifTrue:[ nil ] ifFalse:[aNameSpaceOrNil]. |
|
3833 | 5683 |
|
5684 |
(className startsWith:'Smalltalk::') ifTrue:[ |
|
5685 |
nm := className copyFrom:('Smalltalk::' size + 1). |
|
5686 |
] ifFalse:[ |
|
5687 |
nm := className. |
|
5688 |
]. |
|
5689 |
||
6944 | 5690 |
prefNameSpaceOrNil notNil ifTrue:[ |
5691 |
class := prefNameSpaceOrNil at:nm asSymbol. |
|
5692 |
class isBehavior ifTrue:[^ Array with:class]. "/ a direct hit |
|
5693 |
prefLcNameSpace := prefNameSpaceOrNil name asLowercase. |
|
5694 |
]. |
|
3833 | 5695 |
class := Smalltalk at:nm asSymbol. |
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5696 |
class isBehavior ifTrue:[^ Array with:class]. "/ a direct hit |
3833 | 5697 |
|
5698 |
lcName := className asLowercase. |
|
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5699 |
|
3833 | 5700 |
allClasses := Smalltalk allClasses. |
4806 | 5701 |
|
6134 | 5702 |
triedDetectors := OrderedCollection new. |
5703 |
triedDetectors add:[:cls | cls name asLowercase = lcName]. |
|
5704 |
||
5705 |
triedDetectors do:[:eachTry | |
|
5706 |
|class| |
|
5707 |
||
5708 |
class := allClasses detect:eachTry ifNone:nil. |
|
5709 |
class notNil ifTrue:[^ Array with:class]. |
|
5710 |
]. |
|
5711 |
||
4806 | 5712 |
triedMatchers := OrderedCollection new. |
5018
2fe02eac49c5
better classesWithNameSimilarTo
Claus Gittinger <cg@exept.de>
parents:
4924
diff
changeset
|
5713 |
triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase = lcName]. |
2fe02eac49c5
better classesWithNameSimilarTo
Claus Gittinger <cg@exept.de>
parents:
4924
diff
changeset
|
5714 |
triedMatchers add:[:cls | cls nameWithoutNameSpacePrefix asLowercase = lcName]. |
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5715 |
|
4806 | 5716 |
triedMatchers add:[:cls | cls name asLowercase startsWith:lcName]. |
5717 |
triedMatchers add:[:cls | cls nameWithoutNameSpacePrefix asLowercase startsWith:lcName]. |
|
5718 |
triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase startsWith:lcName]. |
|
5719 |
triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase includesString:lcName]. |
|
6134 | 5720 |
triedMatchers add:[:cls | cls name asLowercase includesString:lcName]. |
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5721 |
|
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5722 |
allMatchingClasses := IdentitySet new. |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5723 |
triedMatchers do:[:eachTry | |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5724 |
|matchingClasses| |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5725 |
|
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5726 |
matchingClasses := allClasses select:eachTry. |
6944 | 5727 |
"/ matchingClasses size == 1 ifTrue:[^ matchingClasses]. |
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5728 |
allMatchingClasses addAll:matchingClasses. |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5729 |
]. |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5730 |
allMatchingClasses isEmpty ifTrue:[^ #()]. |
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5731 |
|
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5732 |
allMatchingClasses := allMatchingClasses asOrderedCollection. |
6944 | 5733 |
allMatchingClasses |
5734 |
sort:[:a :b | |
|
5735 |
|lcNameA lcNameB da db distA distB | |
|
5736 |
||
5737 |
lcNameA := a name asLowercase. |
|
5738 |
lcNameB := b name asLowercase. |
|
5739 |
prefNameSpaceOrNil notNil ifTrue:[ |
|
5740 |
a nameSpace == prefNameSpaceOrNil ifTrue:[ |
|
5741 |
lcNameA := a nameWithoutNameSpacePrefix asLowercase. |
|
5742 |
]. |
|
5743 |
b nameSpace == prefNameSpaceOrNil ifTrue:[ |
|
5744 |
lcNameB := b nameWithoutNameSpacePrefix asLowercase. |
|
5745 |
]. |
|
5746 |
]. |
|
5747 |
||
5748 |
distA := da := lcName levenshteinTo:lcNameA. |
|
5749 |
distB := db := lcName levenshteinTo:lcNameB. |
|
5750 |
"prefer prefixes (i.e. classes whose name starts with what we search for)" |
|
5751 |
||
5752 |
(lcNameA startsWith:lcName) ifTrue:[ |
|
5753 |
distB := distB * 2 |
|
5754 |
]. |
|
5755 |
(lcNameB startsWith:lcName) ifTrue:[ |
|
5756 |
distA := distA * 2 |
|
5757 |
]. |
|
5758 |
distA < distB |
|
5759 |
]. |
|
4924
0d39bbc7203e
better search-class heuristics
Claus Gittinger <cg@exept.de>
parents:
4921
diff
changeset
|
5760 |
^ allMatchingClasses. |
6546 | 5761 |
|
5762 |
" |
|
6678 | 5763 |
self classesWithNameSimilarTo:'NewSystemBrowser' |
5764 |
self classesWithNameSimilarTo:'Moose::MSEAbstractOperator' |
|
6546 | 5765 |
" |
6944 | 5766 |
|
5767 |
"Created: / 22-08-2006 / 13:22:48 / cg" |
|
5768 |
"Modified: / 22-08-2006 / 14:53:38 / cg" |
|
3833 | 5769 |
! |
5770 |
||
2813 | 5771 |
extractClassAndSelectorFrom:aString into:aBlock |
5772 |
"given a string which can be either 'class>>sel' or |
|
5773 |
'class sel', extract className and selector, and call aBlock with |
|
5774 |
the result. |
|
5775 |
Useful to open browser on a method as selected in some documentation." |
|
5776 |
||
5777 |
|sel clsName isMeta sep s| |
|
5778 |
||
5779 |
sel := aString. |
|
5780 |
sel notNil ifTrue:[ |
|
5781 |
sel := sel asString withoutSeparators. |
|
5782 |
('*>>*' match:sel) ifTrue:[ |
|
5783 |
sep := $> |
|
5784 |
] ifFalse:[ |
|
5785 |
('* *' match:sel) ifTrue:[ |
|
5786 |
sep := Character space |
|
5787 |
] |
|
5788 |
]. |
|
5789 |
sep notNil ifTrue:[ |
|
5790 |
" |
|
5791 |
extract class/sel from selection |
|
5792 |
" |
|
5793 |
s := ReadStream on:sel. |
|
5794 |
clsName := s upTo:sep. |
|
5795 |
[s peek == sep] whileTrue:[s next]. |
|
5796 |
sel := s upToEnd. |
|
5797 |
||
5798 |
(clsName endsWith:' class') ifTrue:[ |
|
5799 |
isMeta := true. |
|
5800 |
clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)" |
|
5801 |
] ifFalse:[ |
|
5802 |
isMeta := false |
|
5803 |
]. |
|
5804 |
] |
|
5805 |
]. |
|
5806 |
aBlock value:clsName value:sel value:isMeta |
|
5807 |
||
5808 |
"Modified: / 17.6.1996 / 16:52:14 / stefan" |
|
5809 |
"Created: / 6.2.2000 / 00:51:51 / cg" |
|
5810 |
"Modified: / 6.2.2000 / 00:56:43 / cg" |
|
5811 |
! |
|
5812 |
||
5813 |
extractSelectorFrom:aString |
|
5814 |
"given an arbitrary string, try to extract a useful selector. |
|
5815 |
Useful to open browser on a selected code fragment." |
|
5816 |
||
8047
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5817 |
|s sel sel2 t| |
2813 | 5818 |
|
5819 |
aString isNil ifTrue:[^ nil]. |
|
5820 |
||
5821 |
s := aString asString string. |
|
5822 |
s := s withoutSeparators. |
|
5823 |
sel := s. |
|
5824 |
||
6705 | 5825 |
((sel endsWith:$:) |
5826 |
and:[sel knownAsSymbol]) ifTrue:[ |
|
5827 |
^ sel asSymbol |
|
5828 |
]. |
|
5829 |
||
2813 | 5830 |
t := Parser selectorInExpression:sel. |
5831 |
t notNil ifTrue:[ |
|
5832 |
sel := t |
|
5833 |
]. |
|
5834 |
(sel = s or:[sel isNil or:[t == #>>]]) ifTrue:[ |
|
5835 |
"oops - thats probably not what we want here ..." |
|
5836 |
self extractClassAndSelectorFrom:s into:[:c :s :m | |
|
5837 |
sel := s |
|
5838 |
] |
|
5839 |
]. |
|
8047
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5840 |
|
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5841 |
sel asSymbolIfInterned isNil ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5842 |
(sel startsWith:'#') ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5843 |
sel2 := sel copyFrom:2. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5844 |
((sel2 startsWith:'''') and:[(sel2 endsWith:'''')]) ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5845 |
sel2 := (sel2 copyFrom:2) copyWithoutLast:1 |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5846 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5847 |
sel2 asSymbolIfInterned notNil ifTrue:[ |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5848 |
^ sel2 |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5849 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5850 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5851 |
]. |
8bc319ff9ba7
better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents:
7998
diff
changeset
|
5852 |
|
2813 | 5853 |
^ sel |
5854 |
||
5855 |
" |
|
5856 |
self extractSelectorFrom:'at:put:' |
|
5857 |
self extractSelectorFrom:'#at:put:' |
|
5858 |
self extractSelectorFrom:'at:something put:someValue' |
|
5859 |
self extractSelectorFrom:'self at:something put:someValue' |
|
5860 |
self extractSelectorFrom:'(self at:something put:someValue)' |
|
5861 |
self extractSelectorFrom:'[self at:something put:someValue] value' |
|
5862 |
self extractSelectorFrom:'Array>>at:put:' |
|
5863 |
" |
|
5864 |
||
5865 |
"Created: / 6.2.2000 / 00:49:44 / cg" |
|
5866 |
"Modified: / 6.2.2000 / 00:57:08 / cg" |
|
6560
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5867 |
! |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5868 |
|
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5869 |
resourceEditorClassFor:aResource |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5870 |
"resources are from a methods resource-info; |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5871 |
return an appropriate editor class." |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5872 |
|
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5873 |
(aResource == #canvas) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5874 |
^ UIPainter |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5875 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5876 |
(aResource == #menu) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5877 |
^ MenuEditor |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5878 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5879 |
((aResource == #image) or:[aResource == #fileImage]) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5880 |
^ ImageEditor |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5881 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5882 |
(aResource == #help) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5883 |
^ UIHelpTool |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5884 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5885 |
(aResource == #tableColumns) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5886 |
^ DataSetBuilder |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5887 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5888 |
(aResource == #tabList) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5889 |
^ TabListEditor |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5890 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5891 |
(aResource == #hierarchicalList) ifTrue:[ |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5892 |
^ HierarchicalListEditor |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5893 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5894 |
^ nil |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5895 |
! |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5896 |
|
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5897 |
resourceEditorClassForResources:resources |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5898 |
"resources are from a methods resource-info; |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5899 |
return an appropriate editor class." |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5900 |
|
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5901 |
resources keysDo:[:eachResource | |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5902 |
|editor| |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5903 |
|
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5904 |
editor := self resourceEditorClassFor:eachResource. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5905 |
editor notNil ifTrue:[ ^ editor]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5906 |
]. |
80370d5aa971
share code between old and new browser
Claus Gittinger <cg@exept.de>
parents:
6552
diff
changeset
|
5907 |
^ nil |
2813 | 5908 |
! ! |
5909 |
||
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5910 |
!SystemBrowser::BrowserHistoryEntry methodsFor:'accessing'! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5911 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5912 |
className |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5913 |
"return the value of the instance variable 'className' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5914 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5915 |
^ className |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5916 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5917 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5918 |
className:something |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5919 |
"set the value of the instance variable 'className' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5920 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5921 |
className := something. |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5922 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5923 |
|
3151 | 5924 |
className:classNameArg meta:metaArg selector:selectorArg |
5925 |
className := classNameArg. |
|
5926 |
meta := metaArg. |
|
5927 |
selector := selectorArg. |
|
5928 |
! |
|
5929 |
||
10048
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5930 |
icon |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5931 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5932 |
^nil |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5933 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5934 |
"Created: / 05-05-2011 / 23:57:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5935 |
! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5936 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5937 |
label |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5938 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5939 |
^self displayString |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5940 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5941 |
"Created: / 05-05-2011 / 23:57:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5942 |
! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5943 |
|
3131
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5944 |
meta |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5945 |
"return the value of the instance variable 'meta' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5946 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5947 |
^ meta |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5948 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5949 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5950 |
meta:something |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5951 |
"set the value of the instance variable 'meta' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5952 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5953 |
meta := something. |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5954 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5955 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5956 |
selector |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5957 |
"return the value of the instance variable 'selector' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5958 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5959 |
^ selector |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5960 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5961 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5962 |
selector:something |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5963 |
"set the value of the instance variable 'selector' (automatically generated)" |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5964 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5965 |
selector := something. |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5966 |
! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5967 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5968 |
theClass |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5969 |
^ Smalltalk at:className asSymbol |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5970 |
! ! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5971 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5972 |
!SystemBrowser::BrowserHistoryEntry methodsFor:'comparing'! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5973 |
|
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5974 |
= anEntry |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5975 |
^ className = anEntry className |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5976 |
and:[meta = anEntry meta |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5977 |
and:[selector = anEntry selector]] |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5978 |
! ! |
883d7b34bb86
history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents:
3125
diff
changeset
|
5979 |
|
10048
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5980 |
!SystemBrowser::BrowserHistoryEntry methodsFor:'displaying'! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5981 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5982 |
displayString |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5983 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5984 |
^(className , (meta ifTrue:[' class'] ifFalse:[''])) asText allBold , |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5985 |
(selector isNil |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5986 |
ifTrue:[''] |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5987 |
ifFalse:[ ' >> ' , (selector asText "allItalic") ]) |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5988 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5989 |
"Created: / 15-04-2010 / 13:47:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5990 |
"Modified: / 03-07-2011 / 13:44:32 / cg" |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5991 |
! ! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5992 |
|
820
2a412afad51d
fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
5993 |
!SystemBrowser class methodsFor:'documentation'! |
93 | 5994 |
|
8851 | 5995 |
version_CVS |
12575 | 5996 |
^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.311 2013-03-30 00:09:35 cg Exp $' |
10048
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5997 |
! |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5998 |
|
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
5999 |
version_SVN |
9e92f3285051
changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents:
9879
diff
changeset
|
6000 |
^ '§Id: SystemBrowser.st 7772 2011-06-08 21:59:15Z vranyj1 §' |
36 | 6001 |
! ! |
4112 | 6002 |
|
12475 | 6003 |
|
203 | 6004 |
SystemBrowser initialize! |