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