author | Claus Gittinger <cg@exept.de> |
Wed, 02 Oct 2019 02:21:57 +0200 | |
changeset 3777 | bc17ad12cef0 |
parent 3774 | 271887d2ed74 |
child 3778 | 60e5b5a4ba0e |
permissions | -rw-r--r-- |
3770 | 1 |
"{ Encoding: utf8 }" |
2 |
||
3292 | 3 |
" |
4 |
Copyright (C) Original Authors (Kaehler, Scott Wallace and Dan Ingalls) |
|
5 |
Copyright (C) 2001 eXept Software AG |
|
6 |
||
7 |
Permission is hereby granted, free of charge, to any |
|
8 |
person obtaining a copy of this software and associated |
|
9 |
documentation files (the 'Software'), to deal in the |
|
10 |
Software without restriction, including without limitation |
|
11 |
the rights to use, copy, modify, merge, publish, distribute, |
|
12 |
sublicense, and/or sell copies of the Software, and to |
|
13 |
permit persons to whom the Software is furnished to do so, |
|
14 |
subject to the following conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall |
|
17 |
be included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
22 |
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
23 |
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
24 |
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
25 |
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
26 |
" |
|
1522 | 27 |
"{ Package: 'stx:libtool2' }" |
28 |
||
3193 | 29 |
"{ NameSpace: Smalltalk }" |
30 |
||
1522 | 31 |
ApplicationModel subclass:#MethodFinderWindow |
3292 | 32 |
instanceVariableNames:'resultHolder selectorPatternHolder classOfResultHolder |
3777 | 33 |
selectedImplementorsHolder argumentsEditor messageAnswerEditor |
34 |
receiverEditor receiver resultSelectors arg2BoxVisible |
|
35 |
arg1BoxVisible arg4BoxVisible arg3BoxVisible argCountHolder |
|
36 |
argCountList argument1Editor argument2Editor argument3Editor |
|
37 |
argument4Editor resultSelected lookAtResultEditor codeHolder |
|
38 |
searchProcess classOfResultNameListHolder |
|
39 |
selectedClassOfResultIndexHolder classOfResultListHolder' |
|
1522 | 40 |
classVariableNames:'' |
41 |
poolDictionaries:'' |
|
3215 | 42 |
category:'Interface-Tools' |
1522 | 43 |
! |
44 |
||
1530 | 45 |
!MethodFinderWindow class methodsFor:'documentation'! |
46 |
||
3292 | 47 |
copyright |
48 |
" |
|
49 |
Copyright (C) Original Authors (Kaehler, Scott Wallace and Dan Ingalls) |
|
50 |
Copyright (C) 2001 eXept Software AG |
|
51 |
||
52 |
Permission is hereby granted, free of charge, to any |
|
53 |
person obtaining a copy of this software and associated |
|
54 |
documentation files (the 'Software'), to deal in the |
|
55 |
Software without restriction, including without limitation |
|
56 |
the rights to use, copy, modify, merge, publish, distribute, |
|
57 |
sublicense, and/or sell copies of the Software, and to |
|
58 |
permit persons to whom the Software is furnished to do so, |
|
59 |
subject to the following conditions: |
|
60 |
||
61 |
The above copyright notice and this permission notice shall |
|
62 |
be included in all copies or substantial portions of the Software. |
|
63 |
||
64 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
65 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
66 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
67 |
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
68 |
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
69 |
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
70 |
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
71 |
" |
|
72 |
! |
|
73 |
||
1530 | 74 |
documentation |
75 |
" |
|
3292 | 76 |
a tool to find implementing methods by example. |
77 |
Give it values for a receiver, optional arguments and a desired result, |
|
78 |
and it will find methods which do that for you. |
|
79 |
Please read the online documentation for details (open via the tool's help menu). |
|
80 |
||
1531 | 81 |
[author:] |
3292 | 82 |
original squeak version by Ted Kaehler, Scott Wallace and Dan Ingalls. |
83 |
ported from Squeak and GUI enhanced 2001 by James Hayes james@exept.de. |
|
84 |
improved by Claus Gittinger. |
|
1530 | 85 |
" |
86 |
! ! |
|
1522 | 87 |
|
1532 | 88 |
!MethodFinderWindow class methodsFor:'constants'! |
89 |
||
2890 | 90 |
defaultIcon |
3109
92920c76aae3
Mark program icons with resource
Stefan Vogel <sv@exept.de>
parents:
3090
diff
changeset
|
91 |
<resource: #programImage> |
92920c76aae3
Mark program icons with resource
Stefan Vogel <sv@exept.de>
parents:
3090
diff
changeset
|
92 |
|
2890 | 93 |
^ ToolbarIconLibrary methodFinder24x24Icon |
94 |
||
95 |
"Created: / 01-06-2012 / 13:05:11 / cg" |
|
96 |
! |
|
97 |
||
1532 | 98 |
markerForImplementingClass |
99 |
^ '=> '. |
|
100 |
^ '*' |
|
101 |
||
102 |
"Created: / 13.11.2001 / 12:09:52 / cg" |
|
103 |
"Modified: / 13.11.2001 / 12:11:57 / cg" |
|
104 |
! ! |
|
105 |
||
3292 | 106 |
!MethodFinderWindow class methodsFor:'help specs'! |
107 |
||
3514 | 108 |
helpSpec |
3292 | 109 |
"This resource specification was automatically generated |
110 |
by the UIHelpTool of ST/X." |
|
111 |
||
112 |
"Do not manually edit this!! If it is corrupted, |
|
113 |
the UIHelpTool may not be able to read the specification." |
|
114 |
||
115 |
" |
|
3675 | 116 |
UIHelpTool openOnClass:MethodFinderWindow |
3292 | 117 |
" |
118 |
||
119 |
<resource: #help> |
|
120 |
||
3514 | 121 |
^ super helpSpec addPairsFrom:#( |
3292 | 122 |
|
3675 | 123 |
#'*' |
124 |
'as in GLOB patterns (i.e. like filename patterns)' |
|
3292 | 125 |
|
126 |
#answerValue |
|
3772 | 127 |
'Enter the desired result value here.\Can be a constant like $a or ''hello'' or #(10 20 30)\or a Smalltalk expression, such as "10@20" or "Rectangle new".' |
3292 | 128 |
|
129 |
#arg1Value |
|
3771 | 130 |
'Enter a value for the first argument here.\Can be a constant like $a or ''hello'' or #(10 20 30)\or a Smalltalk expression, such as "10@20" or "Rectangle new".' |
3292 | 131 |
|
132 |
#arg2Value |
|
3770 | 133 |
'Enter a value for the second argument here.\Can be a constant or a Smalltalk expression.' |
3292 | 134 |
|
135 |
#arg3Value |
|
3770 | 136 |
'Enter a value for the third argument here.\Can be a constant or a Smalltalk expression.' |
3292 | 137 |
|
138 |
#argumentCount |
|
139 |
'Specify the number of arguments here.' |
|
140 |
||
141 |
#clearButton |
|
142 |
'Clear all sample value fields.' |
|
143 |
||
3675 | 144 |
#implementorsFound |
145 |
'Shows a list of messages which deliver the result or match the selector pattern' |
|
146 |
||
147 |
#receiverValue |
|
3770 | 148 |
'Enter a receiver value here.\Can be a constant (like ''hello'')\or a Smalltalk expression, such as "Rectangle basicNew".' |
3675 | 149 |
|
150 |
#selectorPattern |
|
151 |
'Enter a pattern to search by message name' |
|
152 |
||
153 |
#selectorPatternSearch |
|
154 |
'Search by name.\You can use match characters' |
|
155 |
||
3292 | 156 |
#startSearchButton |
157 |
'Search for methods which answer the desired value,\given the concrete arguments' |
|
158 |
||
3675 | 159 |
#startSearchPatternButton |
160 |
'Search for methods whose name matches the pattern' |
|
3292 | 161 |
|
162 |
) |
|
3675 | 163 |
|
164 |
"Modified: / 08-06-2019 / 16:06:17 / Claus Gittinger" |
|
3292 | 165 |
! ! |
166 |
||
1522 | 167 |
!MethodFinderWindow class methodsFor:'interface specs'! |
168 |
||
169 |
windowSpec |
|
170 |
"This resource specification was automatically generated |
|
171 |
by the UIPainter of ST/X." |
|
172 |
||
173 |
"Do not manually edit this!! If it is corrupted, |
|
174 |
the UIPainter may not be able to read the specification." |
|
175 |
||
176 |
" |
|
177 |
UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec |
|
178 |
MethodFinderWindow new openInterface:#windowSpec |
|
179 |
MethodFinderWindow open |
|
180 |
" |
|
181 |
||
182 |
<resource: #canvas> |
|
183 |
||
184 |
^ |
|
3289 | 185 |
#(FullSpec |
186 |
name: windowSpec |
|
3777 | 187 |
uuid: '7da03570-e499-11e9-8918-10ddb1cc5928' |
3289 | 188 |
window: |
189 |
(WindowSpec |
|
190 |
label: 'MethodFinder' |
|
191 |
name: 'MethodFinder' |
|
3675 | 192 |
uuid: '5fb0c87a-89f6-11e9-8df0-b8f6b1108e05' |
3777 | 193 |
bounds: (Rectangle 0 0 816 738) menu: menu |
3301 | 194 |
icon: defaultIcon |
3777 | 195 |
) component: |
3301 | 196 |
(SpecCollection |
197 |
collection: ( |
|
198 |
(VariableHorizontalPanelSpec |
|
199 |
name: 'VariableHorizontalPanel1' |
|
3777 | 200 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) uuid: '5fb0cd98-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 201 |
showHandle: true |
202 |
snapMode: both |
|
203 |
component: |
|
204 |
(SpecCollection |
|
205 |
collection: ( |
|
206 |
(VariableVerticalPanelSpec |
|
207 |
name: 'LeftBox' |
|
3675 | 208 |
uuid: '5fb0d1a8-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 209 |
showHandle: true |
210 |
component: |
|
211 |
(SpecCollection |
|
212 |
collection: ( |
|
213 |
(ViewSpec |
|
214 |
name: 'MethodFinderBox' |
|
3675 | 215 |
uuid: '5fb0d36a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 216 |
component: |
217 |
(SpecCollection |
|
218 |
collection: ( |
|
219 |
(ViewSpec |
|
220 |
name: 'ReceiverArgBox' |
|
3777 | 221 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) uuid: '5fb0d4f0-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 222 |
component: |
223 |
(SpecCollection |
|
224 |
collection: ( |
|
225 |
(LabelSpec |
|
226 |
label: 'Receiver' |
|
227 |
name: 'ReceiverLabel' |
|
3777 | 228 |
layout: (LayoutFrame 0 0 0 0 0 0.34000000000000002 28 0) uuid: '5fb0d6b2-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 229 |
translateLabel: true |
3777 | 230 |
) |
3301 | 231 |
(ComboListSpec |
3698 | 232 |
name: 'AllowedArguments' |
3777 | 233 |
layout: (LayoutFrame 0 0.34000000000000002 1 0 0 0.64000000000000135 28 0) activeHelpKey: argumentCount |
3675 | 234 |
uuid: '5fb0da9a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 235 |
model: argCountHolder |
236 |
comboList: argCountList |
|
237 |
useIndex: true |
|
3777 | 238 |
) |
3301 | 239 |
(LabelSpec |
240 |
label: 'Answer' |
|
241 |
name: 'MessageAnswerLabel' |
|
3777 | 242 |
layout: (LayoutFrame 0 0.64000000000000135 0 0 0 1 28 0) activeHelpKey: arg1Value |
3675 | 243 |
uuid: '5fb0dd60-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 244 |
translateLabel: true |
3777 | 245 |
) |
3301 | 246 |
(HorizontalPanelViewSpec |
247 |
name: 'HorizontalPanel1' |
|
3777 | 248 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) uuid: '5fb0dee6-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 249 |
horizontalLayout: fit |
250 |
verticalLayout: fit |
|
251 |
horizontalSpace: 3 |
|
252 |
verticalSpace: 3 |
|
253 |
component: |
|
254 |
(SpecCollection |
|
255 |
collection: ( |
|
256 |
(WorkspaceSpec |
|
257 |
name: 'ReceiverEditor' |
|
258 |
activeHelpKey: receiverValue |
|
3675 | 259 |
uuid: '5fb0e152-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 260 |
tabable: true |
261 |
hasHorizontalScrollBar: true |
|
262 |
hasVerticalScrollBar: true |
|
263 |
miniScrollerHorizontal: true |
|
264 |
miniScrollerVertical: true |
|
265 |
autoHideScrollBars: true |
|
266 |
hasKeyboardFocusInitially: false |
|
3777 | 267 |
extent: (Point 86 142) postBuildCallback: receiverWidgetCreated: |
268 |
) |
|
3301 | 269 |
(VerticalPanelViewSpec |
270 |
name: 'VerticalPanel1' |
|
3675 | 271 |
uuid: '5fb0e51c-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 272 |
horizontalLayout: fit |
273 |
verticalLayout: fit |
|
274 |
horizontalSpace: 3 |
|
275 |
verticalSpace: 3 |
|
276 |
component: |
|
277 |
(SpecCollection |
|
278 |
collection: ( |
|
279 |
(ViewSpec |
|
3777 | 280 |
name: 'Arg1Box' |
3675 | 281 |
uuid: '5fb0e6d4-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 282 |
visibilityChannel: arg1BoxVisible |
283 |
component: |
|
284 |
(SpecCollection |
|
285 |
collection: ( |
|
286 |
(WorkspaceSpec |
|
287 |
name: 'Arg1Editor' |
|
3777 | 288 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg1Value |
3675 | 289 |
uuid: '5fb0e7ce-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 290 |
tabable: true |
291 |
hasHorizontalScrollBar: true |
|
292 |
hasVerticalScrollBar: true |
|
293 |
miniScrollerHorizontal: true |
|
294 |
miniScrollerVertical: true |
|
295 |
autoHideScrollBars: true |
|
296 |
hasKeyboardFocusInitially: false |
|
297 |
postBuildCallback: argument1WidgetCreated: |
|
298 |
) |
|
3777 | 299 |
) |
300 |
) extent: (Point 87 45) |
|
301 |
) |
|
3301 | 302 |
(ViewSpec |
3777 | 303 |
name: 'Arg2Box' |
3675 | 304 |
uuid: '5fb0e9b8-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 305 |
visibilityChannel: arg2BoxVisible |
306 |
component: |
|
307 |
(SpecCollection |
|
308 |
collection: ( |
|
309 |
(WorkspaceSpec |
|
3777 | 310 |
name: 'Arg2Editor' |
311 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg2Value |
|
3675 | 312 |
uuid: '5fb0eabc-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 313 |
tabable: true |
314 |
hasHorizontalScrollBar: true |
|
315 |
hasVerticalScrollBar: true |
|
316 |
miniScrollerHorizontal: true |
|
317 |
miniScrollerVertical: true |
|
318 |
autoHideScrollBars: true |
|
319 |
hasKeyboardFocusInitially: false |
|
320 |
postBuildCallback: argument2WidgetCreated: |
|
321 |
) |
|
3777 | 322 |
) |
323 |
) extent: (Point 87 46) |
|
324 |
) |
|
3301 | 325 |
(ViewSpec |
3777 | 326 |
name: 'Arg3Box' |
3675 | 327 |
uuid: '5fb0ec74-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 328 |
visibilityChannel: arg3BoxVisible |
329 |
component: |
|
330 |
(SpecCollection |
|
331 |
collection: ( |
|
332 |
(WorkspaceSpec |
|
3777 | 333 |
name: 'Arg3Editor' |
334 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg3Value |
|
3675 | 335 |
uuid: '5fb0ed64-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 336 |
tabable: true |
337 |
hasHorizontalScrollBar: true |
|
338 |
hasVerticalScrollBar: true |
|
339 |
miniScrollerHorizontal: true |
|
340 |
miniScrollerVertical: true |
|
341 |
autoHideScrollBars: true |
|
342 |
hasKeyboardFocusInitially: false |
|
343 |
postBuildCallback: argument3WidgetCreated: |
|
344 |
) |
|
3777 | 345 |
) |
346 |
) extent: (Point 87 45) |
|
3301 | 347 |
) |
3777 | 348 |
) |
349 |
) extent: (Point 87 142) |
|
350 |
) |
|
3301 | 351 |
(WorkspaceSpec |
352 |
name: 'AnswerEditor' |
|
353 |
activeHelpKey: answerValue |
|
3675 | 354 |
uuid: '5fb0ef30-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 355 |
tabable: true |
356 |
hasHorizontalScrollBar: true |
|
357 |
hasVerticalScrollBar: true |
|
358 |
miniScrollerHorizontal: true |
|
359 |
miniScrollerVertical: true |
|
360 |
autoHideScrollBars: true |
|
361 |
hasKeyboardFocusInitially: false |
|
3777 | 362 |
extent: (Point 87 142) postBuildCallback: messageAnswerWidgetCreated: |
3301 | 363 |
) |
3777 | 364 |
) |
365 |
) |
|
3301 | 366 |
) |
3777 | 367 |
) |
368 |
) |
|
369 |
) |
|
3301 | 370 |
(ViewSpec |
371 |
name: 'ReceiverArgBoxActionBox' |
|
3777 | 372 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) uuid: '5fb0f0fc-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 373 |
component: |
374 |
(SpecCollection |
|
375 |
collection: ( |
|
376 |
(ActionButtonSpec |
|
377 |
label: 'Clear' |
|
3708 | 378 |
name: 'ClearButton' |
3777 | 379 |
layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1) activeHelpKey: clearButton |
3675 | 380 |
uuid: '5fb0f214-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 381 |
translateLabel: true |
382 |
model: clear |
|
3777 | 383 |
) |
3301 | 384 |
(ActionButtonSpec |
385 |
label: 'Search' |
|
3708 | 386 |
name: 'SearchButton' |
3777 | 387 |
layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1) activeHelpKey: startSearchButton |
3675 | 388 |
uuid: '5fb0f52a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 389 |
translateLabel: true |
390 |
tabable: true |
|
391 |
model: search |
|
392 |
) |
|
3777 | 393 |
) |
394 |
) |
|
3301 | 395 |
) |
3777 | 396 |
) |
397 |
) |
|
398 |
) |
|
3301 | 399 |
(ViewSpec |
400 |
name: 'SelectorFinderBox' |
|
3675 | 401 |
uuid: '5fb0f714-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 402 |
component: |
403 |
(SpecCollection |
|
404 |
collection: ( |
|
405 |
(ViewSpec |
|
406 |
name: 'MatchActionBox' |
|
3777 | 407 |
layout: (LayoutFrame 0 0 0 0 0 1 90 0) uuid: '5fb0f818-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 408 |
component: |
409 |
(SpecCollection |
|
410 |
collection: ( |
|
411 |
(LabelSpec |
|
412 |
label: 'Selector Pattern:' |
|
3708 | 413 |
name: 'SelectorPatternLabel' |
3777 | 414 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) uuid: '5fb0f908-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 415 |
translateLabel: true |
416 |
adjust: left |
|
3777 | 417 |
) |
3301 | 418 |
(InputFieldSpec |
3708 | 419 |
name: 'SelectorPattern' |
3777 | 420 |
layout: (LayoutFrame 2 0 -54 1 -2 1 -29 1) activeHelpKey: selectorPattern |
3675 | 421 |
uuid: '5fb0fa70-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 422 |
model: selectorPatternHolder |
423 |
immediateAccept: true |
|
424 |
acceptOnReturn: true |
|
425 |
acceptOnTab: true |
|
426 |
acceptOnPointerLeave: true |
|
3777 | 427 |
) |
3301 | 428 |
(ActionButtonSpec |
429 |
label: 'Search' |
|
3708 | 430 |
name: 'SearchPatternButton' |
3777 | 431 |
layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1) activeHelpKey: startSearchPatternButton |
3675 | 432 |
uuid: '5fb0fea8-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 433 |
translateLabel: true |
434 |
tabable: true |
|
435 |
model: searchPatternMatchesInBackground |
|
436 |
) |
|
3777 | 437 |
) |
438 |
) |
|
439 |
) |
|
3301 | 440 |
(SequenceViewSpec |
441 |
name: 'ResultList' |
|
3777 | 442 |
layout: (LayoutFrame 0 0 94 0 0 1 0 1) activeHelpKey: implementorsFound |
3675 | 443 |
uuid: '5fb1009c-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 444 |
model: selectedImplementorsHolder |
445 |
menu: resultListMenu |
|
446 |
hasHorizontalScrollBar: true |
|
447 |
hasVerticalScrollBar: true |
|
448 |
autoHideScrollBars: true |
|
449 |
useIndex: true |
|
450 |
sequenceList: resultHolder |
|
451 |
) |
|
3777 | 452 |
) |
453 |
) |
|
3301 | 454 |
) |
3777 | 455 |
) |
456 |
) handles: (Any 0.28000000000000003 1.0) |
|
457 |
) |
|
3301 | 458 |
(VariableVerticalPanelSpec |
459 |
name: 'RightBox' |
|
3675 | 460 |
uuid: '5fb103c6-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 461 |
component: |
462 |
(SpecCollection |
|
463 |
collection: ( |
|
464 |
(SequenceViewSpec |
|
3710 | 465 |
name: 'ImplementorsList' |
3675 | 466 |
uuid: '5fb10524-89f6-11e9-8df0-b8f6b1108e05' |
3777 | 467 |
model: selectedClassOfResultIndexHolder |
3301 | 468 |
menu: implementorListMenu |
469 |
hasHorizontalScrollBar: true |
|
470 |
hasVerticalScrollBar: true |
|
471 |
autoHideScrollBars: true |
|
472 |
doubleClickSelector: openBrowserOn: |
|
3777 | 473 |
valueChangeSelector: selectedClassOfResultIndexHolderChanged |
474 |
useIndex: true |
|
475 |
sequenceList: classOfResultNameListHolder |
|
476 |
) |
|
3695 | 477 |
(ViewSpec |
478 |
name: 'Box4' |
|
479 |
uuid: '4698d744-a993-11e9-b8a4-b8f6b1108e05' |
|
480 |
component: |
|
481 |
(SpecCollection |
|
482 |
collection: ( |
|
483 |
(CodeViewSpec |
|
3710 | 484 |
name: 'CodeView' |
3777 | 485 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) uuid: '5fb106dc-89f6-11e9-8df0-b8f6b1108e05' |
3695 | 486 |
model: codeHolder |
487 |
hasHorizontalScrollBar: true |
|
488 |
hasVerticalScrollBar: true |
|
489 |
autoHideScrollBars: true |
|
490 |
hasKeyboardFocusInitially: false |
|
491 |
viewClassName: 'codeViewClass' |
|
492 |
postBuildCallback: sourceCodeWidgetCreated: |
|
493 |
) |
|
3777 | 494 |
) |
495 |
) |
|
3301 | 496 |
) |
3777 | 497 |
) |
498 |
) handles: (Any 0.5 1.0) |
|
3301 | 499 |
) |
3777 | 500 |
) |
501 |
) handles: (Any 0.33000000000000002 1.0) |
|
3301 | 502 |
) |
3777 | 503 |
) |
504 |
) |
|
505 |
) |
|
3301 | 506 |
! |
507 |
||
508 |
windowSpec_old |
|
509 |
"This resource specification was automatically generated |
|
510 |
by the UIPainter of ST/X." |
|
511 |
||
512 |
"Do not manually edit this!! If it is corrupted, |
|
513 |
the UIPainter may not be able to read the specification." |
|
514 |
||
515 |
" |
|
3777 | 516 |
UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec_old |
517 |
MethodFinderWindow new openInterface:#windowSpec_old |
|
3301 | 518 |
" |
519 |
||
520 |
<resource: #canvas> |
|
521 |
||
522 |
^ |
|
523 |
#(FullSpec |
|
3777 | 524 |
name: #'windowSpec_old' |
525 |
uuid: '92a85286-e499-11e9-8918-10ddb1cc5928' |
|
3301 | 526 |
window: |
527 |
(WindowSpec |
|
528 |
label: 'MethodFinder' |
|
529 |
name: 'MethodFinder' |
|
3777 | 530 |
uuid: '92a85542-e499-11e9-8918-10ddb1cc5928' |
531 |
bounds: (Rectangle 0 0 920 690) menu: menu |
|
3289 | 532 |
icon: defaultIcon |
3777 | 533 |
) component: |
3289 | 534 |
(SpecCollection |
535 |
collection: ( |
|
536 |
(VariableHorizontalPanelSpec |
|
537 |
name: 'VariableHorizontalPanel1' |
|
3777 | 538 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) uuid: '92a857b8-e499-11e9-8918-10ddb1cc5928' |
3289 | 539 |
snapMode: both |
540 |
component: |
|
541 |
(SpecCollection |
|
542 |
collection: ( |
|
543 |
(ViewSpec |
|
544 |
name: 'LeftBox' |
|
3777 | 545 |
uuid: '92a85998-e499-11e9-8918-10ddb1cc5928' |
3289 | 546 |
level: 1 |
547 |
component: |
|
548 |
(SpecCollection |
|
549 |
collection: ( |
|
550 |
(ViewSpec |
|
551 |
name: 'ReceiverArgBox' |
|
3777 | 552 |
layout: (LayoutFrame 0 0 0 0 0 1 -100 0.5) uuid: '92a85ad8-e499-11e9-8918-10ddb1cc5928' |
3289 | 553 |
component: |
554 |
(SpecCollection |
|
555 |
collection: ( |
|
556 |
(LabelSpec |
|
557 |
label: 'Receiver' |
|
558 |
name: 'ReceiverLabel' |
|
3777 | 559 |
layout: (LayoutFrame 0 0 0 0 0 0.34000000000000002 28 0) uuid: '92a85bd2-e499-11e9-8918-10ddb1cc5928' |
3289 | 560 |
translateLabel: true |
3777 | 561 |
) |
3289 | 562 |
(ComboListSpec |
3698 | 563 |
name: 'AllowedArguments' |
3777 | 564 |
layout: (LayoutFrame 0 0.34000000000000002 1 0 0 0.64000000000000046 28 0) activeHelpKey: argumentCount |
565 |
uuid: '92a85d8a-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 566 |
model: argCountHolder |
567 |
comboList: argCountList |
|
568 |
useIndex: true |
|
3777 | 569 |
) |
3289 | 570 |
(LabelSpec |
571 |
label: 'Answer' |
|
572 |
name: 'MessageAnswerLabel' |
|
3777 | 573 |
layout: (LayoutFrame 0 0.64000000000000046 0 0 0 1 28 0) activeHelpKey: arg1Value |
574 |
uuid: '92a85f4c-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 575 |
translateLabel: true |
3777 | 576 |
) |
3289 | 577 |
(HorizontalPanelViewSpec |
578 |
name: 'HorizontalPanel1' |
|
3777 | 579 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) uuid: '92a860aa-e499-11e9-8918-10ddb1cc5928' |
3289 | 580 |
horizontalLayout: fit |
581 |
verticalLayout: fit |
|
582 |
horizontalSpace: 3 |
|
583 |
verticalSpace: 3 |
|
584 |
component: |
|
585 |
(SpecCollection |
|
586 |
collection: ( |
|
587 |
(WorkspaceSpec |
|
588 |
name: 'ReceiverEditor' |
|
3292 | 589 |
activeHelpKey: receiverValue |
3777 | 590 |
uuid: '92a8626c-e499-11e9-8918-10ddb1cc5928' |
3289 | 591 |
tabable: true |
592 |
hasHorizontalScrollBar: true |
|
593 |
hasVerticalScrollBar: true |
|
594 |
miniScrollerHorizontal: true |
|
595 |
miniScrollerVertical: true |
|
596 |
autoHideScrollBars: true |
|
597 |
hasKeyboardFocusInitially: false |
|
3777 | 598 |
extent: (Point 111 214) postBuildCallback: receiverWidgetCreated: |
599 |
) |
|
3289 | 600 |
(VerticalPanelViewSpec |
601 |
name: 'VerticalPanel1' |
|
3777 | 602 |
uuid: '92a864f6-e499-11e9-8918-10ddb1cc5928' |
3289 | 603 |
horizontalLayout: fit |
604 |
verticalLayout: fit |
|
605 |
horizontalSpace: 3 |
|
606 |
verticalSpace: 3 |
|
607 |
component: |
|
608 |
(SpecCollection |
|
609 |
collection: ( |
|
610 |
(ViewSpec |
|
3777 | 611 |
name: 'Arg1Box' |
612 |
uuid: '92a8667c-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 613 |
visibilityChannel: arg1BoxVisible |
614 |
component: |
|
615 |
(SpecCollection |
|
616 |
collection: ( |
|
617 |
(WorkspaceSpec |
|
618 |
name: 'Arg1Editor' |
|
3777 | 619 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg1Value |
620 |
uuid: '92a8678a-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 621 |
tabable: true |
622 |
hasHorizontalScrollBar: true |
|
623 |
hasVerticalScrollBar: true |
|
624 |
miniScrollerHorizontal: true |
|
625 |
miniScrollerVertical: true |
|
626 |
autoHideScrollBars: true |
|
627 |
hasKeyboardFocusInitially: false |
|
628 |
postBuildCallback: argument1WidgetCreated: |
|
629 |
) |
|
3777 | 630 |
) |
631 |
) extent: (Point 111 69) |
|
632 |
) |
|
3289 | 633 |
(ViewSpec |
3777 | 634 |
name: 'Arg2Box' |
635 |
uuid: '92a86974-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 636 |
visibilityChannel: arg2BoxVisible |
637 |
component: |
|
638 |
(SpecCollection |
|
639 |
collection: ( |
|
640 |
(WorkspaceSpec |
|
3777 | 641 |
name: 'Arg2Editor' |
642 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg2Value |
|
643 |
uuid: '92a86a6e-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 644 |
tabable: true |
645 |
hasHorizontalScrollBar: true |
|
646 |
hasVerticalScrollBar: true |
|
647 |
miniScrollerHorizontal: true |
|
648 |
miniScrollerVertical: true |
|
649 |
autoHideScrollBars: true |
|
650 |
hasKeyboardFocusInitially: false |
|
651 |
postBuildCallback: argument2WidgetCreated: |
|
652 |
) |
|
3777 | 653 |
) |
654 |
) extent: (Point 111 70) |
|
655 |
) |
|
3289 | 656 |
(ViewSpec |
3777 | 657 |
name: 'Arg3Box' |
658 |
uuid: '92a86c30-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 659 |
visibilityChannel: arg3BoxVisible |
660 |
component: |
|
661 |
(SpecCollection |
|
662 |
collection: ( |
|
663 |
(WorkspaceSpec |
|
3777 | 664 |
name: 'Arg3Editor' |
665 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) activeHelpKey: arg3Value |
|
666 |
uuid: '92a86d20-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 667 |
tabable: true |
668 |
hasHorizontalScrollBar: true |
|
669 |
hasVerticalScrollBar: true |
|
670 |
miniScrollerHorizontal: true |
|
671 |
miniScrollerVertical: true |
|
672 |
autoHideScrollBars: true |
|
673 |
hasKeyboardFocusInitially: false |
|
674 |
postBuildCallback: argument3WidgetCreated: |
|
675 |
) |
|
3777 | 676 |
) |
677 |
) extent: (Point 111 69) |
|
3289 | 678 |
) |
3777 | 679 |
) |
680 |
) extent: (Point 111 214) |
|
681 |
) |
|
3289 | 682 |
(WorkspaceSpec |
683 |
name: 'AnswerEditor' |
|
3292 | 684 |
activeHelpKey: answerValue |
3777 | 685 |
uuid: '92a86ef6-e499-11e9-8918-10ddb1cc5928' |
3289 | 686 |
tabable: true |
687 |
hasHorizontalScrollBar: true |
|
688 |
hasVerticalScrollBar: true |
|
689 |
miniScrollerHorizontal: true |
|
690 |
miniScrollerVertical: true |
|
691 |
autoHideScrollBars: true |
|
692 |
hasKeyboardFocusInitially: false |
|
3777 | 693 |
extent: (Point 111 214) postBuildCallback: messageAnswerWidgetCreated: |
3289 | 694 |
) |
3777 | 695 |
) |
696 |
) |
|
3289 | 697 |
) |
3777 | 698 |
) |
699 |
) |
|
700 |
) |
|
3289 | 701 |
(ViewSpec |
702 |
name: 'ReceiverArgBoxActionBox' |
|
3777 | 703 |
layout: (LayoutFrame 0 0 -98 0.5 0 1 -75 0.5) uuid: '92a870cc-e499-11e9-8918-10ddb1cc5928' |
3289 | 704 |
component: |
705 |
(SpecCollection |
|
706 |
collection: ( |
|
707 |
(ActionButtonSpec |
|
708 |
label: 'Clear' |
|
709 |
name: 'Button2' |
|
3777 | 710 |
layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1) activeHelpKey: clearButton |
711 |
uuid: '92a871d0-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 712 |
translateLabel: true |
713 |
model: clear |
|
3777 | 714 |
) |
3289 | 715 |
(ActionButtonSpec |
716 |
label: 'Search' |
|
717 |
name: 'Button1' |
|
3777 | 718 |
layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1) activeHelpKey: startSearchButton |
719 |
uuid: '92a8740a-e499-11e9-8918-10ddb1cc5928' |
|
3289 | 720 |
translateLabel: true |
721 |
tabable: true |
|
722 |
model: search |
|
723 |
) |
|
3777 | 724 |
) |
725 |
) |
|
726 |
) |
|
3289 | 727 |
(ViewSpec |
728 |
name: 'MatchActionBox' |
|
3777 | 729 |
layout: (LayoutFrame 0 0 -70 0.5 0 1 10 0.5) uuid: '92a875e0-e499-11e9-8918-10ddb1cc5928' |
3289 | 730 |
component: |
731 |
(SpecCollection |
|
732 |
collection: ( |
|
733 |
(LabelSpec |
|
734 |
label: 'Selector Pattern:' |
|
735 |
name: 'Label1' |
|
3777 | 736 |
layout: (LayoutFrame 0 0 0 0 0 0.5 25 0) uuid: '92a876e4-e499-11e9-8918-10ddb1cc5928' |
3289 | 737 |
translateLabel: true |
738 |
adjust: left |
|
3777 | 739 |
) |
3289 | 740 |
(InputFieldSpec |
741 |
name: 'EntryField1' |
|
3777 | 742 |
layout: (LayoutFrame 2 0 -54 1 -2 1 -29 1) uuid: '92a87838-e499-11e9-8918-10ddb1cc5928' |
3292 | 743 |
model: selectorPatternHolder |
3289 | 744 |
immediateAccept: true |
745 |
acceptOnReturn: true |
|
746 |
acceptOnTab: true |
|
747 |
acceptOnPointerLeave: true |
|
3777 | 748 |
) |
3289 | 749 |
(ActionButtonSpec |
750 |
label: 'Search' |
|
751 |
name: 'Button4' |
|
3777 | 752 |
layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1) uuid: '92a87a9a-e499-11e9-8918-10ddb1cc5928' |
3289 | 753 |
translateLabel: true |
754 |
tabable: true |
|
755 |
model: searchPatternMatchesInBackground |
|
756 |
) |
|
3777 | 757 |
) |
758 |
) |
|
759 |
) |
|
3289 | 760 |
(SequenceViewSpec |
761 |
name: 'ResultList' |
|
3777 | 762 |
layout: (LayoutFrame 0 0 15 0.5 0 1 0 1) uuid: '92a87c66-e499-11e9-8918-10ddb1cc5928' |
3289 | 763 |
model: selectedImplementorsHolder |
764 |
menu: resultListMenu |
|
765 |
hasHorizontalScrollBar: true |
|
766 |
hasVerticalScrollBar: true |
|
767 |
autoHideScrollBars: true |
|
768 |
useIndex: true |
|
769 |
sequenceList: resultHolder |
|
770 |
) |
|
3777 | 771 |
) |
772 |
) |
|
773 |
) |
|
3289 | 774 |
(VariableVerticalPanelSpec |
775 |
name: 'VariableVerticalPanel1' |
|
3777 | 776 |
uuid: '92a87e78-e499-11e9-8918-10ddb1cc5928' |
3289 | 777 |
component: |
778 |
(SpecCollection |
|
779 |
collection: ( |
|
780 |
(SequenceViewSpec |
|
781 |
name: 'List2' |
|
3777 | 782 |
uuid: '92a87fd6-e499-11e9-8918-10ddb1cc5928' |
783 |
model: selectedClassOfResultIndexHolder |
|
3289 | 784 |
menu: implementorListMenu |
785 |
hasHorizontalScrollBar: true |
|
786 |
hasVerticalScrollBar: true |
|
787 |
autoHideScrollBars: true |
|
788 |
doubleClickSelector: openBrowserOn: |
|
3777 | 789 |
valueChangeSelector: selectedClassOfResultIndexHolderChanged |
790 |
useIndex: true |
|
791 |
sequenceList: classOfResultNameListHolder |
|
792 |
) |
|
3289 | 793 |
(CodeViewSpec |
794 |
name: 'CodeView' |
|
3777 | 795 |
uuid: '92a88184-e499-11e9-8918-10ddb1cc5928' |
3289 | 796 |
model: codeHolder |
797 |
hasHorizontalScrollBar: true |
|
798 |
hasVerticalScrollBar: true |
|
799 |
autoHideScrollBars: true |
|
800 |
hasKeyboardFocusInitially: false |
|
3777 | 801 |
viewClassName: 'codeViewClass' |
3289 | 802 |
postBuildCallback: sourceCodeWidgetCreated: |
803 |
) |
|
3777 | 804 |
) |
805 |
) handles: (Any 0.5 1.0) |
|
3289 | 806 |
) |
3777 | 807 |
) |
808 |
) handles: (Any 0.37 1.0) |
|
3289 | 809 |
) |
3777 | 810 |
) |
811 |
) |
|
812 |
) |
|
1522 | 813 |
! ! |
814 |
||
1525 | 815 |
!MethodFinderWindow class methodsFor:'menu specs'! |
816 |
||
3768 | 817 |
helpMenu |
818 |
"This resource specification was automatically generated |
|
819 |
by the MenuEditor of ST/X." |
|
820 |
||
821 |
"Do not manually edit this!! If it is corrupted, |
|
822 |
the MenuEditor may not be able to read the specification." |
|
823 |
||
824 |
||
825 |
" |
|
826 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#helpMenu |
|
827 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow helpMenu)) startUp |
|
828 |
" |
|
829 |
||
830 |
<resource: #menu> |
|
831 |
||
832 |
^ |
|
833 |
#(Menu |
|
834 |
(MenuItem |
|
835 |
activeHelpKey: helpTutorial |
|
836 |
label: 'Documentation' |
|
837 |
itemValue: openHTMLDocumentation |
|
838 |
) |
|
839 |
(MenuItem |
|
840 |
label: '-' |
|
841 |
) |
|
842 |
(MenuItem |
|
843 |
label: 'Show Me How it Works' |
|
844 |
itemValue: showMeHowItWorks |
|
845 |
) |
|
846 |
(MenuItem |
|
847 |
label: '-' |
|
848 |
) |
|
849 |
(MenuItem |
|
850 |
activeHelpKey: aboutThisAppliaction |
|
851 |
label: 'About MethodFinder...' |
|
852 |
itemValue: openAboutThisApplication |
|
853 |
) |
|
854 |
) |
|
855 |
! |
|
856 |
||
1529 | 857 |
implementorListMenu |
858 |
"This resource specification was automatically generated |
|
859 |
by the MenuEditor of ST/X." |
|
860 |
||
861 |
"Do not manually edit this!! If it is corrupted, |
|
862 |
the MenuEditor may not be able to read the specification." |
|
863 |
||
3768 | 864 |
|
1529 | 865 |
" |
866 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu |
|
867 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp |
|
868 |
" |
|
869 |
||
870 |
<resource: #menu> |
|
871 |
||
872 |
^ |
|
3768 | 873 |
#(Menu |
874 |
(MenuItem |
|
875 |
label: 'Browse' |
|
876 |
itemValue: openBrowserOnSelectedItem |
|
877 |
) |
|
878 |
) |
|
1529 | 879 |
! |
880 |
||
1525 | 881 |
menu |
882 |
"This resource specification was automatically generated |
|
883 |
by the MenuEditor of ST/X." |
|
884 |
||
885 |
"Do not manually edit this!! If it is corrupted, |
|
886 |
the MenuEditor may not be able to read the specification." |
|
887 |
||
3685 | 888 |
|
1525 | 889 |
" |
890 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#menu |
|
891 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow menu)) startUp |
|
892 |
" |
|
893 |
||
894 |
<resource: #menu> |
|
895 |
||
896 |
^ |
|
3768 | 897 |
#(Menu |
898 |
(MenuItem |
|
899 |
activeHelpKey: file |
|
900 |
label: '&File' |
|
901 |
submenu: |
|
902 |
(Menu |
|
903 |
(MenuItem |
|
904 |
activeHelpKey: fileExit |
|
905 |
label: 'Exit' |
|
906 |
itemValue: closeRequest |
|
907 |
) |
|
1525 | 908 |
) |
3768 | 909 |
) |
910 |
(MenuItem |
|
911 |
label: 'MENU_Help' |
|
912 |
startGroup: conditionalRight |
|
913 |
submenuChannel: helpMenu |
|
914 |
) |
|
915 |
) |
|
2927 | 916 |
! |
917 |
||
918 |
resultListMenu |
|
919 |
"This resource specification was automatically generated |
|
920 |
by the MenuEditor of ST/X." |
|
921 |
||
922 |
"Do not manually edit this!! If it is corrupted, |
|
923 |
the MenuEditor may not be able to read the specification." |
|
924 |
||
3768 | 925 |
|
2927 | 926 |
" |
3768 | 927 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#resultListMenu |
928 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow resultListMenu)) startUp |
|
2927 | 929 |
" |
930 |
||
931 |
<resource: #menu> |
|
932 |
||
933 |
^ |
|
3768 | 934 |
#(Menu |
935 |
(MenuItem |
|
936 |
label: 'Browse Senders' |
|
937 |
itemValue: openBrowserOnSenderOfSelectedResultItem |
|
938 |
) |
|
939 |
(MenuItem |
|
940 |
label: 'Browse Implementors' |
|
941 |
itemValue: openBrowserOnSelectedResultItem |
|
942 |
) |
|
943 |
) |
|
1525 | 944 |
! ! |
945 |
||
3289 | 946 |
!MethodFinderWindow class methodsFor:'startup'! |
947 |
||
948 |
openOnSelectorPattern:selector |
|
949 |
|app| |
|
950 |
||
951 |
app := self new. |
|
952 |
app allButOpen. |
|
3292 | 953 |
app selectorPatternHolder value:selector. |
3289 | 954 |
app openWindow. |
3290 | 955 |
"/ app waitForBackgroundSearchFinished. |
956 |
||
3289 | 957 |
^ app |
958 |
||
959 |
" |
|
960 |
self openOnSelectorPattern:'asLowercase' |
|
961 |
" |
|
962 |
! ! |
|
963 |
||
1522 | 964 |
!MethodFinderWindow methodsFor:'accessing'! |
965 |
||
966 |
receiver |
|
1525 | 967 |
"Return a copy of the value of the instance variable 'receiver' " |
1522 | 968 |
|
969 |
^ receiver copy |
|
970 |
! ! |
|
971 |
||
972 |
!MethodFinderWindow methodsFor:'actions'! |
|
973 |
||
974 |
clear |
|
3292 | 975 |
"Reset the contents of all the outputs." |
1522 | 976 |
|
3774 | 977 |
receiverEditor notNil ifTrue:[ |
978 |
receiverEditor contents:nil. |
|
979 |
]. |
|
1522 | 980 |
argument1Editor contents:nil. |
981 |
argument2Editor contents:nil. |
|
982 |
argument3Editor contents:nil. |
|
983 |
messageAnswerEditor contents:nil. |
|
984 |
self resultHolder value:nil. |
|
3777 | 985 |
self classOfResultListHolder value: nil. |
986 |
codeHolder notNil ifTrue:[ |
|
987 |
codeHolder value:nil. |
|
988 |
]. |
|
1522 | 989 |
! |
990 |
||
991 |
messageAnswerEditorContents |
|
3024 | 992 |
"Return a cleaned up version of message answer taken from the messageAnswerEditor |
993 |
as an association. The association has cleanedAnswerString as a key and the |
|
994 |
compiledAnswer as value." |
|
995 |
||
996 |
|aCleanedAnswerString compiledAnswer| |
|
1522 | 997 |
|
3024 | 998 |
aCleanedAnswerString := self cleanInputs:(messageAnswerEditor contents). |
3777 | 999 |
compiledAnswer := Compiler evaluate:aCleanedAnswerString |
1000 |
ifFail:[ |
|
1001 |
Dialog information:'Bad value in the answer field'. |
|
1002 |
AbortOperationRequest raise. |
|
1003 |
]. |
|
3024 | 1004 |
((self isExpression:aCleanedAnswerString) or:[ compiledAnswer isNil ]) ifTrue:[ |
1005 |
aCleanedAnswerString := compiledAnswer printString |
|
1006 |
]. |
|
1007 |
^ aCleanedAnswerString -> compiledAnswer. |
|
1522 | 1008 |
! |
1009 |
||
3777 | 1010 |
openBrowserOn:indexInList |
1011 |
"Opens browser on theArgument of a specific class. |
|
1012 |
anArgument being the index of the selected list entry, |
|
1013 |
which is a string with the class and the selector |
|
1014 |
upon which the browser is to be opened. |
|
1015 |
Return the receiver." |
|
1522 | 1016 |
|
3777 | 1017 |
|sel classAndSelector| |
1522 | 1018 |
|
3777 | 1019 |
sel := classOfResultListHolder value at:indexInList. |
1020 |
classAndSelector := self extractClassAndSelectorFrom:sel. |
|
1532 | 1021 |
classAndSelector isNil ifTrue:[ |
1525 | 1022 |
^ self |
1522 | 1023 |
]. |
3482 | 1024 |
SystemBrowser default |
2459 | 1025 |
openInClass:classAndSelector key |
1026 |
selector:classAndSelector value |
|
1525 | 1027 |
|
1028 |
" |
|
1029 |
MethodFinderWindow new openBrowserOn: '*SmallInteger +' |
|
1030 |
MethodFinderWindow new openBrowserOn: 'String ,' |
|
1031 |
MethodFinderWindow new openBrowserOn: 'Number detentBy:atMultiplesOf:snap:' |
|
1032 |
||
1033 |
||
1034 |
" |
|
1532 | 1035 |
|
3482 | 1036 |
"Modified: / 01-09-2017 / 14:21:18 / cg" |
1522 | 1037 |
! |
1038 |
||
1529 | 1039 |
openBrowserOnSelectedItem |
2927 | 1040 |
"on the selected implementor" |
1041 |
||
1529 | 1042 |
|sel| |
1043 |
||
1044 |
sel := self selectedClassOfResultHolder value. |
|
1045 |
self openBrowserOn:sel |
|
1532 | 1046 |
|
2927 | 1047 |
"Modified: / 13-11-2001 / 12:47:39 / cg" |
1048 |
"Modified (comment): / 21-09-2012 / 11:08:33 / cg" |
|
1049 |
! |
|
1050 |
||
1051 |
openBrowserOnSelectedResultItem |
|
1052 |
"on an item in the lower left list, |
|
1053 |
on all implementors of that message" |
|
1054 |
||
1055 |
|selIndex selector| |
|
1056 |
||
1057 |
selIndex := self selectedImplementorsHolder value. |
|
1058 |
selIndex isNil ifTrue:[^ self]. |
|
1059 |
||
1060 |
selector := resultSelectors at:selIndex. |
|
1061 |
UserPreferences browserClass browseImplementorsOf:selector. |
|
1062 |
||
1063 |
"Created: / 21-09-2012 / 11:05:46 / cg" |
|
1529 | 1064 |
! |
1065 |
||
3024 | 1066 |
openBrowserOnSenderOfSelectedResultItem |
1067 |
"on an item in the lower left list, |
|
1068 |
on all implementors of that message" |
|
1069 |
||
1070 |
|selIndex selector| |
|
1525 | 1071 |
|
3024 | 1072 |
selIndex := self selectedImplementorsHolder value. |
1073 |
selIndex isNil ifTrue:[^ self]. |
|
1074 |
||
1075 |
selector := resultSelectors at:selIndex. |
|
1076 |
UserPreferences browserClass browseSendersOf:selector. |
|
1077 |
! |
|
1522 | 1078 |
|
1079 |
search |
|
3024 | 1080 |
"Do a search based on the input in the various text editors. Return the receiver." |
3322 | 1081 |
|
3773 | 1082 |
|tempReceiver tempAnswer tempArguments anArray resultArrayOrErrorString receiverWithArgument mf| |
1522 | 1083 |
|
3024 | 1084 |
self resultHolder value:nil. |
3777 | 1085 |
self classOfResultListHolder value:nil. |
3024 | 1086 |
self codeHolder value:nil. |
1087 |
tempArguments := self argumentEditorsContents. |
|
1088 |
tempReceiver := self receiverEditorContents. |
|
1089 |
tempAnswer := self messageAnswerEditorContents. |
|
3768 | 1090 |
|
1091 |
"self cleanInputRec:tempReceiver arg:tempArguments ans:tempAnswer." |
|
3741 | 1092 |
receiverWithArgument := self mergeReceiver:(tempReceiver value) withArgument:(tempArguments values). |
3768 | 1093 |
anArray := Array |
1094 |
with:receiverWithArgument |
|
1095 |
with:tempAnswer value. |
|
1096 |
||
1097 |
"an array now holds the following array #(#(receiver argument) answer) or #(#(receiver) answer). |
|
1098 |
which should be suitable input for the method finder." |
|
3767 | 1099 |
self withCursor:(Cursor execute) do:[ |
1100 |
mf := MethodFinder new. |
|
3768 | 1101 |
mf load:anArray. |
3773 | 1102 |
resultArrayOrErrorString := mf findMessage. |
3767 | 1103 |
]. |
3768 | 1104 |
|
3773 | 1105 |
(resultArrayOrErrorString isString "(resultArray at:1) includesSubString:'no single'") ifTrue:[ |
3695 | 1106 |
false ifTrue:[ |
3773 | 1107 |
(self confirm:(c'%1\nTry a more exhaustive search (may take long)?' |
1108 |
bindWith:resultArrayOrErrorString)) |
|
3695 | 1109 |
ifTrue:[ |
1110 |
self search2Levels. |
|
1111 |
]. |
|
1112 |
] ifFalse:[ |
|
3773 | 1113 |
self warn:resultArrayOrErrorString. |
3695 | 1114 |
]. |
3024 | 1115 |
^ self |
1116 |
]. |
|
3695 | 1117 |
|
1118 |
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments" |
|
3773 | 1119 |
resultArrayOrErrorString |
3322 | 1120 |
keysAndValuesDo:[:key :value | |
3024 | 1121 |
|newValue| |
1522 | 1122 |
|
3675 | 1123 |
newValue := value copyReplaceString:'data1' |
1124 |
withString:(tempReceiver value storeString). "/ was: "tempReceiver key" |
|
3024 | 1125 |
(tempArguments size) >= 1 ifTrue:[ |
3675 | 1126 |
newValue := newValue copyReplaceString:'data2' |
1127 |
withString:(tempArguments valueAt:1) storeString "/ was "keyAt:1" |
|
3024 | 1128 |
]. |
1129 |
(tempArguments size) > 1 ifTrue:[ |
|
3544 | 1130 |
newValue := newValue copyReplaceString:'data3' |
3675 | 1131 |
withString:(tempArguments valueAt:2) storeString. "/ was "keyAt:2" |
3024 | 1132 |
]. |
1133 |
(tempArguments size) > 2 ifTrue:[ |
|
3544 | 1134 |
newValue := newValue copyReplaceString:'data4' |
3675 | 1135 |
withString:(tempArguments valueAt:3) storeString. "/ was: keyAt:3 |
3024 | 1136 |
]. |
1137 |
(tempArguments size) > 3 ifTrue:[ |
|
1138 |
self halt:'unimplemented'. |
|
1139 |
]. |
|
3544 | 1140 |
" newValue:= value copyReplaceString: 'data3' withString:(self messageAnswer key). " |
3024 | 1141 |
newValue := newValue , ' --> ' , (tempAnswer key). |
1142 |
newValue replaceAll:Character cr with:Character space. |
|
3773 | 1143 |
resultArrayOrErrorString at:key put:newValue. |
3024 | 1144 |
]. |
3773 | 1145 |
self resultHolder value:resultArrayOrErrorString. |
3024 | 1146 |
resultSelectors := mf selectors. |
1147 |
receiver := tempReceiver |
|
1532 | 1148 |
|
2859 | 1149 |
"Modified: / 26-09-2011 / 12:42:28 / cg" |
3544 | 1150 |
"Modified: / 27-02-2018 / 11:37:58 / stefan" |
3695 | 1151 |
"Modified: / 18-07-2019 / 21:57:12 / Claus Gittinger" |
1152 |
! |
|
1153 |
||
1154 |
search2Levels |
|
1155 |
"Do an exhaustive search. |
|
1156 |
Given the original message, |
|
1157 |
try applying all unary messages first to the receiver, |
|
1158 |
then to each argument. |
|
3770 | 1159 |
This takes O(N²) time - so be prepared" |
3695 | 1160 |
|
1161 |
|tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf| |
|
1162 |
||
1163 |
tempArguments := self argumentEditorsContents. |
|
1164 |
tempReceiver := self receiverEditorContents. |
|
1165 |
tempAnswer := self messageAnswerEditorContents. |
|
1166 |
||
1167 |
receiverWithArgument := self mergeReceiver:(tempReceiver value) |
|
1168 |
withArgument:(tempArguments values). |
|
3768 | 1169 |
anArray := Array |
1170 |
with:receiverWithArgument; |
|
1171 |
with:tempAnswer value. |
|
1172 |
||
3695 | 1173 |
"an array now holds the following array #(#(receiver argument) answer) or #(#(receiver) answer). |
1174 |
which should be suitable input for the method finder." |
|
1175 |
self withCursor:Cursor execute do:[ |
|
1176 |
mf := MethodFinder new. |
|
3768 | 1177 |
mf load:anArray. |
1178 |
resultArray := mf findMessage. |
|
3695 | 1179 |
]. |
1180 |
||
3768 | 1181 |
(resultArray isString "(resultArray at:1) includesSubString:'no single'") ifTrue:[ |
3695 | 1182 |
(self confirm:(c'%1\nTry a more exhaustive search (may take long)?' bindWith:(resultArray at:1))) |
1183 |
ifTrue:[ |
|
1184 |
self search2Levels. |
|
1185 |
]. |
|
1186 |
^ self |
|
1187 |
]. |
|
1188 |
||
1189 |
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments" |
|
1190 |
resultArray |
|
1191 |
keysAndValuesDo:[:key :value | |
|
1192 |
|newValue| |
|
1193 |
||
1194 |
newValue := value copyReplaceString:'data1' |
|
1195 |
withString:(tempReceiver value storeString). "/ was: "tempReceiver key" |
|
1196 |
(tempArguments size) >= 1 ifTrue:[ |
|
1197 |
newValue := newValue copyReplaceString:'data2' |
|
1198 |
withString:(tempArguments valueAt:1) storeString "/ was "keyAt:1" |
|
1199 |
]. |
|
1200 |
(tempArguments size) > 1 ifTrue:[ |
|
1201 |
newValue := newValue copyReplaceString:'data3' |
|
1202 |
withString:(tempArguments valueAt:2) storeString. "/ was "keyAt:2" |
|
1203 |
]. |
|
1204 |
(tempArguments size) > 2 ifTrue:[ |
|
1205 |
newValue := newValue copyReplaceString:'data4' |
|
1206 |
withString:(tempArguments valueAt:3) storeString. "/ was: keyAt:3 |
|
1207 |
]. |
|
1208 |
(tempArguments size) > 3 ifTrue:[ |
|
1209 |
self halt:'unimplemented'. |
|
1210 |
]. |
|
1211 |
" newValue:= value copyReplaceString: 'data3' withString:(self messageAnswer key). " |
|
1212 |
newValue := newValue , ' --> ' , (tempAnswer key). |
|
1213 |
newValue replaceAll:Character cr with:Character space. |
|
1214 |
resultArray at:key put:newValue. |
|
1215 |
]. |
|
1216 |
self resultHolder value:resultArray. |
|
1217 |
resultSelectors := mf selectors. |
|
1218 |
receiver := tempReceiver |
|
1219 |
||
1220 |
"Created: / 18-07-2019 / 21:22:47 / Claus Gittinger" |
|
1532 | 1221 |
! |
1222 |
||
3768 | 1223 |
searchPatternMatches:pattern |
1224 |
"Do a search based on the pattern match" |
|
1225 |
||
1226 |
|list counts firsts seconds selectors resultList idx match| |
|
1227 |
||
1228 |
self withCursor:Cursor execute do:[ |
|
1229 |
pattern includesMatchCharacters ifFalse:[ |
|
1230 |
list := SystemBrowser findImplementorsOf:pattern in:Smalltalk allClasses ignoreCase:true. |
|
1231 |
list isEmptyOrNil ifTrue:[ |
|
1232 |
match := pattern,'*'. |
|
1233 |
list := SystemBrowser findImplementorsMatching:match in:Smalltalk allClasses ignoreCase:true. |
|
1234 |
]. |
|
1235 |
] ifTrue:[ |
|
1236 |
match := pattern. |
|
1237 |
list := SystemBrowser findImplementorsMatching:match in:Smalltalk allClasses ignoreCase:true. |
|
1238 |
]. |
|
1239 |
]. |
|
1240 |
||
1241 |
counts := IdentityDictionary new. |
|
1242 |
firsts := IdentityDictionary new. |
|
1243 |
seconds := IdentityDictionary new. |
|
1244 |
selectors := IdentitySet new. |
|
1245 |
list do:[:eachMethod | |
|
1246 |
|msel| |
|
1247 |
||
1248 |
msel := eachMethod selector. |
|
1249 |
selectors add:msel. |
|
1250 |
(counts at:msel ifAbsentPut:[ 0 asValue ]) increment. |
|
1251 |
(firsts includesKey:msel) ifTrue:[ |
|
1252 |
(seconds includesKey:msel) ifFalse:[ |
|
1253 |
seconds at:msel ifAbsentPut:[ eachMethod mclass ]. |
|
1254 |
]. |
|
1255 |
] ifFalse:[ |
|
1256 |
firsts at:msel ifAbsentPut:[ eachMethod mclass ]. |
|
1257 |
]. |
|
1258 |
]. |
|
1259 |
resultSelectors := selectors asOrderedCollection sort. |
|
1260 |
resultList := resultSelectors |
|
1261 |
collect:[:sel | |
|
1262 |
|cnt s| |
|
1263 |
||
1264 |
s := sel allBold , ' --> '. |
|
1265 |
cnt := (counts at:sel) value. |
|
1266 |
cnt == 1 ifTrue:[ |
|
1267 |
s , (firsts at:sel) name |
|
1268 |
] ifFalse:[ |
|
1269 |
cnt == 2 ifTrue:[ |
|
1270 |
s , (firsts at:sel) name , ' and ' , (seconds at:sel) name |
|
1271 |
] ifFalse:[ |
|
1272 |
s , cnt printString , ' implementor(s)' |
|
1273 |
] |
|
1274 |
]. |
|
1275 |
]. |
|
1276 |
||
1277 |
self enqueueDelayedAction:[ self updateListAfterPatternSearch: resultList ]. |
|
1278 |
||
1279 |
"Created: / 01-06-2012 / 13:16:54 / cg" |
|
1280 |
! |
|
1281 |
||
3023 | 1282 |
searchPatternMatchesInBackground |
1283 |
"Do a search based on the pattern match as a background task" |
|
2886 | 1284 |
|
3023 | 1285 |
| p pattern| |
2891 | 1286 |
|
1287 |
(p := searchProcess) notNil ifTrue:[ |
|
1288 |
searchProcess := nil. |
|
1289 |
p terminate. |
|
1290 |
]. |
|
1291 |
||
3292 | 1292 |
pattern := self selectorPatternHolder value. |
3023 | 1293 |
pattern isEmptyOrNil ifTrue:[ |
1294 |
self resultHolder value:self resultInfoText. |
|
3777 | 1295 |
self classOfResultListHolder value:nil. |
3023 | 1296 |
self codeHolder value:nil. |
1297 |
^ self |
|
1298 |
]. |
|
1299 |
||
2891 | 1300 |
searchProcess := |
1301 |
[ |
|
3768 | 1302 |
self searchPatternMatches:pattern. |
2891 | 1303 |
] fork. |
1304 |
||
1305 |
"Created: / 01-06-2012 / 13:16:54 / cg" |
|
1306 |
! |
|
1307 |
||
3766 | 1308 |
selectedImplementorChanged |
1309 |
self updateImplementorsOf:selectedImplementorsHolder value |
|
1310 |
! |
|
1311 |
||
1522 | 1312 |
updateImplementorsOf:anInteger |
3777 | 1313 |
"Request the implementors of the selected argument provided by aNumber (index in list). |
2892 | 1314 |
Return the receiver." |
1315 |
||
3777 | 1316 |
|methods classList classNameList aNumber| |
1525 | 1317 |
|
3777 | 1318 |
(anInteger isNil or:[anInteger == 0]) ifTrue:[ |
2892 | 1319 |
^ self |
1320 |
]. |
|
3777 | 1321 |
|
3646 | 1322 |
aNumber := anInteger ? 1. |
2892 | 1323 |
methods := SystemBrowser |
3777 | 1324 |
findImplementorsOf:(resultSelectors at:aNumber) |
1325 |
in:Smalltalk allClasses |
|
1326 |
ignoreCase:false. |
|
3675 | 1327 |
methods := methods asOrderedCollection. |
1328 |
classList := methods collect:[:m | m mclass name , ' ' , m selector ]. |
|
3777 | 1329 |
classList := self markMatchingClasses:(resultSelectors at:aNumber) classesWithSelector:classList. |
1330 |
||
1331 |
classNameList := classList with:methods collect:[:s1 :m | s1 , ' ' , ('{' , m category , '}') allGray ]. |
|
1332 |
||
3675 | 1333 |
"/ now classList contains a list of <className> <selector>, |
1334 |
"/ where the one which is responsible for the selected result is marked (bold) |
|
3777 | 1335 |
self classOfResultListHolder value:classList. |
1336 |
self classOfResultNameListHolder value:classNameList. |
|
3675 | 1337 |
|
1338 |
"/ initially select the bold one |
|
1339 |
classList notEmptyOrNil ifTrue:[ |
|
3777 | 1340 |
|idx receiversMethodEntryInClass| |
1341 |
||
1342 |
idx := classList findFirst:#isText. |
|
1343 |
idx == 0 ifTrue:[ |
|
1344 |
"/ not found; select the first |
|
1345 |
idx := 1. |
|
1346 |
]. |
|
3675 | 1347 |
receiversMethodEntryInClass := classList detect:#isText ifNone:nil. |
3777 | 1348 |
self selectedClassOfResultIndexHolder value:idx. |
1349 |
self selectedClassOfResultIndexHolderChanged. |
|
2892 | 1350 |
] ifFalse:[ |
3777 | 1351 |
self selectedClassOfResultIndexHolder value:nil. |
2892 | 1352 |
]. |
1522 | 1353 |
|
2892 | 1354 |
"Modified (comment): / 24-06-2012 / 18:41:45 / cg" |
3675 | 1355 |
"Modified: / 08-06-2019 / 15:39:49 / Claus Gittinger" |
2891 | 1356 |
! |
1357 |
||
3292 | 1358 |
updateListAfterPatternSearch:resultList |
1359 |
|searchPattern idx| |
|
1360 |
||
3777 | 1361 |
self classOfResultListHolder value:nil. |
2892 | 1362 |
self codeHolder value:nil. |
3023 | 1363 |
self resultHolder value:resultList. |
2891 | 1364 |
|
3292 | 1365 |
searchPattern := self selectorPatternHolder value. |
1366 |
"/ is the search pattern in the list (i.e. a perfect match)? |
|
1367 |
"/ Then select it. |
|
3769 | 1368 |
idx := resultSelectors indexOf:searchPattern. |
3292 | 1369 |
idx ~~ 0 ifTrue:[ |
1370 |
self selectedImplementorsHolder setValue:idx; changed |
|
1371 |
]. |
|
1522 | 1372 |
! ! |
1373 |
||
1374 |
!MethodFinderWindow methodsFor:'aspects'! |
|
1375 |
||
1376 |
arg1BoxVisible |
|
3292 | 1377 |
"Determines if the box should be visible or not. |
1378 |
Return a holder providing true or false" |
|
1379 |
||
1522 | 1380 |
arg1BoxVisible isNil ifTrue:[ |
1381 |
arg1BoxVisible := BlockValue |
|
3665 | 1382 |
with:[:vh | vh >= 2 ] |
1522 | 1383 |
argument:(self argCountHolder) |
1384 |
]. |
|
1385 |
^ arg1BoxVisible. |
|
3665 | 1386 |
|
1387 |
"Modified: / 17-05-2019 / 16:16:59 / Stefan Vogel" |
|
1522 | 1388 |
! |
1389 |
||
1390 |
arg2BoxVisible |
|
3292 | 1391 |
"Determines if the box should be visible or not. |
1392 |
Return a holder providing true or false" |
|
1393 |
||
1522 | 1394 |
arg2BoxVisible isNil ifTrue:[ |
1395 |
arg2BoxVisible := BlockValue |
|
3665 | 1396 |
with:[:vh | vh >= 3 ] |
1522 | 1397 |
argument:(self argCountHolder) |
1398 |
]. |
|
1399 |
^ arg2BoxVisible. |
|
3665 | 1400 |
|
1401 |
"Modified: / 17-05-2019 / 16:16:54 / Stefan Vogel" |
|
1522 | 1402 |
! |
1403 |
||
1404 |
arg3BoxVisible |
|
3292 | 1405 |
"Determines if the box should be visible or not. |
1406 |
Return a holder providing true or false" |
|
1407 |
||
1522 | 1408 |
arg3BoxVisible isNil ifTrue:[ |
1409 |
arg3BoxVisible := BlockValue |
|
3665 | 1410 |
with:[:vh | vh >= 4 ] |
1522 | 1411 |
argument:(self argCountHolder) |
1412 |
]. |
|
1413 |
^ arg3BoxVisible. |
|
3665 | 1414 |
|
1415 |
"Modified: / 17-05-2019 / 16:16:48 / Stefan Vogel" |
|
1522 | 1416 |
! |
1417 |
||
1418 |
arg4BoxVisible |
|
3292 | 1419 |
"Determines if the box should be visible or not. |
1420 |
Return a holder providing true or false" |
|
1421 |
||
1522 | 1422 |
arg4BoxVisible isNil ifTrue:[ |
1423 |
arg4BoxVisible := BlockValue |
|
3665 | 1424 |
with:[:vh | vh >= 5 ] |
1522 | 1425 |
argument:(self argCountHolder) |
1426 |
]. |
|
1427 |
^ arg4BoxVisible. |
|
3665 | 1428 |
|
1429 |
"Modified: / 17-05-2019 / 16:16:43 / Stefan Vogel" |
|
1522 | 1430 |
! |
1431 |
||
1432 |
argCountHolder |
|
3292 | 1433 |
"Return an argCounterHolder which is initialized at 2." |
1434 |
||
1522 | 1435 |
argCountHolder isNil ifTrue:[ |
1436 |
argCountHolder := 2 asValue. |
|
1437 |
]. |
|
1438 |
^ argCountHolder. |
|
1439 |
! |
|
1440 |
||
1441 |
argCountList |
|
3292 | 1442 |
"Return the argCountList (shown in the combo)" |
1443 |
||
1522 | 1444 |
argCountList isNil ifTrue:[ |
1445 |
argCountList := #('0 arguments' '1 argument' '2 arguments' '3 arguments') asValue |
|
1446 |
]. |
|
1447 |
^ argCountList. |
|
1448 |
! |
|
1449 |
||
3777 | 1450 |
classOfResultListHolder |
1525 | 1451 |
"Return a valueHolder which contains a collection with the names of the |
1452 |
implementors of a specific message. " |
|
1522 | 1453 |
|
3777 | 1454 |
classOfResultListHolder isNil ifTrue:[ |
1455 |
classOfResultListHolder := ValueHolder new. |
|
1522 | 1456 |
]. |
3777 | 1457 |
^ classOfResultListHolder |
1458 |
! |
|
1459 |
||
1460 |
classOfResultNameListHolder |
|
1461 |
"Return a valueHolder which contains a collection with the names of the |
|
1462 |
implementors of a specific message with cateogy. |
|
1463 |
This is shown in the list view" |
|
1464 |
||
1465 |
classOfResultNameListHolder isNil ifTrue:[ |
|
1466 |
classOfResultNameListHolder := ValueHolder new. |
|
1467 |
]. |
|
1468 |
^ classOfResultNameListHolder |
|
1522 | 1469 |
! |
1470 |
||
1532 | 1471 |
codeHolder |
1472 |
codeHolder isNil ifTrue:[ |
|
1473 |
codeHolder := '' asValue. |
|
1474 |
]. |
|
1475 |
^ codeHolder. |
|
1476 |
||
1477 |
"Created: / 13.11.2001 / 12:44:11 / cg" |
|
1478 |
! |
|
1479 |
||
3292 | 1480 |
codeViewClass |
1481 |
"the species of view to be created as codeview" |
|
1482 |
||
1483 |
^ Tools::CodeView2 ? CodeView |
|
1484 |
! |
|
1485 |
||
1522 | 1486 |
resultHolder |
1525 | 1487 |
"Return a value holder which contains the results of a search as a collection." |
1522 | 1488 |
|
3292 | 1489 |
resultHolder isNil ifTrue:[ |
1490 |
resultHolder := ValueHolder new. |
|
1491 |
resultHolder value:(self resultInfoText collect:[:l | l withColor:Color darkGrey]). |
|
1522 | 1492 |
]. |
3292 | 1493 |
^ resultHolder. |
2886 | 1494 |
|
2890 | 1495 |
"Modified: / 01-06-2012 / 13:06:02 / cg" |
1529 | 1496 |
! |
1497 |
||
3023 | 1498 |
resultInfoText |
1499 |
^ { |
|
1500 |
'Please enter combination of' . |
|
1501 |
' ',('receiver, arg and result' allBold) . |
|
1502 |
'or a'. |
|
1503 |
' ',('selector search pattern' allBold) . |
|
3289 | 1504 |
'into the above fields.' . |
1505 |
'Then click on either ',('"search"' allBold),'-button.' |
|
3023 | 1506 |
} |
1507 |
! |
|
1508 |
||
3777 | 1509 |
selectedClassOfResultIndexHolder |
2927 | 1510 |
"valueHolder which contains the index of the selected result class (right list)" |
1529 | 1511 |
|
3777 | 1512 |
selectedClassOfResultIndexHolder isNil ifTrue:[ |
1513 |
selectedClassOfResultIndexHolder := ValueHolder new. |
|
1529 | 1514 |
]. |
3777 | 1515 |
^ selectedClassOfResultIndexHolder |
2927 | 1516 |
|
1517 |
"Modified (comment): / 21-09-2012 / 11:10:29 / cg" |
|
1518 |
! |
|
1519 |
||
1520 |
selectedImplementorsHolder |
|
1521 |
"valueHolder which contains the index of the selected implementors list (left list)" |
|
1522 |
||
3292 | 1523 |
selectedImplementorsHolder isNil ifTrue:[ |
1524 |
selectedImplementorsHolder := ValueHolder new. |
|
3766 | 1525 |
selectedImplementorsHolder onChangeSend:#selectedImplementorChanged to:self. |
2927 | 1526 |
]. |
3292 | 1527 |
^ selectedImplementorsHolder |
2927 | 1528 |
|
1529 |
"Created: / 21-09-2012 / 11:10:13 / cg" |
|
2886 | 1530 |
! |
1531 |
||
3292 | 1532 |
selectorPatternHolder |
1533 |
selectorPatternHolder isNil ifTrue:[ |
|
1534 |
selectorPatternHolder := ValueHolder new. |
|
1535 |
selectorPatternHolder onChangeSend:#selectorPatternChanged to:self. |
|
2886 | 1536 |
]. |
3292 | 1537 |
^ selectorPatternHolder |
2886 | 1538 |
|
1539 |
"Created: / 27-04-2012 / 14:44:01 / cg" |
|
1522 | 1540 |
! ! |
1541 |
||
1542 |
!MethodFinderWindow methodsFor:'controlInput'! |
|
1543 |
||
3090 | 1544 |
cleanInputs:aDirtyString |
3777 | 1545 |
"Find and remove common mistakes made by the user. |
1546 |
Return the 'aStringToBeCleaned' variable" |
|
3090 | 1547 |
|
1548 |
|aStringToBeCleaned rs position| |
|
1522 | 1549 |
|
3090 | 1550 |
aStringToBeCleaned := aDirtyString. |
1551 |
(aStringToBeCleaned endsWith:(Character cr)) ifTrue:[ |
|
1552 |
aStringToBeCleaned := aStringToBeCleaned copyFrom:1 to:(aStringToBeCleaned size - 1). |
|
1553 |
]. |
|
1554 |
aStringToBeCleaned := aStringToBeCleaned withoutSeparators. |
|
1555 |
rs := ReadStream on:aStringToBeCleaned. |
|
1556 |
[ |
|
1557 |
rs upToAll_positionBefore:'#true'. |
|
1558 |
rs atEnd |
|
1559 |
] whileFalse:[ |
|
1560 |
position := rs position. |
|
1561 |
aStringToBeCleaned := aStringToBeCleaned |
|
1562 |
copyReplaceFrom:position |
|
1563 |
to:position |
|
1564 |
with:''. |
|
1565 |
rs := ReadStream on:aStringToBeCleaned. |
|
1566 |
]. |
|
1567 |
rs := ReadStream on:aStringToBeCleaned. |
|
1568 |
[ |
|
1569 |
rs upToAll_positionBefore:'#false'. |
|
1570 |
rs atEnd |
|
1571 |
] whileFalse:[ |
|
1572 |
position := rs position. |
|
1573 |
aStringToBeCleaned := aStringToBeCleaned |
|
1574 |
copyReplaceFrom:position |
|
1575 |
to:position |
|
1576 |
with:''. |
|
1577 |
rs := ReadStream on:aStringToBeCleaned. |
|
1578 |
]. |
|
1579 |
[ |
|
1580 |
rs upToAll_positionBefore:'#nil'. |
|
1581 |
rs atEnd |
|
1582 |
] whileFalse:[ |
|
1583 |
position := rs position. |
|
1584 |
aStringToBeCleaned := aStringToBeCleaned |
|
1585 |
copyReplaceFrom:position |
|
1586 |
to:position |
|
1587 |
with:''. |
|
1588 |
rs := ReadStream on:aStringToBeCleaned. |
|
1589 |
]. |
|
1590 |
^ aStringToBeCleaned |
|
1522 | 1591 |
! |
1592 |
||
3315 | 1593 |
markMatchingClasses:aSelector classesWithSelector:anOrderedCollection |
3090 | 1594 |
" Matches the class of the receiver with all the elements in anOrderedCollection |
1595 |
(which are classes with selectors). If a match is found it is marked with an asterisk. |
|
3315 | 1596 |
The classes are then sorted so the asterisk appears first. Return the |
3090 | 1597 |
markedClassList." |
1598 |
||
3675 | 1599 |
|marker recClass unmarkedClassList markedClassList toMark| |
1522 | 1600 |
|
3090 | 1601 |
marker := self class markerForImplementingClass. |
1602 |
recClass := receiver value class. |
|
3675 | 1603 |
|
1604 |
toMark := OrderedCollection new. |
|
1605 |
||
3090 | 1606 |
unmarkedClassList := anOrderedCollection copy. |
3315 | 1607 |
unmarkedClassList do:[:classAndMethod | |
3290 | 1608 |
|className class sel| |
1532 | 1609 |
|
3675 | 1610 |
className := (classAndMethod copyButLast:aSelector size) withoutSeparators. |
3290 | 1611 |
class := Smalltalk classNamed:className. "/ Compiler evaluate:className. |
3315 | 1612 |
|
3090 | 1613 |
"/ (recClass == class) |
3315 | 1614 |
|
3090 | 1615 |
(recClass whichClassImplements:aSelector) == class ifTrue:[ |
3675 | 1616 |
toMark add:classAndMethod. |
1532 | 1617 |
]. |
3090 | 1618 |
]. |
3675 | 1619 |
unmarkedClassList removeAll:toMark. |
1620 |
unmarkedClassList addAll:(toMark collect:#allBold). |
|
1621 |
||
3315 | 1622 |
unmarkedClassList |
1623 |
sort:[:a :b | |
|
3090 | 1624 |
|rawA rawB| |
1522 | 1625 |
|
3090 | 1626 |
rawA := a string withoutPrefix:marker. |
1627 |
rawB := b string withoutPrefix:marker. |
|
1628 |
rawA < rawB. |
|
1629 |
]. |
|
1630 |
markedClassList := unmarkedClassList. |
|
1631 |
^ markedClassList |
|
1532 | 1632 |
|
3675 | 1633 |
"Modified: / 13-11-2001 / 12:16:05 / cg" |
1634 |
"Modified: / 08-06-2019 / 15:36:30 / Claus Gittinger" |
|
1522 | 1635 |
! |
1636 |
||
3292 | 1637 |
mergeReceiver: aReceiver withArgument: arguments |
1522 | 1638 |
|
3763 | 1639 |
"Puts the receiver and arguments into an array so it can be of a suitable input for the |
1640 |
MethodFinder. Return an array." |
|
1525 | 1641 |
|
3763 | 1642 |
| tempReceiver tempArguments nTempArgs | |
1522 | 1643 |
|
3763 | 1644 |
tempReceiver:= aReceiver. |
1645 |
tempArguments := arguments. |
|
1646 |
nTempArgs := tempArguments size. |
|
1522 | 1647 |
|
3763 | 1648 |
nTempArgs == 0 ifTrue:[ |
1649 |
^ { tempReceiver } |
|
1650 |
]. |
|
1651 |
(nTempArgs == 1) ifTrue:[ |
|
1652 |
^ { tempReceiver . (tempArguments at:1) } "a receiver with an argument" |
|
1653 |
]. |
|
1654 |
(nTempArgs == 2) ifTrue:[ |
|
1655 |
^ { tempReceiver . (tempArguments at:1) . (tempArguments at:2) } "a receiver with 2 arguments" |
|
1656 |
]. |
|
1657 |
(nTempArgs == 3) ifTrue:[ |
|
1658 |
^ { tempReceiver . (tempArguments at:1) . (tempArguments at:2) . (tempArguments at:3) } " 3 args" |
|
1659 |
]. |
|
1660 |
^ nil |
|
1522 | 1661 |
! ! |
1662 |
||
3292 | 1663 |
!MethodFinderWindow methodsFor:'initialization'! |
1664 |
||
1665 |
argument1WidgetCreated: aWidget |
|
1666 |
"UI post creation hook. remember the widget as an instance variable." |
|
1667 |
||
1668 |
argument1Editor := aWidget scrolledView. |
|
1669 |
aWidget tabMeansNextField:true. |
|
1670 |
||
1671 |
"Modified: / 13.11.2001 / 12:21:41 / cg" |
|
1672 |
! |
|
1673 |
||
1674 |
argument2WidgetCreated: aWidget |
|
1675 |
"UI post creation hook. remember the widget as an instance variable." |
|
1676 |
||
1677 |
argument2Editor := aWidget scrolledView. |
|
1678 |
aWidget tabMeansNextField:true. |
|
1679 |
||
1680 |
"Modified: / 13.11.2001 / 12:21:45 / cg" |
|
1681 |
! |
|
1682 |
||
1683 |
argument3WidgetCreated: aWidget |
|
1684 |
"UI post creation hook. remember the widget as an instance variable" |
|
1685 |
||
1686 |
argument3Editor := aWidget scrolledView. |
|
1687 |
aWidget tabMeansNextField:true. |
|
1688 |
||
1689 |
"Modified: / 13.11.2001 / 12:21:49 / cg" |
|
1690 |
! |
|
1691 |
||
1692 |
messageAnswerWidgetCreated: aWidget |
|
1693 |
"UI post creation hook. remember the widget as an instance variable." |
|
1694 |
||
1695 |
messageAnswerEditor := aWidget scrolledView. |
|
1696 |
aWidget tabMeansNextField:true. |
|
1697 |
||
1698 |
"Modified: / 13.11.2001 / 12:24:55 / cg" |
|
1699 |
! |
|
1700 |
||
1701 |
receiverWidgetCreated: aWidget |
|
1702 |
"UI post creation hook. remember the widget as an instance variable." |
|
1703 |
||
1704 |
receiverEditor := aWidget scrolledView. |
|
1705 |
aWidget tabMeansNextField:true. |
|
1706 |
||
1707 |
"Modified: / 13.11.2001 / 12:24:49 / cg" |
|
1708 |
! |
|
1709 |
||
1710 |
sourceCodeWidgetCreated: aWidget |
|
1711 |
"UI post creation hook. make the codeView readonly" |
|
1712 |
||
1713 |
aWidget acceptAction:nil. |
|
1714 |
aWidget readOnly:true |
|
1715 |
||
1716 |
"Created: / 13.11.2001 / 12:50:27 / cg" |
|
1717 |
"Modified: / 13.11.2001 / 12:51:23 / cg" |
|
1718 |
! ! |
|
1719 |
||
3697 | 1720 |
!MethodFinderWindow methodsFor:'menu actions - help'! |
1532 | 1721 |
|
1722 |
aboutThisApplicationText |
|
1723 |
|msg| |
|
1724 |
||
1725 |
msg := super aboutThisApplicationText. |
|
3768 | 1726 |
msg := msg , self aboutThisApplicationText2. |
1727 |
^msg withCRs. |
|
1728 |
||
1729 |
"Modified: / 13.11.2001 / 12:56:44 / cg" |
|
1730 |
! |
|
1731 |
||
1732 |
aboutThisApplicationText2 |
|
1733 |
^ '\\Original written by Ted Kaehler, Scott Wallace and Dan Ingalls. |
|
3292 | 1734 |
Ported from Squeak to ST/X by James Hayes (2001 james@exept.de). |
1735 |
Improved by Claus Gittinger. |
|
1736 |
'. |
|
3768 | 1737 |
|
3292 | 1738 |
! |
1739 |
||
1740 |
openHTMLDocumentation |
|
1741 |
"about/help menu action" |
|
1742 |
||
1743 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#METHODFINDER' |
|
1744 |
! ! |
|
1745 |
||
1746 |
!MethodFinderWindow methodsFor:'private'! |
|
1747 |
||
3777 | 1748 |
argStringAndValueFromEditorContents:editorContents |
1749 |
|associationKey associationValue| |
|
1750 |
||
1751 |
associationValue := Compiler |
|
1752 |
evaluate:editorContents |
|
1753 |
ifFail:[ |
|
1754 |
Dialog information:'Bad value in the answer field'. |
|
1755 |
AbortOperationRequest raise. |
|
1756 |
]. |
|
1757 |
((self isExpression:editorContents) or:[ associationValue isNil]) ifTrue:[ |
|
1758 |
"looks if an expression is typed in" |
|
1759 |
associationKey := associationValue printString |
|
1760 |
] ifFalse:[ |
|
1761 |
associationKey := editorContents |
|
1762 |
]. |
|
1763 |
^ (associationKey -> associationValue). |
|
1764 |
! |
|
1765 |
||
3292 | 1766 |
argumentEditorsContents |
3766 | 1767 |
"Determine how many text editors of the arguments are used and store the result |
3777 | 1768 |
as argCounter. The result being the minimum between how many editors have |
1769 |
expressions in and how many are displayed. |
|
3292 | 1770 |
|
3777 | 1771 |
Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary |
1772 |
from each of the text editors. |
|
3292 | 1773 |
|
3777 | 1774 |
Return the OrderedDictionary with the expressions from all the text editors. " |
3292 | 1775 |
|
3777 | 1776 |
| tempArguments argCounter |
1777 |
tempArgument1EditorContents tempArgument2EditorContents tempArgument3EditorContents | |
|
3766 | 1778 |
|
1779 |
argCounter:=0. |
|
3292 | 1780 |
|
3777 | 1781 |
tempArgument1EditorContents := (self cleanInputs: argument1Editor contents). |
1782 |
tempArgument2EditorContents := (self cleanInputs: argument2Editor contents). |
|
1783 |
tempArgument3EditorContents := (self cleanInputs: argument3Editor contents). |
|
3766 | 1784 |
|
3777 | 1785 |
tempArgument1EditorContents = '' ifFalse:[argCounter := argCounter +1]. |
1786 |
tempArgument2EditorContents = '' ifFalse:[argCounter := argCounter +1]. |
|
1787 |
tempArgument3EditorContents = '' ifFalse:[argCounter := argCounter +1]. |
|
3766 | 1788 |
|
1789 |
argCounter:= (argCounter min: (self argCountHolder value -1)). |
|
1790 |
tempArguments:= OrderedDictionary new:argCounter. |
|
3292 | 1791 |
|
3766 | 1792 |
(argCounter value >= 1) ifTrue:[ |
3777 | 1793 |
tempArguments add:(self argStringAndValueFromEditorContents:tempArgument1EditorContents) |
3766 | 1794 |
]. |
1795 |
(argCounter value >= 2) ifTrue:[ |
|
3777 | 1796 |
tempArguments add:(self argStringAndValueFromEditorContents:tempArgument2EditorContents) |
3766 | 1797 |
]. |
1798 |
(argCounter value >= 3) ifTrue:[ |
|
3777 | 1799 |
tempArguments add:(self argStringAndValueFromEditorContents:tempArgument3EditorContents) |
3766 | 1800 |
]. |
3292 | 1801 |
|
1802 |
||
3766 | 1803 |
^tempArguments |
3292 | 1804 |
! |
1805 |
||
1806 |
extractClassAndSelectorFrom:anArgument |
|
3777 | 1807 |
"extracts the class and selector from a list entry, |
1808 |
which contains the classname and selector sep'd by a space. |
|
1809 |
Return an association" |
|
3292 | 1810 |
|
1811 |
|aClass aSelector x theArgument marker| |
|
1812 |
||
1813 |
anArgument isNil ifTrue:[ |
|
1814 |
^ nil |
|
1815 |
]. |
|
1816 |
marker := self class markerForImplementingClass. |
|
1817 |
||
1818 |
theArgument := anArgument string withoutPrefix:marker. |
|
1819 |
aClass := theArgument copyUpTo:(Character space). |
|
1820 |
x := aClass size + 2. |
|
1821 |
aSelector := theArgument copyFrom:x. |
|
1822 |
aClass := Smalltalk classNamed:aClass. |
|
1823 |
(aSelector startsWith:'class ') ifTrue:[ |
|
1824 |
aSelector := aSelector withoutPrefix:'class '. |
|
1825 |
aClass := aClass class. |
|
1826 |
]. |
|
1827 |
^ aClass -> aSelector asSymbol |
|
1828 |
||
3777 | 1829 |
" |
1830 |
MethodFinderWindow new extractClassAndSelectorFrom: '*SmallInteger +' |
|
1831 |
MethodFinderWindow new extractClassAndSelectorFrom: 'String ,' |
|
1832 |
MethodFinderWindow new extractClassAndSelectorFrom: 'Number detentBy:atMultiplesOf:snap:' |
|
1833 |
" |
|
3292 | 1834 |
|
1835 |
"Modified: / 27-04-2012 / 15:05:53 / cg" |
|
1836 |
! |
|
1837 |
||
1838 |
isExpression:aString |
|
1839 |
"Return true or false depending on if the subString includes certain characters" |
|
3777 | 1840 |
|
1841 |
|tree| |
|
1842 |
||
1843 |
Error ignoreIn:[ |
|
1844 |
tree := Parser parseExpression:aString. |
|
1845 |
^ tree isMessage |
|
1846 |
]. |
|
1847 |
||
3292 | 1848 |
"/ cg: this is naive - why not ask the parser, if it is a literal? |
1849 |
(aString includesSubString:': ') ifTrue:[ |
|
1850 |
^ true |
|
1851 |
]. |
|
1852 |
(aString includes:$+) ifTrue:[ |
|
1853 |
^ true |
|
1854 |
]. |
|
1855 |
(aString includes:$-) ifTrue:[ |
|
1856 |
^ true |
|
1857 |
]. |
|
1858 |
(aString includes:$*) ifTrue:[ |
|
1859 |
^ true |
|
1860 |
]. |
|
1861 |
(aString includes:$/) ifTrue:[ |
|
1862 |
^ true |
|
1863 |
]. |
|
1864 |
(aString includes:$>) ifTrue:[ |
|
1865 |
^ true |
|
1866 |
]. |
|
1867 |
(aString includes:$<) ifTrue:[ |
|
1868 |
^ true |
|
1869 |
]. |
|
1870 |
(aString includesSubString:' new') ifTrue:[ |
|
1871 |
^ true |
|
1872 |
]. |
|
1873 |
(aString includes:$[) |
|
1874 |
& (aString includes:$]) |
|
1875 |
& (aString includes:$.) ifTrue:[ ^ false ]. |
|
1876 |
||
1877 |
(aString includes:$.) ifTrue:[ |
|
1878 |
^ true |
|
1879 |
]. |
|
1880 |
^ false |
|
1881 |
! |
|
1882 |
||
1883 |
receiverEditorContents |
|
1884 |
"Return a cleaned up version of receiver taken from the receiverEditor |
|
3322 | 1885 |
as an association. The association has aCleanedReceiverString as a key and the |
3292 | 1886 |
compiledReceiver as value." |
3322 | 1887 |
|
1888 |
|aCleanedReceiverString compiledReceiver| |
|
3292 | 1889 |
|
3322 | 1890 |
aCleanedReceiverString := self cleanInputs:(receiverEditor contents). |
3777 | 1891 |
|
1892 |
"/ allow C-style integers |
|
1893 |
"/ (now supported by compiler) |
|
1894 |
"/ (aCleanedReceiverString startsWith:'0b') ifTrue:[ |
|
1895 |
"/ aCleanedReceiverString := '2r',(aCleanedReceiverString withoutPrefix:'0b') |
|
1896 |
"/ ] ifFalse:[ |
|
1897 |
"/ (aCleanedReceiverString startsWith:'0x') ifTrue:[ |
|
1898 |
"/ aCleanedReceiverString := '16r',(aCleanedReceiverString withoutPrefix:'0x') |
|
1899 |
"/ ] ifFalse:[ |
|
1900 |
"/ (aCleanedReceiverString startsWith:'0o') ifTrue:[ |
|
1901 |
"/ aCleanedReceiverString := '8r',(aCleanedReceiverString withoutPrefix:'0o') |
|
1902 |
"/ ]. |
|
1903 |
"/ ]. |
|
1904 |
"/ ]. |
|
3322 | 1905 |
compiledReceiver := Compiler evaluate:aCleanedReceiverString. |
1906 |
((self isExpression:aCleanedReceiverString) or:[ compiledReceiver isNil ]) ifTrue:[ |
|
1907 |
aCleanedReceiverString := compiledReceiver printString |
|
3292 | 1908 |
]. |
3322 | 1909 |
^ aCleanedReceiverString -> compiledReceiver. |
3292 | 1910 |
! |
1911 |
||
1912 |
waitForBackgroundSearchFinished |
|
1913 |
| p | |
|
1914 |
||
1915 |
(p := searchProcess) isNil ifTrue:[^ self]. |
|
1916 |
p isDead ifTrue:[^ self]. |
|
1917 |
p waitUntilTerminated |
|
1918 |
! ! |
|
1919 |
||
1920 |
!MethodFinderWindow methodsFor:'user actions'! |
|
1921 |
||
3777 | 1922 |
selectedClassOfResultIndexHolderChanged |
1923 |
|selIdx sel classAndSelector mthd| |
|
3292 | 1924 |
|
3777 | 1925 |
selIdx := self selectedClassOfResultIndexHolder value. |
1926 |
selIdx isNil ifTrue:[^ self]. |
|
1927 |
||
1928 |
sel := classOfResultListHolder value at:selIdx. |
|
3292 | 1929 |
|
1930 |
classAndSelector := self extractClassAndSelectorFrom:sel. |
|
1931 |
classAndSelector isNil ifTrue:[ |
|
1932 |
^ self |
|
1933 |
]. |
|
3777 | 1934 |
|
3292 | 1935 |
mthd := classAndSelector key >> classAndSelector value. |
1936 |
mthd notNil ifTrue:[ |
|
1937 |
self withWaitCursorDo:[ |
|
1938 |
self codeHolder value:mthd source |
|
1939 |
] |
|
1940 |
] ifFalse:[ |
|
1941 |
self codeHolder value:nil |
|
1942 |
]. |
|
1943 |
||
1944 |
"Created: / 13.11.2001 / 12:43:43 / cg" |
|
1945 |
"Modified: / 13.11.2001 / 12:48:56 / cg" |
|
1946 |
! |
|
1947 |
||
1948 |
selectorPatternChanged |
|
1949 |
self searchPatternMatchesInBackground |
|
1950 |
||
1951 |
"Created: / 01-06-2012 / 13:18:16 / cg" |
|
1532 | 1952 |
! ! |
1953 |
||
1522 | 1954 |
!MethodFinderWindow class methodsFor:'documentation'! |
1955 |
||
1956 |
version |
|
1957 |
^ '$Header$' |
|
2730 | 1958 |
! |
1959 |
||
1960 |
version_CVS |
|
1961 |
^ '$Header$' |
|
1522 | 1962 |
! ! |
3003 | 1963 |