author | Claus Gittinger <cg@exept.de> |
Sun, 28 Jul 2019 01:09:11 +0200 | |
changeset 3741 | 373454460851 |
parent 3720 | 88345ce4ef2d |
child 3742 | e62cdf622315 |
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 |
31 |
selectedClassOfResultHolder selectedImplementorsHolder |
|
32 |
argumentsEditor messageAnswerEditor receiverEditor receiver |
|
1522 | 33 |
resultSelectors arg2BoxVisible arg1BoxVisible arg4BoxVisible |
34 |
arg3BoxVisible argCountHolder argCountList argument1Editor |
|
35 |
argument2Editor argument3Editor argument4Editor resultSelected |
|
2891 | 36 |
lookAtResultEditor codeHolder searchProcess' |
1522 | 37 |
classVariableNames:'' |
38 |
poolDictionaries:'' |
|
3215 | 39 |
category:'Interface-Tools' |
1522 | 40 |
! |
41 |
||
1530 | 42 |
!MethodFinderWindow class methodsFor:'documentation'! |
43 |
||
3292 | 44 |
copyright |
45 |
" |
|
46 |
Copyright (C) Original Authors (Kaehler, Scott Wallace and Dan Ingalls) |
|
47 |
Copyright (C) 2001 eXept Software AG |
|
48 |
||
49 |
Permission is hereby granted, free of charge, to any |
|
50 |
person obtaining a copy of this software and associated |
|
51 |
documentation files (the 'Software'), to deal in the |
|
52 |
Software without restriction, including without limitation |
|
53 |
the rights to use, copy, modify, merge, publish, distribute, |
|
54 |
sublicense, and/or sell copies of the Software, and to |
|
55 |
permit persons to whom the Software is furnished to do so, |
|
56 |
subject to the following conditions: |
|
57 |
||
58 |
The above copyright notice and this permission notice shall |
|
59 |
be included in all copies or substantial portions of the Software. |
|
60 |
||
61 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
62 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
63 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
64 |
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
65 |
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
66 |
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
67 |
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
68 |
" |
|
69 |
! |
|
70 |
||
1530 | 71 |
documentation |
72 |
" |
|
3292 | 73 |
a tool to find implementing methods by example. |
74 |
Give it values for a receiver, optional arguments and a desired result, |
|
75 |
and it will find methods which do that for you. |
|
76 |
Please read the online documentation for details (open via the tool's help menu). |
|
77 |
||
1531 | 78 |
[author:] |
3292 | 79 |
original squeak version by Ted Kaehler, Scott Wallace and Dan Ingalls. |
80 |
ported from Squeak and GUI enhanced 2001 by James Hayes james@exept.de. |
|
81 |
improved by Claus Gittinger. |
|
1530 | 82 |
" |
83 |
! ! |
|
1522 | 84 |
|
1532 | 85 |
!MethodFinderWindow class methodsFor:'constants'! |
86 |
||
2890 | 87 |
defaultIcon |
3109
92920c76aae3
Mark program icons with resource
Stefan Vogel <sv@exept.de>
parents:
3090
diff
changeset
|
88 |
<resource: #programImage> |
92920c76aae3
Mark program icons with resource
Stefan Vogel <sv@exept.de>
parents:
3090
diff
changeset
|
89 |
|
2890 | 90 |
^ ToolbarIconLibrary methodFinder24x24Icon |
91 |
||
92 |
"Created: / 01-06-2012 / 13:05:11 / cg" |
|
93 |
! |
|
94 |
||
1532 | 95 |
markerForImplementingClass |
96 |
^ '=> '. |
|
97 |
^ '*' |
|
98 |
||
99 |
"Created: / 13.11.2001 / 12:09:52 / cg" |
|
100 |
"Modified: / 13.11.2001 / 12:11:57 / cg" |
|
101 |
! ! |
|
102 |
||
3292 | 103 |
!MethodFinderWindow class methodsFor:'help specs'! |
104 |
||
3514 | 105 |
helpSpec |
3292 | 106 |
"This resource specification was automatically generated |
107 |
by the UIHelpTool of ST/X." |
|
108 |
||
109 |
"Do not manually edit this!! If it is corrupted, |
|
110 |
the UIHelpTool may not be able to read the specification." |
|
111 |
||
112 |
" |
|
3675 | 113 |
UIHelpTool openOnClass:MethodFinderWindow |
3292 | 114 |
" |
115 |
||
116 |
<resource: #help> |
|
117 |
||
3514 | 118 |
^ super helpSpec addPairsFrom:#( |
3292 | 119 |
|
3675 | 120 |
#'*' |
121 |
'as in GLOB patterns (i.e. like filename patterns)' |
|
3292 | 122 |
|
123 |
#answerValue |
|
124 |
'Enter result value here.\Can be a constant (like ''hello'')\or an expression, such as "Rectangle basicNew".' |
|
125 |
||
126 |
#arg1Value |
|
127 |
'Enter a value for the first argument here.\Can be a constant or an expression.' |
|
128 |
||
129 |
#arg2Value |
|
130 |
'Enter a value for the second argument here.\Can be a constant or an expression.' |
|
131 |
||
132 |
#arg3Value |
|
133 |
'Enter a value for the third argument here.\Can be a constant or an expression.' |
|
134 |
||
135 |
#argumentCount |
|
136 |
'Specify the number of arguments here.' |
|
137 |
||
138 |
#clearButton |
|
139 |
'Clear all sample value fields.' |
|
140 |
||
3675 | 141 |
#implementorsFound |
142 |
'Shows a list of messages which deliver the result or match the selector pattern' |
|
143 |
||
144 |
#receiverValue |
|
145 |
'Enter a receiver value here.\Can be a constant (like ''hello'')\or an expression, such as "Rectangle basicNew".' |
|
146 |
||
147 |
#selectorPattern |
|
148 |
'Enter a pattern to search by message name' |
|
149 |
||
150 |
#selectorPatternSearch |
|
151 |
'Search by name.\You can use match characters' |
|
152 |
||
3292 | 153 |
#startSearchButton |
154 |
'Search for methods which answer the desired value,\given the concrete arguments' |
|
155 |
||
3675 | 156 |
#startSearchPatternButton |
157 |
'Search for methods whose name matches the pattern' |
|
3292 | 158 |
|
159 |
) |
|
3675 | 160 |
|
161 |
"Modified: / 08-06-2019 / 16:06:17 / Claus Gittinger" |
|
3292 | 162 |
! ! |
163 |
||
1522 | 164 |
!MethodFinderWindow class methodsFor:'interface specs'! |
165 |
||
166 |
windowSpec |
|
167 |
"This resource specification was automatically generated |
|
168 |
by the UIPainter of ST/X." |
|
169 |
||
170 |
"Do not manually edit this!! If it is corrupted, |
|
171 |
the UIPainter may not be able to read the specification." |
|
172 |
||
173 |
" |
|
174 |
UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec |
|
175 |
MethodFinderWindow new openInterface:#windowSpec |
|
176 |
MethodFinderWindow open |
|
177 |
" |
|
178 |
||
179 |
<resource: #canvas> |
|
180 |
||
181 |
^ |
|
3289 | 182 |
#(FullSpec |
183 |
name: windowSpec |
|
3710 | 184 |
uuid: '1871401e-aa2d-11e9-8c78-b8f6b1108e05' |
3289 | 185 |
window: |
186 |
(WindowSpec |
|
187 |
label: 'MethodFinder' |
|
188 |
name: 'MethodFinder' |
|
3675 | 189 |
uuid: '5fb0c87a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 190 |
bounds: (Rectangle 0 0 816 738) |
191 |
menu: menu |
|
192 |
icon: defaultIcon |
|
193 |
) |
|
194 |
component: |
|
195 |
(SpecCollection |
|
196 |
collection: ( |
|
197 |
(VariableHorizontalPanelSpec |
|
198 |
name: 'VariableHorizontalPanel1' |
|
199 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
3675 | 200 |
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' |
|
221 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
3675 | 222 |
uuid: '5fb0d4f0-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 223 |
component: |
224 |
(SpecCollection |
|
225 |
collection: ( |
|
226 |
(LabelSpec |
|
227 |
label: 'Receiver' |
|
228 |
name: 'ReceiverLabel' |
|
229 |
layout: (LayoutFrame 0 0 0 0 0 0.34000000000000002 28 0) |
|
3675 | 230 |
uuid: '5fb0d6b2-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 231 |
translateLabel: true |
232 |
) |
|
233 |
(ComboListSpec |
|
3698 | 234 |
name: 'AllowedArguments' |
3301 | 235 |
layout: (LayoutFrame 0 0.34000000000000002 1 0 0 0.64000000000000135 28 0) |
236 |
activeHelpKey: argumentCount |
|
3675 | 237 |
uuid: '5fb0da9a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 238 |
model: argCountHolder |
239 |
comboList: argCountList |
|
240 |
useIndex: true |
|
241 |
) |
|
242 |
(LabelSpec |
|
243 |
label: 'Answer' |
|
244 |
name: 'MessageAnswerLabel' |
|
245 |
layout: (LayoutFrame 0 0.64000000000000135 0 0 0 1 28 0) |
|
246 |
activeHelpKey: arg1Value |
|
3675 | 247 |
uuid: '5fb0dd60-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 248 |
translateLabel: true |
249 |
) |
|
250 |
(HorizontalPanelViewSpec |
|
251 |
name: 'HorizontalPanel1' |
|
252 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
3675 | 253 |
uuid: '5fb0dee6-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 254 |
horizontalLayout: fit |
255 |
verticalLayout: fit |
|
256 |
horizontalSpace: 3 |
|
257 |
verticalSpace: 3 |
|
258 |
component: |
|
259 |
(SpecCollection |
|
260 |
collection: ( |
|
261 |
(WorkspaceSpec |
|
262 |
name: 'ReceiverEditor' |
|
263 |
activeHelpKey: receiverValue |
|
3675 | 264 |
uuid: '5fb0e152-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 265 |
tabable: true |
266 |
hasHorizontalScrollBar: true |
|
267 |
hasVerticalScrollBar: true |
|
268 |
miniScrollerHorizontal: true |
|
269 |
miniScrollerVertical: true |
|
270 |
autoHideScrollBars: true |
|
271 |
hasKeyboardFocusInitially: false |
|
3675 | 272 |
extent: (Point 86 142) |
3301 | 273 |
postBuildCallback: receiverWidgetCreated: |
274 |
) |
|
275 |
(VerticalPanelViewSpec |
|
276 |
name: 'VerticalPanel1' |
|
3675 | 277 |
uuid: '5fb0e51c-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 278 |
horizontalLayout: fit |
279 |
verticalLayout: fit |
|
280 |
horizontalSpace: 3 |
|
281 |
verticalSpace: 3 |
|
282 |
component: |
|
283 |
(SpecCollection |
|
284 |
collection: ( |
|
285 |
(ViewSpec |
|
286 |
name: 'Box1' |
|
3675 | 287 |
uuid: '5fb0e6d4-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 288 |
visibilityChannel: arg1BoxVisible |
289 |
component: |
|
290 |
(SpecCollection |
|
291 |
collection: ( |
|
292 |
(WorkspaceSpec |
|
293 |
name: 'Arg1Editor' |
|
294 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
295 |
activeHelpKey: arg1Value |
|
3675 | 296 |
uuid: '5fb0e7ce-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 297 |
tabable: true |
298 |
hasHorizontalScrollBar: true |
|
299 |
hasVerticalScrollBar: true |
|
300 |
miniScrollerHorizontal: true |
|
301 |
miniScrollerVertical: true |
|
302 |
autoHideScrollBars: true |
|
303 |
hasKeyboardFocusInitially: false |
|
304 |
postBuildCallback: argument1WidgetCreated: |
|
305 |
) |
|
306 |
) |
|
307 |
||
308 |
) |
|
3675 | 309 |
extent: (Point 87 45) |
3301 | 310 |
) |
311 |
(ViewSpec |
|
312 |
name: 'Box2' |
|
3675 | 313 |
uuid: '5fb0e9b8-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 314 |
visibilityChannel: arg2BoxVisible |
315 |
component: |
|
316 |
(SpecCollection |
|
317 |
collection: ( |
|
318 |
(WorkspaceSpec |
|
319 |
name: 'TextEditor5' |
|
320 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
321 |
activeHelpKey: arg2Value |
|
3675 | 322 |
uuid: '5fb0eabc-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 323 |
tabable: true |
324 |
hasHorizontalScrollBar: true |
|
325 |
hasVerticalScrollBar: true |
|
326 |
miniScrollerHorizontal: true |
|
327 |
miniScrollerVertical: true |
|
328 |
autoHideScrollBars: true |
|
329 |
hasKeyboardFocusInitially: false |
|
330 |
postBuildCallback: argument2WidgetCreated: |
|
331 |
) |
|
332 |
) |
|
333 |
||
334 |
) |
|
3675 | 335 |
extent: (Point 87 46) |
3301 | 336 |
) |
337 |
(ViewSpec |
|
338 |
name: 'Box3' |
|
3675 | 339 |
uuid: '5fb0ec74-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 340 |
visibilityChannel: arg3BoxVisible |
341 |
component: |
|
342 |
(SpecCollection |
|
343 |
collection: ( |
|
344 |
(WorkspaceSpec |
|
345 |
name: 'TextEditor6' |
|
346 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
347 |
activeHelpKey: arg3Value |
|
3675 | 348 |
uuid: '5fb0ed64-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 349 |
tabable: true |
350 |
hasHorizontalScrollBar: true |
|
351 |
hasVerticalScrollBar: true |
|
352 |
miniScrollerHorizontal: true |
|
353 |
miniScrollerVertical: true |
|
354 |
autoHideScrollBars: true |
|
355 |
hasKeyboardFocusInitially: false |
|
356 |
postBuildCallback: argument3WidgetCreated: |
|
357 |
) |
|
358 |
) |
|
359 |
||
360 |
) |
|
3675 | 361 |
extent: (Point 87 45) |
3301 | 362 |
) |
363 |
) |
|
364 |
||
365 |
) |
|
3675 | 366 |
extent: (Point 87 142) |
3301 | 367 |
) |
368 |
(WorkspaceSpec |
|
369 |
name: 'AnswerEditor' |
|
370 |
activeHelpKey: answerValue |
|
3675 | 371 |
uuid: '5fb0ef30-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 372 |
tabable: true |
373 |
hasHorizontalScrollBar: true |
|
374 |
hasVerticalScrollBar: true |
|
375 |
miniScrollerHorizontal: true |
|
376 |
miniScrollerVertical: true |
|
377 |
autoHideScrollBars: true |
|
378 |
hasKeyboardFocusInitially: false |
|
3675 | 379 |
extent: (Point 87 142) |
3301 | 380 |
postBuildCallback: messageAnswerWidgetCreated: |
381 |
) |
|
382 |
) |
|
383 |
||
384 |
) |
|
385 |
) |
|
386 |
) |
|
387 |
||
388 |
) |
|
389 |
) |
|
390 |
(ViewSpec |
|
391 |
name: 'ReceiverArgBoxActionBox' |
|
392 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
3675 | 393 |
uuid: '5fb0f0fc-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 394 |
component: |
395 |
(SpecCollection |
|
396 |
collection: ( |
|
397 |
(ActionButtonSpec |
|
398 |
label: 'Clear' |
|
3708 | 399 |
name: 'ClearButton' |
3301 | 400 |
layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1) |
401 |
activeHelpKey: clearButton |
|
3675 | 402 |
uuid: '5fb0f214-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 403 |
translateLabel: true |
404 |
model: clear |
|
405 |
) |
|
406 |
(ActionButtonSpec |
|
407 |
label: 'Search' |
|
3708 | 408 |
name: 'SearchButton' |
3301 | 409 |
layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1) |
410 |
activeHelpKey: startSearchButton |
|
3675 | 411 |
uuid: '5fb0f52a-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 412 |
translateLabel: true |
413 |
tabable: true |
|
414 |
model: search |
|
415 |
) |
|
416 |
) |
|
417 |
||
418 |
) |
|
419 |
) |
|
420 |
) |
|
421 |
||
422 |
) |
|
423 |
) |
|
424 |
(ViewSpec |
|
425 |
name: 'SelectorFinderBox' |
|
3675 | 426 |
uuid: '5fb0f714-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 427 |
component: |
428 |
(SpecCollection |
|
429 |
collection: ( |
|
430 |
(ViewSpec |
|
431 |
name: 'MatchActionBox' |
|
432 |
layout: (LayoutFrame 0 0 0 0 0 1 90 0) |
|
3675 | 433 |
uuid: '5fb0f818-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 434 |
component: |
435 |
(SpecCollection |
|
436 |
collection: ( |
|
437 |
(LabelSpec |
|
438 |
label: 'Selector Pattern:' |
|
3708 | 439 |
name: 'SelectorPatternLabel' |
3699 | 440 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
3675 | 441 |
uuid: '5fb0f908-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 442 |
translateLabel: true |
443 |
adjust: left |
|
444 |
) |
|
445 |
(InputFieldSpec |
|
3708 | 446 |
name: 'SelectorPattern' |
3301 | 447 |
layout: (LayoutFrame 2 0 -54 1 -2 1 -29 1) |
3675 | 448 |
activeHelpKey: selectorPattern |
449 |
uuid: '5fb0fa70-89f6-11e9-8df0-b8f6b1108e05' |
|
3301 | 450 |
model: selectorPatternHolder |
451 |
immediateAccept: true |
|
452 |
acceptOnReturn: true |
|
453 |
acceptOnTab: true |
|
454 |
acceptOnPointerLeave: true |
|
455 |
) |
|
456 |
(ActionButtonSpec |
|
457 |
label: 'Search' |
|
3708 | 458 |
name: 'SearchPatternButton' |
3301 | 459 |
layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1) |
3675 | 460 |
activeHelpKey: startSearchPatternButton |
461 |
uuid: '5fb0fea8-89f6-11e9-8df0-b8f6b1108e05' |
|
3301 | 462 |
translateLabel: true |
463 |
tabable: true |
|
464 |
model: searchPatternMatchesInBackground |
|
465 |
) |
|
466 |
) |
|
467 |
||
468 |
) |
|
469 |
) |
|
470 |
(SequenceViewSpec |
|
471 |
name: 'ResultList' |
|
472 |
layout: (LayoutFrame 0 0 94 0 0 1 0 1) |
|
3675 | 473 |
activeHelpKey: implementorsFound |
474 |
uuid: '5fb1009c-89f6-11e9-8df0-b8f6b1108e05' |
|
3301 | 475 |
model: selectedImplementorsHolder |
476 |
menu: resultListMenu |
|
477 |
hasHorizontalScrollBar: true |
|
478 |
hasVerticalScrollBar: true |
|
479 |
autoHideScrollBars: true |
|
480 |
useIndex: true |
|
481 |
sequenceList: resultHolder |
|
482 |
) |
|
483 |
) |
|
484 |
||
485 |
) |
|
486 |
) |
|
487 |
) |
|
488 |
||
489 |
) |
|
490 |
handles: (Any 0.28000000000000003 1.0) |
|
491 |
) |
|
492 |
(VariableVerticalPanelSpec |
|
493 |
name: 'RightBox' |
|
3675 | 494 |
uuid: '5fb103c6-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 495 |
component: |
496 |
(SpecCollection |
|
497 |
collection: ( |
|
498 |
(SequenceViewSpec |
|
3710 | 499 |
name: 'ImplementorsList' |
3675 | 500 |
uuid: '5fb10524-89f6-11e9-8df0-b8f6b1108e05' |
3301 | 501 |
model: selectedClassOfResultHolder |
502 |
menu: implementorListMenu |
|
503 |
hasHorizontalScrollBar: true |
|
504 |
hasVerticalScrollBar: true |
|
505 |
autoHideScrollBars: true |
|
506 |
doubleClickSelector: openBrowserOn: |
|
507 |
valueChangeSelector: selectedClassOfResultHolderChanged |
|
508 |
useIndex: false |
|
509 |
sequenceList: classOfResultHolder |
|
510 |
) |
|
3695 | 511 |
(ViewSpec |
512 |
name: 'Box4' |
|
513 |
uuid: '4698d744-a993-11e9-b8a4-b8f6b1108e05' |
|
514 |
component: |
|
515 |
(SpecCollection |
|
516 |
collection: ( |
|
517 |
(CodeViewSpec |
|
3710 | 518 |
name: 'CodeView' |
3695 | 519 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
520 |
uuid: '5fb106dc-89f6-11e9-8df0-b8f6b1108e05' |
|
521 |
model: codeHolder |
|
522 |
hasHorizontalScrollBar: true |
|
523 |
hasVerticalScrollBar: true |
|
524 |
autoHideScrollBars: true |
|
525 |
hasKeyboardFocusInitially: false |
|
526 |
viewClassName: 'codeViewClass' |
|
527 |
postBuildCallback: sourceCodeWidgetCreated: |
|
528 |
) |
|
529 |
) |
|
530 |
||
531 |
) |
|
3301 | 532 |
) |
533 |
) |
|
534 |
||
535 |
) |
|
3695 | 536 |
handles: (Any 0.5 1.0) |
3301 | 537 |
) |
538 |
) |
|
539 |
||
540 |
) |
|
541 |
handles: (Any 0.33000000000000002 1.0) |
|
542 |
) |
|
543 |
) |
|
544 |
||
545 |
) |
|
546 |
) |
|
547 |
! |
|
548 |
||
549 |
windowSpec_old |
|
550 |
"This resource specification was automatically generated |
|
551 |
by the UIPainter of ST/X." |
|
552 |
||
553 |
"Do not manually edit this!! If it is corrupted, |
|
554 |
the UIPainter may not be able to read the specification." |
|
555 |
||
556 |
" |
|
557 |
UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec |
|
558 |
MethodFinderWindow new openInterface:#windowSpec |
|
559 |
MethodFinderWindow open |
|
560 |
" |
|
561 |
||
562 |
<resource: #canvas> |
|
563 |
||
564 |
^ |
|
565 |
#(FullSpec |
|
566 |
name: windowSpec |
|
567 |
window: |
|
568 |
(WindowSpec |
|
569 |
label: 'MethodFinder' |
|
570 |
name: 'MethodFinder' |
|
3289 | 571 |
bounds: (Rectangle 0 0 920 690) |
572 |
menu: menu |
|
573 |
icon: defaultIcon |
|
574 |
) |
|
575 |
component: |
|
576 |
(SpecCollection |
|
577 |
collection: ( |
|
578 |
(VariableHorizontalPanelSpec |
|
579 |
name: 'VariableHorizontalPanel1' |
|
580 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
581 |
snapMode: both |
|
582 |
component: |
|
583 |
(SpecCollection |
|
584 |
collection: ( |
|
585 |
(ViewSpec |
|
586 |
name: 'LeftBox' |
|
587 |
level: 1 |
|
588 |
component: |
|
589 |
(SpecCollection |
|
590 |
collection: ( |
|
591 |
(ViewSpec |
|
592 |
name: 'ReceiverArgBox' |
|
593 |
layout: (LayoutFrame 0 0 0 0 0 1 -100 0.5) |
|
594 |
component: |
|
595 |
(SpecCollection |
|
596 |
collection: ( |
|
597 |
(LabelSpec |
|
598 |
label: 'Receiver' |
|
599 |
name: 'ReceiverLabel' |
|
600 |
layout: (LayoutFrame 0 0 0 0 0 0.34000000000000002 28 0) |
|
601 |
translateLabel: true |
|
602 |
) |
|
603 |
(ComboListSpec |
|
3698 | 604 |
name: 'AllowedArguments' |
3292 | 605 |
layout: (LayoutFrame 0 0.34000000000000002 1 0 0 0.64000000000000046 28 0) |
606 |
activeHelpKey: argumentCount |
|
3289 | 607 |
model: argCountHolder |
608 |
comboList: argCountList |
|
609 |
useIndex: true |
|
610 |
) |
|
611 |
(LabelSpec |
|
612 |
label: 'Answer' |
|
613 |
name: 'MessageAnswerLabel' |
|
3292 | 614 |
layout: (LayoutFrame 0 0.64000000000000046 0 0 0 1 28 0) |
615 |
activeHelpKey: arg1Value |
|
3289 | 616 |
translateLabel: true |
617 |
) |
|
618 |
(HorizontalPanelViewSpec |
|
619 |
name: 'HorizontalPanel1' |
|
620 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
621 |
horizontalLayout: fit |
|
622 |
verticalLayout: fit |
|
623 |
horizontalSpace: 3 |
|
624 |
verticalSpace: 3 |
|
625 |
component: |
|
626 |
(SpecCollection |
|
627 |
collection: ( |
|
628 |
(WorkspaceSpec |
|
629 |
name: 'ReceiverEditor' |
|
3292 | 630 |
activeHelpKey: receiverValue |
3289 | 631 |
tabable: true |
632 |
hasHorizontalScrollBar: true |
|
633 |
hasVerticalScrollBar: true |
|
634 |
miniScrollerHorizontal: true |
|
635 |
miniScrollerVertical: true |
|
636 |
autoHideScrollBars: true |
|
637 |
hasKeyboardFocusInitially: false |
|
638 |
extent: (Point 110 214) |
|
639 |
postBuildCallback: receiverWidgetCreated: |
|
640 |
) |
|
641 |
(VerticalPanelViewSpec |
|
642 |
name: 'VerticalPanel1' |
|
643 |
horizontalLayout: fit |
|
644 |
verticalLayout: fit |
|
645 |
horizontalSpace: 3 |
|
646 |
verticalSpace: 3 |
|
647 |
component: |
|
648 |
(SpecCollection |
|
649 |
collection: ( |
|
650 |
(ViewSpec |
|
651 |
name: 'Box1' |
|
652 |
visibilityChannel: arg1BoxVisible |
|
653 |
component: |
|
654 |
(SpecCollection |
|
655 |
collection: ( |
|
656 |
(WorkspaceSpec |
|
657 |
name: 'Arg1Editor' |
|
658 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
3292 | 659 |
activeHelpKey: arg1Value |
3289 | 660 |
tabable: true |
661 |
hasHorizontalScrollBar: true |
|
662 |
hasVerticalScrollBar: true |
|
663 |
miniScrollerHorizontal: true |
|
664 |
miniScrollerVertical: true |
|
665 |
autoHideScrollBars: true |
|
666 |
hasKeyboardFocusInitially: false |
|
667 |
postBuildCallback: argument1WidgetCreated: |
|
1532 | 668 |
) |
3289 | 669 |
) |
670 |
||
671 |
) |
|
672 |
extent: (Point 110 69) |
|
673 |
) |
|
674 |
(ViewSpec |
|
675 |
name: 'Box2' |
|
676 |
visibilityChannel: arg2BoxVisible |
|
677 |
component: |
|
678 |
(SpecCollection |
|
679 |
collection: ( |
|
680 |
(WorkspaceSpec |
|
681 |
name: 'TextEditor5' |
|
682 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
3292 | 683 |
activeHelpKey: arg2Value |
3289 | 684 |
tabable: true |
685 |
hasHorizontalScrollBar: true |
|
686 |
hasVerticalScrollBar: true |
|
687 |
miniScrollerHorizontal: true |
|
688 |
miniScrollerVertical: true |
|
689 |
autoHideScrollBars: true |
|
690 |
hasKeyboardFocusInitially: false |
|
691 |
postBuildCallback: argument2WidgetCreated: |
|
1532 | 692 |
) |
3289 | 693 |
) |
694 |
||
695 |
) |
|
696 |
extent: (Point 110 70) |
|
697 |
) |
|
698 |
(ViewSpec |
|
699 |
name: 'Box3' |
|
700 |
visibilityChannel: arg3BoxVisible |
|
701 |
component: |
|
702 |
(SpecCollection |
|
703 |
collection: ( |
|
704 |
(WorkspaceSpec |
|
705 |
name: 'TextEditor6' |
|
706 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
3292 | 707 |
activeHelpKey: arg3Value |
3289 | 708 |
tabable: true |
709 |
hasHorizontalScrollBar: true |
|
710 |
hasVerticalScrollBar: true |
|
711 |
miniScrollerHorizontal: true |
|
712 |
miniScrollerVertical: true |
|
713 |
autoHideScrollBars: true |
|
714 |
hasKeyboardFocusInitially: false |
|
715 |
postBuildCallback: argument3WidgetCreated: |
|
1532 | 716 |
) |
3289 | 717 |
) |
718 |
||
719 |
) |
|
720 |
extent: (Point 110 69) |
|
1530 | 721 |
) |
3289 | 722 |
) |
723 |
||
724 |
) |
|
725 |
extent: (Point 110 214) |
|
726 |
) |
|
727 |
(WorkspaceSpec |
|
728 |
name: 'AnswerEditor' |
|
3292 | 729 |
activeHelpKey: answerValue |
3289 | 730 |
tabable: true |
731 |
hasHorizontalScrollBar: true |
|
732 |
hasVerticalScrollBar: true |
|
733 |
miniScrollerHorizontal: true |
|
734 |
miniScrollerVertical: true |
|
735 |
autoHideScrollBars: true |
|
736 |
hasKeyboardFocusInitially: false |
|
737 |
extent: (Point 110 214) |
|
738 |
postBuildCallback: messageAnswerWidgetCreated: |
|
1525 | 739 |
) |
3289 | 740 |
) |
741 |
||
742 |
) |
|
743 |
) |
|
744 |
) |
|
745 |
||
746 |
) |
|
747 |
) |
|
748 |
(ViewSpec |
|
749 |
name: 'ReceiverArgBoxActionBox' |
|
750 |
layout: (LayoutFrame 0 0 -98 0.5 0 1 -75 0.5) |
|
751 |
component: |
|
752 |
(SpecCollection |
|
753 |
collection: ( |
|
754 |
(ActionButtonSpec |
|
3292 | 755 |
activeHelpKey: clearButton |
3289 | 756 |
label: 'Clear' |
757 |
name: 'Button2' |
|
758 |
layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1) |
|
759 |
translateLabel: true |
|
760 |
model: clear |
|
1532 | 761 |
) |
3289 | 762 |
(ActionButtonSpec |
3292 | 763 |
activeHelpKey: startSearchButton |
3289 | 764 |
label: 'Search' |
765 |
name: 'Button1' |
|
766 |
layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1) |
|
767 |
translateLabel: true |
|
768 |
tabable: true |
|
769 |
model: search |
|
770 |
) |
|
771 |
) |
|
772 |
||
773 |
) |
|
774 |
) |
|
775 |
(ViewSpec |
|
776 |
name: 'MatchActionBox' |
|
3290 | 777 |
layout: (LayoutFrame 0 0 -70 0.5 0 1 10 0.5) |
3289 | 778 |
component: |
779 |
(SpecCollection |
|
780 |
collection: ( |
|
781 |
(LabelSpec |
|
782 |
label: 'Selector Pattern:' |
|
783 |
name: 'Label1' |
|
784 |
layout: (LayoutFrame 0 0 0 0 0 0.5 25 0) |
|
785 |
translateLabel: true |
|
786 |
adjust: left |
|
1522 | 787 |
) |
3289 | 788 |
(InputFieldSpec |
789 |
name: 'EntryField1' |
|
3290 | 790 |
layout: (LayoutFrame 2 0 -54 1 -2 1 -29 1) |
3292 | 791 |
model: selectorPatternHolder |
3289 | 792 |
immediateAccept: true |
793 |
acceptOnReturn: true |
|
794 |
acceptOnTab: true |
|
795 |
acceptOnPointerLeave: true |
|
796 |
) |
|
797 |
(ActionButtonSpec |
|
798 |
label: 'Search' |
|
799 |
name: 'Button4' |
|
800 |
layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1) |
|
801 |
translateLabel: true |
|
802 |
tabable: true |
|
803 |
model: searchPatternMatchesInBackground |
|
2886 | 804 |
) |
3289 | 805 |
) |
806 |
||
807 |
) |
|
808 |
) |
|
809 |
(SequenceViewSpec |
|
810 |
name: 'ResultList' |
|
3290 | 811 |
layout: (LayoutFrame 0 0 15 0.5 0 1 0 1) |
3289 | 812 |
model: selectedImplementorsHolder |
813 |
menu: resultListMenu |
|
814 |
hasHorizontalScrollBar: true |
|
815 |
hasVerticalScrollBar: true |
|
816 |
autoHideScrollBars: true |
|
817 |
useIndex: true |
|
818 |
sequenceList: resultHolder |
|
1530 | 819 |
) |
3289 | 820 |
) |
821 |
||
822 |
) |
|
823 |
) |
|
824 |
(VariableVerticalPanelSpec |
|
825 |
name: 'VariableVerticalPanel1' |
|
826 |
component: |
|
827 |
(SpecCollection |
|
828 |
collection: ( |
|
829 |
(SequenceViewSpec |
|
830 |
name: 'List2' |
|
831 |
model: selectedClassOfResultHolder |
|
832 |
menu: implementorListMenu |
|
833 |
hasHorizontalScrollBar: true |
|
834 |
hasVerticalScrollBar: true |
|
835 |
autoHideScrollBars: true |
|
836 |
doubleClickSelector: openBrowserOn: |
|
837 |
valueChangeSelector: selectedClassOfResultHolderChanged |
|
838 |
useIndex: false |
|
839 |
sequenceList: classOfResultHolder |
|
1522 | 840 |
) |
3289 | 841 |
(CodeViewSpec |
842 |
name: 'CodeView' |
|
843 |
model: codeHolder |
|
844 |
hasHorizontalScrollBar: true |
|
845 |
hasVerticalScrollBar: true |
|
846 |
autoHideScrollBars: true |
|
847 |
hasKeyboardFocusInitially: false |
|
848 |
postBuildCallback: sourceCodeWidgetCreated: |
|
3292 | 849 |
viewClassName: 'codeViewClass' |
3289 | 850 |
) |
851 |
) |
|
852 |
||
853 |
) |
|
854 |
handles: (Any 0.5 1.0) |
|
1522 | 855 |
) |
3289 | 856 |
) |
857 |
||
858 |
) |
|
3292 | 859 |
handles: (Any 0.37391304347826104 1.0) |
1522 | 860 |
) |
3289 | 861 |
) |
862 |
||
863 |
) |
|
864 |
) |
|
3698 | 865 |
|
866 |
"Modified: / 19-07-2019 / 12:01:12 / Claus Gittinger" |
|
1522 | 867 |
! ! |
868 |
||
1525 | 869 |
!MethodFinderWindow class methodsFor:'menu specs'! |
870 |
||
1529 | 871 |
implementorListMenu |
872 |
"This resource specification was automatically generated |
|
873 |
by the MenuEditor of ST/X." |
|
874 |
||
875 |
"Do not manually edit this!! If it is corrupted, |
|
876 |
the MenuEditor may not be able to read the specification." |
|
877 |
||
878 |
" |
|
879 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu |
|
880 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp |
|
881 |
" |
|
882 |
||
883 |
<resource: #menu> |
|
884 |
||
885 |
^ |
|
886 |
#(#Menu |
|
887 |
#( |
|
888 |
#(#MenuItem |
|
889 |
#label: 'Browse' |
|
890 |
#translateLabel: true |
|
891 |
#value: #openBrowserOnSelectedItem |
|
892 |
) |
|
893 |
) |
|
894 |
nil |
|
895 |
nil |
|
896 |
) |
|
897 |
! |
|
898 |
||
1525 | 899 |
menu |
900 |
"This resource specification was automatically generated |
|
901 |
by the MenuEditor of ST/X." |
|
902 |
||
903 |
"Do not manually edit this!! If it is corrupted, |
|
904 |
the MenuEditor may not be able to read the specification." |
|
905 |
||
3685 | 906 |
|
1525 | 907 |
" |
908 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#menu |
|
909 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow menu)) startUp |
|
910 |
" |
|
911 |
||
912 |
<resource: #menu> |
|
913 |
||
914 |
^ |
|
3685 | 915 |
#(Menu |
916 |
( |
|
917 |
(MenuItem |
|
918 |
activeHelpKey: file |
|
919 |
label: '&File' |
|
920 |
submenu: |
|
921 |
(Menu |
|
922 |
( |
|
923 |
(MenuItem |
|
924 |
activeHelpKey: fileExit |
|
925 |
label: 'Exit' |
|
926 |
itemValue: closeRequest |
|
1525 | 927 |
) |
928 |
) |
|
929 |
nil |
|
930 |
nil |
|
931 |
) |
|
932 |
) |
|
3685 | 933 |
(MenuItem |
3193 | 934 |
label: 'MENU_Help' |
935 |
startGroup: conditionalRight |
|
3685 | 936 |
submenu: |
937 |
(Menu |
|
938 |
( |
|
939 |
(MenuItem |
|
940 |
activeHelpKey: helpTutorial |
|
941 |
label: 'Documentation' |
|
942 |
itemValue: openHTMLDocumentation |
|
1525 | 943 |
) |
3685 | 944 |
(MenuItem |
945 |
label: '-' |
|
946 |
) |
|
947 |
(MenuItem |
|
3695 | 948 |
label: 'Show Me How it Works' |
949 |
itemValue: showMeHowItWorks |
|
950 |
) |
|
951 |
(MenuItem |
|
952 |
label: '-' |
|
953 |
) |
|
954 |
(MenuItem |
|
3685 | 955 |
activeHelpKey: aboutThisAppliaction |
956 |
label: 'About MethodFinder...' |
|
957 |
itemValue: openAboutThisApplication |
|
1525 | 958 |
) |
959 |
) |
|
960 |
nil |
|
961 |
nil |
|
962 |
) |
|
963 |
) |
|
964 |
) |
|
965 |
nil |
|
966 |
nil |
|
967 |
) |
|
2927 | 968 |
! |
969 |
||
970 |
resultListMenu |
|
971 |
"This resource specification was automatically generated |
|
972 |
by the MenuEditor of ST/X." |
|
973 |
||
974 |
"Do not manually edit this!! If it is corrupted, |
|
975 |
the MenuEditor may not be able to read the specification." |
|
976 |
||
977 |
" |
|
978 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu |
|
979 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp |
|
980 |
" |
|
981 |
||
982 |
<resource: #menu> |
|
983 |
||
984 |
^ |
|
985 |
#(#Menu |
|
986 |
#( |
|
987 |
#(#MenuItem |
|
3024 | 988 |
#label: 'Browse Senders' |
989 |
#translateLabel: true |
|
990 |
#value: #openBrowserOnSenderOfSelectedResultItem |
|
991 |
) |
|
992 |
#(#MenuItem |
|
2927 | 993 |
#label: 'Browse Implementors' |
994 |
#translateLabel: true |
|
995 |
#value: #openBrowserOnSelectedResultItem |
|
996 |
) |
|
997 |
) |
|
998 |
nil |
|
999 |
nil |
|
1000 |
) |
|
1001 |
||
1002 |
"Created: / 21-09-2012 / 11:05:15 / cg" |
|
1525 | 1003 |
! ! |
1004 |
||
3289 | 1005 |
!MethodFinderWindow class methodsFor:'startup'! |
1006 |
||
1007 |
openOnSelectorPattern:selector |
|
1008 |
|app| |
|
1009 |
||
1010 |
app := self new. |
|
1011 |
app allButOpen. |
|
3292 | 1012 |
app selectorPatternHolder value:selector. |
3289 | 1013 |
app openWindow. |
3290 | 1014 |
"/ app waitForBackgroundSearchFinished. |
1015 |
||
3289 | 1016 |
^ app |
1017 |
||
1018 |
" |
|
1019 |
self openOnSelectorPattern:'asLowercase' |
|
1020 |
" |
|
1021 |
! ! |
|
1022 |
||
1522 | 1023 |
!MethodFinderWindow methodsFor:'accessing'! |
1024 |
||
1025 |
receiver |
|
1525 | 1026 |
"Return a copy of the value of the instance variable 'receiver' " |
1522 | 1027 |
|
1028 |
^ receiver copy |
|
1029 |
! ! |
|
1030 |
||
1031 |
!MethodFinderWindow methodsFor:'actions'! |
|
1032 |
||
1033 |
clear |
|
3292 | 1034 |
"Reset the contents of all the outputs." |
1522 | 1035 |
|
1036 |
receiverEditor contents:nil. |
|
1037 |
argument1Editor contents:nil. |
|
1038 |
argument2Editor contents:nil. |
|
1039 |
argument3Editor contents:nil. |
|
1040 |
messageAnswerEditor contents:nil. |
|
1041 |
self resultHolder value:nil. |
|
1525 | 1042 |
self classOfResultHolder value: nil. |
2730 | 1043 |
codeHolder value:nil. |
1522 | 1044 |
! |
1045 |
||
1046 |
messageAnswerEditorContents |
|
3024 | 1047 |
"Return a cleaned up version of message answer taken from the messageAnswerEditor |
1048 |
as an association. The association has cleanedAnswerString as a key and the |
|
1049 |
compiledAnswer as value." |
|
1050 |
||
1051 |
|aCleanedAnswerString compiledAnswer| |
|
1522 | 1052 |
|
3024 | 1053 |
aCleanedAnswerString := self cleanInputs:(messageAnswerEditor contents). |
1054 |
compiledAnswer := Compiler evaluate:aCleanedAnswerString. |
|
1055 |
((self isExpression:aCleanedAnswerString) or:[ compiledAnswer isNil ]) ifTrue:[ |
|
1056 |
aCleanedAnswerString := compiledAnswer printString |
|
1057 |
]. |
|
1058 |
^ aCleanedAnswerString -> compiledAnswer. |
|
1522 | 1059 |
! |
1060 |
||
1061 |
openBrowserOn:anArgument |
|
1062 |
"Opens browser on theArgument of a specific class. anArgument being a string with the |
|
1525 | 1063 |
Class and the selector upon which the browser is to be opened. Return the receiver." |
1522 | 1064 |
|
1532 | 1065 |
|classAndSelector| |
1522 | 1066 |
|
1532 | 1067 |
classAndSelector := self extractClassAndSelectorFrom:anArgument. |
1068 |
classAndSelector isNil ifTrue:[ |
|
1525 | 1069 |
^ self |
1522 | 1070 |
]. |
3482 | 1071 |
SystemBrowser default |
2459 | 1072 |
openInClass:classAndSelector key |
1073 |
selector:classAndSelector value |
|
1525 | 1074 |
|
1075 |
" |
|
1076 |
MethodFinderWindow new openBrowserOn: '*SmallInteger +' |
|
1077 |
MethodFinderWindow new openBrowserOn: 'String ,' |
|
1078 |
MethodFinderWindow new openBrowserOn: 'Number detentBy:atMultiplesOf:snap:' |
|
1079 |
||
1080 |
||
1081 |
" |
|
1532 | 1082 |
|
3482 | 1083 |
"Modified: / 01-09-2017 / 14:21:18 / cg" |
1522 | 1084 |
! |
1085 |
||
1529 | 1086 |
openBrowserOnSelectedItem |
2927 | 1087 |
"on the selected implementor" |
1088 |
||
1529 | 1089 |
|sel| |
1090 |
||
1091 |
sel := self selectedClassOfResultHolder value. |
|
1092 |
self openBrowserOn:sel |
|
1532 | 1093 |
|
2927 | 1094 |
"Modified: / 13-11-2001 / 12:47:39 / cg" |
1095 |
"Modified (comment): / 21-09-2012 / 11:08:33 / cg" |
|
1096 |
! |
|
1097 |
||
1098 |
openBrowserOnSelectedResultItem |
|
1099 |
"on an item in the lower left list, |
|
1100 |
on all implementors of that message" |
|
1101 |
||
1102 |
|selIndex selector| |
|
1103 |
||
1104 |
selIndex := self selectedImplementorsHolder value. |
|
1105 |
selIndex isNil ifTrue:[^ self]. |
|
1106 |
||
1107 |
selector := resultSelectors at:selIndex. |
|
1108 |
UserPreferences browserClass browseImplementorsOf:selector. |
|
1109 |
||
1110 |
"Created: / 21-09-2012 / 11:05:46 / cg" |
|
1529 | 1111 |
! |
1112 |
||
3024 | 1113 |
openBrowserOnSenderOfSelectedResultItem |
1114 |
"on an item in the lower left list, |
|
1115 |
on all implementors of that message" |
|
1116 |
||
1117 |
|selIndex selector| |
|
1525 | 1118 |
|
3024 | 1119 |
selIndex := self selectedImplementorsHolder value. |
1120 |
selIndex isNil ifTrue:[^ self]. |
|
1121 |
||
1122 |
selector := resultSelectors at:selIndex. |
|
1123 |
UserPreferences browserClass browseSendersOf:selector. |
|
1124 |
! |
|
1522 | 1125 |
|
1126 |
search |
|
3024 | 1127 |
"Do a search based on the input in the various text editors. Return the receiver." |
3322 | 1128 |
|
3024 | 1129 |
|tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf| |
1522 | 1130 |
|
3024 | 1131 |
self resultHolder value:nil. |
1132 |
self classOfResultHolder value:nil. |
|
1133 |
self codeHolder value:nil. |
|
1134 |
tempArguments := self argumentEditorsContents. |
|
1135 |
tempReceiver := self receiverEditorContents. |
|
1136 |
tempAnswer := self messageAnswerEditorContents. |
|
1137 |
"self cleanInputRec:tempReceiver arg:tempArguments ans:tempAnswer." |
|
1138 |
anArray := Array new:2. |
|
3741 | 1139 |
receiverWithArgument := self mergeReceiver:(tempReceiver value) withArgument:(tempArguments values). |
3024 | 1140 |
anArray |
1141 |
at:1 put:receiverWithArgument; |
|
1142 |
at:2 put:tempAnswer value. |
|
3322 | 1143 |
"an array now holds the following array #(#(receiver argument) answer) or #(#(receiver) answer). which should |
3024 | 1144 |
be suitable input for the method finder." |
1145 |
self withCursor:Cursor execute |
|
1146 |
do:[ |
|
1147 |
mf := MethodFinder new. |
|
3741 | 1148 |
resultArray := mf load:anArray; findMessage. |
3024 | 1149 |
]. |
3695 | 1150 |
|
3024 | 1151 |
((resultArray at:1) includesSubString:'no single') ifTrue:[ |
3695 | 1152 |
false ifTrue:[ |
1153 |
(self confirm:(c'%1\nTry a more exhaustive search (may take long)?' bindWith:(resultArray at:1))) |
|
1154 |
ifTrue:[ |
|
1155 |
self search2Levels. |
|
1156 |
]. |
|
1157 |
] ifFalse:[ |
|
1158 |
self warn:(resultArray at:1). |
|
1159 |
]. |
|
3024 | 1160 |
^ self |
1161 |
]. |
|
3695 | 1162 |
|
1163 |
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments" |
|
3322 | 1164 |
resultArray |
1165 |
keysAndValuesDo:[:key :value | |
|
3024 | 1166 |
|newValue| |
1522 | 1167 |
|
3675 | 1168 |
newValue := value copyReplaceString:'data1' |
1169 |
withString:(tempReceiver value storeString). "/ was: "tempReceiver key" |
|
3024 | 1170 |
(tempArguments size) >= 1 ifTrue:[ |
3675 | 1171 |
newValue := newValue copyReplaceString:'data2' |
1172 |
withString:(tempArguments valueAt:1) storeString "/ was "keyAt:1" |
|
3024 | 1173 |
]. |
1174 |
(tempArguments size) > 1 ifTrue:[ |
|
3544 | 1175 |
newValue := newValue copyReplaceString:'data3' |
3675 | 1176 |
withString:(tempArguments valueAt:2) storeString. "/ was "keyAt:2" |
3024 | 1177 |
]. |
1178 |
(tempArguments size) > 2 ifTrue:[ |
|
3544 | 1179 |
newValue := newValue copyReplaceString:'data4' |
3675 | 1180 |
withString:(tempArguments valueAt:3) storeString. "/ was: keyAt:3 |
3024 | 1181 |
]. |
1182 |
(tempArguments size) > 3 ifTrue:[ |
|
1183 |
self halt:'unimplemented'. |
|
1184 |
]. |
|
3544 | 1185 |
" newValue:= value copyReplaceString: 'data3' withString:(self messageAnswer key). " |
3024 | 1186 |
newValue := newValue , ' --> ' , (tempAnswer key). |
1187 |
newValue replaceAll:Character cr with:Character space. |
|
1188 |
resultArray at:key put:newValue. |
|
1189 |
]. |
|