author | Claus Gittinger <cg@exept.de> |
Thu, 03 May 2012 08:02:26 +0200 | |
changeset 2889 | e17b2eacfe84 |
parent 2887 | 01e4c1a45e35 |
child 2890 | 3d8556368fe9 |
permissions | -rw-r--r-- |
1522 | 1 |
"{ Package: 'stx:libtool2' }" |
2 |
||
3 |
ApplicationModel subclass:#MethodFinderWindow |
|
4 |
instanceVariableNames:'argumentsEditor messageAnswerEditor receiverEditor receiver |
|
5 |
resultSelectors arg2BoxVisible arg1BoxVisible arg4BoxVisible |
|
6 |
arg3BoxVisible argCountHolder argCountList argument1Editor |
|
7 |
argument2Editor argument3Editor argument4Editor resultSelected |
|
1532 | 8 |
lookAtResultEditor codeHolder' |
1522 | 9 |
classVariableNames:'' |
10 |
poolDictionaries:'' |
|
1538 | 11 |
category:'Interface-MethodFinder' |
1522 | 12 |
! |
13 |
||
1530 | 14 |
!MethodFinderWindow class methodsFor:'documentation'! |
15 |
||
16 |
documentation |
|
17 |
" |
|
1531 | 18 |
[author:] |
19 |
ported from Squeak and GUI enhanced by James Hayes james@exept.de |
|
1530 | 20 |
" |
21 |
! ! |
|
1522 | 22 |
|
1532 | 23 |
!MethodFinderWindow class methodsFor:'constants'! |
24 |
||
25 |
markerForImplementingClass |
|
26 |
^ '=> '. |
|
27 |
^ '*' |
|
28 |
||
29 |
"Created: / 13.11.2001 / 12:09:52 / cg" |
|
30 |
"Modified: / 13.11.2001 / 12:11:57 / cg" |
|
31 |
! ! |
|
32 |
||
1522 | 33 |
!MethodFinderWindow class methodsFor:'interface specs'! |
34 |
||
35 |
windowSpec |
|
36 |
"This resource specification was automatically generated |
|
37 |
by the UIPainter of ST/X." |
|
38 |
||
39 |
"Do not manually edit this!! If it is corrupted, |
|
40 |
the UIPainter may not be able to read the specification." |
|
41 |
||
42 |
" |
|
43 |
UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec |
|
44 |
MethodFinderWindow new openInterface:#windowSpec |
|
45 |
MethodFinderWindow open |
|
46 |
" |
|
47 |
||
48 |
<resource: #canvas> |
|
49 |
||
50 |
^ |
|
2886 | 51 |
#(FullSpec |
52 |
name: windowSpec |
|
53 |
window: |
|
54 |
(WindowSpec |
|
55 |
label: 'MethodFinder' |
|
56 |
name: 'MethodFinder' |
|
57 |
bounds: (Rectangle 0 0 550 400) |
|
58 |
menu: menu |
|
1522 | 59 |
) |
2886 | 60 |
component: |
61 |
(SpecCollection |
|
62 |
collection: ( |
|
63 |
(VariableHorizontalPanelSpec |
|
64 |
name: 'VariableHorizontalPanel1' |
|
65 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
66 |
snapMode: both |
|
67 |
component: |
|
68 |
(SpecCollection |
|
69 |
collection: ( |
|
70 |
(ViewSpec |
|
71 |
name: 'LeftBox' |
|
72 |
level: 1 |
|
73 |
component: |
|
74 |
(SpecCollection |
|
75 |
collection: ( |
|
76 |
(ViewSpec |
|
77 |
name: 'ReceiverArgBox' |
|
2887 | 78 |
layout: (LayoutFrame 0 0 0 0 0 1 -100 0.5) |
2886 | 79 |
component: |
80 |
(SpecCollection |
|
81 |
collection: ( |
|
82 |
(LabelSpec |
|
83 |
label: 'Receiver' |
|
84 |
name: 'ReceiverLabel' |
|
85 |
layout: (LayoutFrame 0 0 0 0 0 0.34 24 0) |
|
86 |
translateLabel: true |
|
87 |
) |
|
88 |
(ComboListSpec |
|
89 |
name: 'allowedArgments' |
|
90 |
layout: (LayoutFrame 0 0.34 1 0 0 0.64 23 0) |
|
91 |
model: argCountHolder |
|
92 |
comboList: argCountList |
|
93 |
useIndex: true |
|
1530 | 94 |
) |
2886 | 95 |
(LabelSpec |
96 |
label: 'Answer' |
|
97 |
name: 'MessageAnswerLabel' |
|
98 |
layout: (LayoutFrame 0 0.64 0 0 0 1 24 0) |
|
99 |
translateLabel: true |
|
1532 | 100 |
) |
2886 | 101 |
(HorizontalPanelViewSpec |
102 |
name: 'HorizontalPanel1' |
|
103 |
layout: (LayoutFrame 0 0 25 0 0 1 0 1) |
|
104 |
horizontalLayout: fit |
|
105 |
verticalLayout: fit |
|
106 |
horizontalSpace: 3 |
|
107 |
verticalSpace: 3 |
|
108 |
component: |
|
109 |
(SpecCollection |
|
110 |
collection: ( |
|
111 |
(WorkspaceSpec |
|
112 |
name: 'ReceiverEditor' |
|
113 |
tabable: true |
|
114 |
hasHorizontalScrollBar: true |
|
115 |
hasVerticalScrollBar: true |
|
116 |
miniScrollerHorizontal: true |
|
117 |
miniScrollerVertical: true |
|
118 |
autoHideScrollBars: true |
|
119 |
hasKeyboardFocusInitially: false |
|
2887 | 120 |
extent: (Point 87 74) |
2886 | 121 |
postBuildCallback: receiverWidgetCreated: |
1532 | 122 |
) |
2886 | 123 |
(VerticalPanelViewSpec |
124 |
name: 'VerticalPanel1' |
|
125 |
horizontalLayout: fit |
|
126 |
verticalLayout: fit |
|
127 |
horizontalSpace: 3 |
|
128 |
verticalSpace: 3 |
|
129 |
component: |
|
130 |
(SpecCollection |
|
131 |
collection: ( |
|
132 |
(ViewSpec |
|
133 |
name: 'Box1' |
|
134 |
visibilityChannel: arg1BoxVisible |
|
135 |
component: |
|
136 |
(SpecCollection |
|
137 |
collection: ( |
|
138 |
(WorkspaceSpec |
|
139 |
name: 'Arg1Editor' |
|
140 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
141 |
tabable: true |
|
142 |
hasHorizontalScrollBar: true |
|
143 |
hasVerticalScrollBar: true |
|
144 |
miniScrollerHorizontal: true |
|
145 |
miniScrollerVertical: true |
|
146 |
autoHideScrollBars: true |
|
147 |
hasKeyboardFocusInitially: false |
|
148 |
postBuildCallback: argument1WidgetCreated: |
|
1532 | 149 |
) |
150 |
) |
|
151 |
||
152 |
) |
|
2887 | 153 |
extent: (Point 87 23) |
1532 | 154 |
) |
2886 | 155 |
(ViewSpec |
156 |
name: 'Box2' |
|
157 |
visibilityChannel: arg2BoxVisible |
|
158 |
component: |
|
159 |
(SpecCollection |
|
160 |
collection: ( |
|
161 |
(WorkspaceSpec |
|
162 |
name: 'TextEditor5' |
|
163 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
164 |
tabable: true |
|
165 |
hasHorizontalScrollBar: true |
|
166 |
hasVerticalScrollBar: true |
|
167 |
miniScrollerHorizontal: true |
|
168 |
miniScrollerVertical: true |
|
169 |
autoHideScrollBars: true |
|
170 |
hasKeyboardFocusInitially: false |
|
171 |
postBuildCallback: argument2WidgetCreated: |
|
1532 | 172 |
) |
173 |
) |
|
174 |
||
175 |
) |
|
2887 | 176 |
extent: (Point 87 22) |
1532 | 177 |
) |
2886 | 178 |
(ViewSpec |
179 |
name: 'Box3' |
|
180 |
visibilityChannel: arg3BoxVisible |
|
181 |
component: |
|
182 |
(SpecCollection |
|
183 |
collection: ( |
|
184 |
(WorkspaceSpec |
|
185 |
name: 'TextEditor6' |
|
186 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
187 |
tabable: true |
|
188 |
hasHorizontalScrollBar: true |
|
189 |
hasVerticalScrollBar: true |
|
190 |
miniScrollerHorizontal: true |
|
191 |
miniScrollerVertical: true |
|
192 |
autoHideScrollBars: true |
|
193 |
hasKeyboardFocusInitially: false |
|
194 |
postBuildCallback: argument3WidgetCreated: |
|
1532 | 195 |
) |
196 |
) |
|
197 |
||
198 |
) |
|
2887 | 199 |
extent: (Point 87 23) |
1530 | 200 |
) |
201 |
) |
|
202 |
||
203 |
) |
|
2887 | 204 |
extent: (Point 87 74) |
1530 | 205 |
) |
2886 | 206 |
(WorkspaceSpec |
207 |
name: 'AnswerEditor' |
|
208 |
tabable: true |
|
209 |
hasHorizontalScrollBar: true |
|
210 |
hasVerticalScrollBar: true |
|
211 |
miniScrollerHorizontal: true |
|
212 |
miniScrollerVertical: true |
|
213 |
autoHideScrollBars: true |
|
214 |
hasKeyboardFocusInitially: false |
|
2887 | 215 |
extent: (Point 88 74) |
2886 | 216 |
postBuildCallback: messageAnswerWidgetCreated: |
1525 | 217 |
) |
218 |
) |
|
219 |
||
220 |
) |
|
221 |
) |
|
1532 | 222 |
) |
223 |
||
224 |
) |
|
225 |
) |
|
2886 | 226 |
(ViewSpec |
227 |
name: 'ReceiverArgBoxActionBox' |
|
2887 | 228 |
layout: (LayoutFrame 0 0 -98 0.5 0 1 -75 0.5) |
2886 | 229 |
component: |
230 |
(SpecCollection |
|
231 |
collection: ( |
|
232 |
(ActionButtonSpec |
|
233 |
label: 'Clear' |
|
234 |
name: 'Button2' |
|
235 |
layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1) |
|
236 |
translateLabel: true |
|
237 |
model: clear |
|
1532 | 238 |
) |
2886 | 239 |
(ActionButtonSpec |
240 |
label: 'Search' |
|
241 |
name: 'Button1' |
|
242 |
layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1) |
|
243 |
translateLabel: true |
|
244 |
tabable: true |
|
245 |
model: search |
|
1522 | 246 |
) |
247 |
) |
|
248 |
||
249 |
) |
|
250 |
) |
|
2886 | 251 |
(ViewSpec |
252 |
name: 'MatchActionBox' |
|
2887 | 253 |
layout: (LayoutFrame 0 0 -70 0.5 0 1 -20 0.5) |
2886 | 254 |
component: |
255 |
(SpecCollection |
|
256 |
collection: ( |
|
257 |
(LabelSpec |
|
258 |
label: 'Selector Pattern:' |
|
259 |
name: 'Label1' |
|
2887 | 260 |
layout: (LayoutFrame 0 0 0 0 0 0.5 25 0) |
2886 | 261 |
translateLabel: true |
262 |
adjust: left |
|
263 |
) |
|
264 |
(InputFieldSpec |
|
265 |
name: 'EntryField1' |
|
2887 | 266 |
layout: (LayoutFrame 0 0 -25 1 0 0.5 -5 1) |
2886 | 267 |
model: selectorPattern |
268 |
immediateAccept: true |
|
269 |
acceptOnReturn: true |
|
270 |
acceptOnTab: true |
|
271 |
acceptOnPointerLeave: true |
|
272 |
) |
|
273 |
(ActionButtonSpec |
|
274 |
label: 'Search' |
|
275 |
name: 'Button4' |
|
276 |
layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1) |
|
277 |
translateLabel: true |
|
278 |
tabable: true |
|
279 |
model: searchPatternMatches |
|
280 |
) |
|
281 |
) |
|
282 |
||
283 |
) |
|
284 |
) |
|
285 |
(SequenceViewSpec |
|
286 |
name: 'ResultList' |
|
2887 | 287 |
layout: (LayoutFrame 0 0 -15 0.5 0 1 0 1) |
2886 | 288 |
hasHorizontalScrollBar: true |
289 |
hasVerticalScrollBar: true |
|
290 |
autoHideScrollBars: true |
|
291 |
valueChangeSelector: updateImplementorsOf: |
|
292 |
useIndex: true |
|
293 |
sequenceList: resultHolder |
|
294 |
) |
|
1530 | 295 |
) |
296 |
||
297 |
) |
|
298 |
) |
|
2886 | 299 |
(VariableVerticalPanelSpec |
300 |
name: 'VariableVerticalPanel1' |
|
301 |
component: |
|
302 |
(SpecCollection |
|
303 |
collection: ( |
|
304 |
(SequenceViewSpec |
|
305 |
name: 'List2' |
|
306 |
model: selectedClassOfResultHolder |
|
307 |
menu: implementorListMenu |
|
308 |
hasHorizontalScrollBar: true |
|
309 |
hasVerticalScrollBar: true |
|
310 |
autoHideScrollBars: true |
|
311 |
doubleClickSelector: openBrowserOn: |
|
312 |
valueChangeSelector: selectedClassOfResultHolderChanged |
|
313 |
useIndex: false |
|
314 |
sequenceList: classOfResultHolder |
|
1530 | 315 |
) |
2886 | 316 |
(CodeViewSpec |
317 |
name: 'CodeView' |
|
318 |
model: codeHolder |
|
319 |
hasHorizontalScrollBar: true |
|
320 |
hasVerticalScrollBar: true |
|
321 |
autoHideScrollBars: true |
|
322 |
hasKeyboardFocusInitially: false |
|
323 |
postBuildCallback: sourceCodeWidgetCreated: |
|
1522 | 324 |
) |
325 |
) |
|
326 |
||
327 |
) |
|
2886 | 328 |
handles: (Any 0.5 1.0) |
1522 | 329 |
) |
330 |
) |
|
331 |
||
332 |
) |
|
2886 | 333 |
handles: (Any 0.5 1.0) |
1522 | 334 |
) |
335 |
) |
|
336 |
||
337 |
) |
|
338 |
) |
|
339 |
! ! |
|
340 |
||
1525 | 341 |
!MethodFinderWindow class methodsFor:'menu specs'! |
342 |
||
1529 | 343 |
implementorListMenu |
344 |
"This resource specification was automatically generated |
|
345 |
by the MenuEditor of ST/X." |
|
346 |
||
347 |
"Do not manually edit this!! If it is corrupted, |
|
348 |
the MenuEditor may not be able to read the specification." |
|
349 |
||
350 |
" |
|
351 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu |
|
352 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp |
|
353 |
" |
|
354 |
||
355 |
<resource: #menu> |
|
356 |
||
357 |
^ |
|
358 |
#(#Menu |
|
359 |
#( |
|
360 |
#(#MenuItem |
|
361 |
#label: 'Browse' |
|
362 |
#translateLabel: true |
|
363 |
#value: #openBrowserOnSelectedItem |
|
364 |
) |
|
365 |
) |
|
366 |
nil |
|
367 |
nil |
|
368 |
) |
|
369 |
! |
|
370 |
||
1525 | 371 |
menu |
372 |
"This resource specification was automatically generated |
|
373 |
by the MenuEditor of ST/X." |
|
374 |
||
375 |
"Do not manually edit this!! If it is corrupted, |
|
376 |
the MenuEditor may not be able to read the specification." |
|
377 |
||
378 |
" |
|
379 |
MenuEditor new openOnClass:MethodFinderWindow andSelector:#menu |
|
380 |
(Menu new fromLiteralArrayEncoding:(MethodFinderWindow menu)) startUp |
|
381 |
" |
|
382 |
||
383 |
<resource: #menu> |
|
384 |
||
385 |
^ |
|
386 |
#(#Menu |
|
387 |
#( |
|
388 |
#(#MenuItem |
|
389 |
#label: '&File' |
|
390 |
#activeHelpKey: #file |
|
391 |
#submenu: |
|
392 |
#(#Menu |
|
393 |
#( |
|
394 |
#(#MenuItem |
|
395 |
#label: 'Exit' |
|
396 |
#value: #closeRequest |
|
397 |
#activeHelpKey: #fileExit |
|
398 |
) |
|
399 |
) |
|
400 |
nil |
|
401 |
nil |
|
402 |
) |
|
403 |
) |
|
404 |
#(#MenuItem |
|
405 |
#label: 'Help' |
|
406 |
#startGroup: #right |
|
407 |
#submenu: |
|
408 |
#(#Menu |
|
409 |
#( |
|
410 |
#(#MenuItem |
|
411 |
#label: 'Documentation' |
|
412 |
#value: #openHTMLDocumentation |
|
413 |
#activeHelpKey: #helpTutorial |
|
414 |
) |
|
415 |
#(#MenuItem |
|
1532 | 416 |
#label: 'About MethodFinder...' |
1525 | 417 |
#value: #openAboutThisApplication |
418 |
#activeHelpKey: #aboutThisAppliaction |
|
419 |
) |
|
420 |
) |
|
421 |
nil |
|
422 |
nil |
|
423 |
) |
|
424 |
) |
|
425 |
) |
|
426 |
nil |
|
427 |
nil |
|
428 |
) |
|
1532 | 429 |
|
430 |
"Modified: / 13.11.2001 / 12:36:39 / cg" |
|
1525 | 431 |
! ! |
432 |
||
1522 | 433 |
!MethodFinderWindow methodsFor:'accessing'! |
434 |
||
435 |
receiver |
|
1525 | 436 |
"Return a copy of the value of the instance variable 'receiver' " |
1522 | 437 |
|
438 |
^ receiver copy |
|
439 |
! ! |
|
440 |
||
441 |
!MethodFinderWindow methodsFor:'actions'! |
|
442 |
||
443 |
argumentEditorsContents |
|
1525 | 444 |
|
445 |
"Determine how many text editors of the arguments are used and store the result |
|
446 |
as argCounter. The result being the minimum between how many editors have |
|
447 |
expressions in and how many are displayed. |
|
448 |
||
449 |
Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary |
|
450 |
from each of the text editors. |
|
451 |
||
452 |
Return the OrderedDictionary with the expressions from all the text editors. " |
|
453 |
||
2165 | 454 |
| tempArguments argCounter tempArgument1Editor tempArgument2Editor tempArgument3Editor |
1522 | 455 |
associationKey associationValue| |
456 |
||
457 |
argCounter:=0. |
|
458 |
||
459 |
tempArgument1Editor:= (self cleanInputs: argument1Editor contents). |
|
460 |
tempArgument2Editor:= (self cleanInputs: argument2Editor contents). |
|
461 |
tempArgument3Editor:= (self cleanInputs: argument3Editor contents). |
|
462 |
||
463 |
tempArgument1Editor = '' ifFalse:[argCounter:=argCounter +1]. |
|
464 |
tempArgument2Editor = '' ifFalse:[argCounter:=argCounter +1]. |
|
465 |
tempArgument3Editor = '' ifFalse:[argCounter:=argCounter +1]. |
|
466 |
||
467 |
||
468 |
argCounter:= (argCounter min: (self argCountHolder value -1)). |
|
469 |
tempArguments:= OrderedDictionary new:argCounter. |
|
470 |
||
471 |
(argCounter value >= 1) |
|
472 |
ifTrue:[associationValue:= (Compiler evaluate: tempArgument1Editor). |
|
473 |
((self isExpression:tempArgument1Editor) or:[ associationValue isNil]) ifTrue:[ "looks if an expression is typed in" |
|
474 |
associationKey:=associationValue printString] |
|
475 |
ifFalse:[ |
|
476 |
associationKey:=tempArgument1Editor]. |
|
477 |
||
478 |
tempArguments add: associationKey-> associationValue. |
|
479 |
]. |
|
480 |
(argCounter value >= 2) |
|
481 |
ifTrue:[ associationValue:= (Compiler evaluate: tempArgument2Editor). |
|
482 |
(((self isExpression:tempArgument2Editor) or:[ associationValue isNil])) ifTrue:[ "looks if an expression is typed in" |
|
483 |
associationKey:=associationValue printString] |
|
484 |
ifFalse:[ |
|
485 |
associationKey:=tempArgument2Editor]. |
|
486 |
||
487 |
tempArguments add: associationKey-> associationValue]. |
|
488 |
||
489 |
(argCounter value >= 3) |
|
490 |
ifTrue:[ associationValue:= (Compiler evaluate: tempArgument3Editor). |
|
491 |
((self isExpression:tempArgument3Editor) or:[ associationValue isNil]) ifTrue:[ "looks if an expression is typed in" |
|
492 |
associationKey:=associationValue printString] |
|
493 |
ifFalse:[ |
|
494 |
associationKey:=tempArgument3Editor]. |
|
495 |
||
496 |
tempArguments add: associationKey-> associationValue]. |
|
497 |
||
498 |
||
499 |
^tempArguments |
|
500 |
! |
|
501 |
||
502 |
clear |
|
1525 | 503 |
"Reset the contents of all the outputs. Return the receiver." |
1522 | 504 |
|
505 |
receiverEditor contents:nil. |
|
506 |
argument1Editor contents:nil. |
|
507 |
argument2Editor contents:nil. |
|
508 |
argument3Editor contents:nil. |
|
509 |
messageAnswerEditor contents:nil. |
|
510 |
self resultHolder value:nil. |
|
1525 | 511 |
self classOfResultHolder value: nil. |
2730 | 512 |
codeHolder value:nil. |
1522 | 513 |
! |
514 |
||
1532 | 515 |
extractClassAndSelectorFrom:anArgument |
516 |
"Opens browser on theArgument of a specific class. anArgument being a string with the |
|
517 |
Class and the selector upon which the browser is to be opened. Return the receiver." |
|
518 |
||
519 |
|aClass aSelector x theArgument marker| |
|
520 |
||
521 |
anArgument isNil ifTrue:[ |
|
522 |
^ nil |
|
523 |
]. |
|
524 |
marker := self class markerForImplementingClass. |
|
525 |
||
526 |
theArgument := anArgument string. |
|
527 |
(theArgument startsWith:marker) ifTrue:[ |
|
528 |
theArgument := theArgument copyFrom:marker size+1 |
|
529 |
]. |
|
530 |
aClass := theArgument copyUpTo:(Character space). |
|
531 |
x := aClass size + 2. |
|
532 |
aSelector := theArgument copyFrom:x. |
|
533 |
aClass := Smalltalk classNamed:aClass. |
|
2886 | 534 |
(aSelector startsWith:'class ') ifTrue:[ |
535 |
aSelector := aSelector copyFrom:'class 'size+1. |
|
536 |
aClass := aClass class. |
|
537 |
]. |
|
1532 | 538 |
^ aClass -> aSelector asSymbol |
539 |
||
540 |
" |
|
541 |
MethodFinderWindow new extractClassAndSelectorFrom: '*SmallInteger +' |
|
542 |
MethodFinderWindow new extractClassAndSelectorFrom: 'String ,' |
|
543 |
MethodFinderWindow new extractClassAndSelectorFrom: 'Number detentBy:atMultiplesOf:snap:' |
|
544 |
||
545 |
||
546 |
" |
|
547 |
||
2886 | 548 |
"Modified: / 27-04-2012 / 15:05:53 / cg" |
1532 | 549 |
! |
550 |
||
1522 | 551 |
isExpression: aString |
1525 | 552 |
"Return true or false depending on if the subString includes certain characters" |
1522 | 553 |
(aString includesSubString:': ') ifTrue:[^true]. |
554 |
(aString includesSubString:'+') ifTrue:[^true]. |
|
555 |
(aString includesSubString:'-') ifTrue:[^true]. |
|
556 |
(aString includesSubString:'*') ifTrue:[^true]. |
|
557 |
(aString includesSubString:'/') ifTrue:[^true]. |
|
558 |
(aString includesSubString:'>') ifTrue:[^true]. |
|
559 |
(aString includesSubString:'<') ifTrue:[^true]. |
|
560 |
(aString includesSubString:' new') ifTrue:[^true]. |
|
561 |
(aString includesSubString:'[') & (aString includesSubString:']') & (aString includesSubString:'.') |
|
562 |
ifTrue:[^false]. |
|
563 |
(aString includesSubString:'.') ifTrue:[^true]. |
|
564 |
||
565 |
^false |
|
566 |
! |
|
567 |
||
568 |
messageAnswerEditorContents |
|
1525 | 569 |
"Return a cleaned up version of message answer taken from the messageAnswerEditor |
570 |
as an association. The association has cleanedAnswerString as a key and the |
|
571 |
compiledAnswer as value." |
|
1522 | 572 |
|
573 |
| aCleanedAnswerString compiledAnswer | |
|
574 |
||
575 |
aCleanedAnswerString:=self cleanInputs: (messageAnswerEditor contents). |
|
576 |
compiledAnswer:=Compiler evaluate: aCleanedAnswerString. |
|
577 |
((self isExpression:aCleanedAnswerString) or:[compiledAnswer isNil]) ifTrue:[ |
|
578 |
aCleanedAnswerString:=compiledAnswer printString]. |
|
579 |
||
580 |
^aCleanedAnswerString->compiledAnswer. |
|
581 |
! |
|
582 |
||
583 |
openBrowserOn:anArgument |
|
584 |
"Opens browser on theArgument of a specific class. anArgument being a string with the |
|
1525 | 585 |
Class and the selector upon which the browser is to be opened. Return the receiver." |
1522 | 586 |
|
1532 | 587 |
|classAndSelector| |
1522 | 588 |
|
1532 | 589 |
classAndSelector := self extractClassAndSelectorFrom:anArgument. |
590 |
classAndSelector isNil ifTrue:[ |
|
1525 | 591 |
^ self |
1522 | 592 |
]. |
2459 | 593 |
UserPreferences current systemBrowserClass |
594 |
openInClass:classAndSelector key |
|
595 |
selector:classAndSelector value |
|
1525 | 596 |
|
597 |
" |
|
598 |
MethodFinderWindow new openBrowserOn: '*SmallInteger +' |
|
599 |
MethodFinderWindow new openBrowserOn: 'String ,' |
|
600 |
MethodFinderWindow new openBrowserOn: 'Number detentBy:atMultiplesOf:snap:' |
|
601 |
||
602 |
||
603 |
" |
|
1532 | 604 |
|
605 |
"Modified: / 13.11.2001 / 12:46:17 / cg" |
|
1522 | 606 |
! |
607 |
||
1529 | 608 |
openBrowserOnSelectedItem |
609 |
|sel| |
|
610 |
||
611 |
sel := self selectedClassOfResultHolder value. |
|
612 |
self openBrowserOn:sel |
|
1532 | 613 |
|
614 |
"Modified: / 13.11.2001 / 12:47:39 / cg" |
|
1529 | 615 |
! |
616 |
||
1522 | 617 |
receiverEditorContents |
1525 | 618 |
"Return a cleaned up version of receiver taken from the receiverEditor |
619 |
as an association. The association has aCleanedRecieverString as a key and the |
|
620 |
compiledReceiver as value." |
|
621 |
||
1522 | 622 |
| aCleanedRecieverString compiledReceiver | |
623 |
||
624 |
aCleanedRecieverString:=self cleanInputs: (receiverEditor contents). |
|
625 |
||
626 |
compiledReceiver:=Compiler evaluate: aCleanedRecieverString. |
|
627 |
||
628 |
((self isExpression:aCleanedRecieverString) or:[compiledReceiver isNil]) ifTrue:[ |
|
629 |
aCleanedRecieverString:=compiledReceiver printString]. |
|
630 |
^aCleanedRecieverString->compiledReceiver. |
|
631 |
! |
|
632 |
||
633 |
search |
|
1525 | 634 |
"Do a search based on the input in the various text editors. Return the receiver." |
1522 | 635 |
| tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf| |
1534 | 636 |
|
637 |
self resultHolder value: nil. "reset the result list" |
|
1522 | 638 |
self classOfResultHolder value: nil. "reset the implementorOf list" |
1534 | 639 |
self codeHolder value: nil. "reset the source" |
1522 | 640 |
|
641 |
tempArguments:=self argumentEditorsContents. |
|
642 |
tempReceiver :=self receiverEditorContents . |
|
643 |
tempAnswer:= self messageAnswerEditorContents. |
|
644 |
||
645 |
"self cleanInputRec:tempReceiver arg:tempArguments ans:tempAnswer." |
|
646 |
||
647 |
||
648 |
anArray:=Array new:2. "creates an array which is to be used as input for the method finder." |
|
649 |
||
650 |
receiverWithArgument:=self mergReciever: (tempReceiver value) WithArgument: (tempArguments values). |
|
651 |
||
652 |
anArray at:1 put:receiverWithArgument; |
|
653 |
at:2 put: tempAnswer value. |
|
654 |
||
655 |
"an array now holds the following array #(#(receiver argument) answer) or #(#(reciever) answer). which should |
|
656 |
be suitable input for the method finder." |
|
1534 | 657 |
self withCursor:Cursor execute do:[ |
658 |
mf:= MethodFinder new. |
|
659 |
resultArray:= mf load: anArray; findMessage. |
|
660 |
]. |
|
1522 | 661 |
|
662 |
((resultArray at: 1 )includesSubString: 'no single') ifTrue:[ |
|
663 |
self warn: (resultArray at: 1 ). |
|
664 |
^self |
|
665 |
]. |
|
666 |
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments" |
|
2859 | 667 |
|
1522 | 668 |
resultArray keysAndValuesDo:[:key :value | | newValue | |
669 |
newValue:= value replString: 'data1' withString:(tempReceiver key). |
|
670 |
(tempArguments size) >= 1 ifTrue:[ |
|
671 |
newValue:= newValue replString: 'data2' withString:(tempArguments keyAt:1)]. |
|
672 |
||
673 |
(tempArguments size) > 1 ifTrue:[ |
|
674 |
newValue:= newValue replString: 'data3' withString:(tempArguments keyAt:2).]. |
|
675 |
||
676 |
(tempArguments size) > 2 ifTrue:[ |
|
677 |
newValue:= newValue replString: 'data4' withString:(tempArguments keyAt:3).]. |
|
678 |
||
2859 | 679 |
(tempArguments size) > 3 ifTrue:[ self halt:'unimplemented'. ]. |
1532 | 680 |
|
1522 | 681 |
|
682 |
" newValue:= value replString: 'data3' withString:(self messageAnswer key). " |
|
683 |
||
684 |
newValue:=newValue, ' --> ', (tempAnswer key). |
|
1532 | 685 |
newValue replaceAll:Character cr with:Character space. |
1522 | 686 |
|
687 |
resultArray at: key put: newValue. |
|
688 |
||
689 |
]. |
|
690 |
||
691 |
self resultHolder value: resultArray. |
|
692 |
resultSelectors:= mf selectors. "used to find implementors so we do not have to " |
|
693 |
receiver:=tempReceiver "search the string for the selector found. Stored as an ordered collection" |
|
1532 | 694 |
|
2859 | 695 |
"Modified: / 26-09-2011 / 12:42:28 / cg" |
1532 | 696 |
! |
697 |
||
2886 | 698 |
searchPatternMatches |
699 |
"Do a search based on the pattern match" |
|
700 |
||
701 |
| pattern list selectors counts| |
|
702 |
||
703 |
pattern := self selectorPattern value. |
|
704 |
||
705 |
self resultHolder value: nil. "reset the result list" |
|
706 |
self classOfResultHolder value: nil. "reset the implementorOf list" |
|
707 |
self codeHolder value: nil. "reset the source" |
|
708 |
||
709 |
self withCursor:Cursor execute do:[ |
|
2889
e17b2eacfe84
changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents:
2887
diff
changeset
|
710 |
pattern includesMatchCharacters ifFalse:[ |
e17b2eacfe84
changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents:
2887
diff
changeset
|
711 |
pattern := '*',pattern,'*' |
e17b2eacfe84
changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents:
2887
diff
changeset
|
712 |
]. |
2886 | 713 |
list := SystemBrowser findImplementorsMatching:pattern in:Smalltalk allClasses ignoreCase:true. |
714 |
]. |
|
715 |
||
716 |
counts := IdentityDictionary new. |
|
717 |
selectors := IdentitySet new. |
|
718 |
||
719 |
list do:[:eachMethod | |
|
720 |
selectors add: eachMethod selector. |
|
721 |
(counts at:(eachMethod selector) ifAbsentPut:[0 asValue]) increment |
|
722 |
]. |
|
723 |
||
724 |
resultSelectors := selectors asOrderedCollection sort. |
|
725 |
||
726 |
self resultHolder value: (resultSelectors collect:[:sel | sel,' --> ',(counts at:sel) value printString,' implementor(s)']). |
|
727 |
||
728 |
"Created: / 27-04-2012 / 14:46:35 / cg" |
|
729 |
! |
|
730 |
||
1532 | 731 |
selectedClassOfResultHolderChanged |
732 |
|sel classAndSelector mthd| |
|
733 |
||
734 |
sel := self selectedClassOfResultHolder value. |
|
735 |
||
736 |
classAndSelector := self extractClassAndSelectorFrom:sel. |
|
737 |
classAndSelector isNil ifTrue:[ |
|
738 |
^ self |
|
739 |
]. |
|
740 |
mthd := classAndSelector key >> classAndSelector value. |
|
741 |
mthd notNil ifTrue:[ |
|
742 |
self withWaitCursorDo:[ |
|
743 |
self codeHolder value:mthd source |
|
744 |
] |
|
745 |
] ifFalse:[ |
|
746 |
self codeHolder value:nil |
|
747 |
]. |
|
748 |
||
749 |
"Created: / 13.11.2001 / 12:43:43 / cg" |
|
750 |
"Modified: / 13.11.2001 / 12:48:56 / cg" |
|
1522 | 751 |
! |
752 |
||
753 |
updateImplementorsOf:anInteger |
|
1525 | 754 |
"Request the implementors of the selected argument provided by aNumber. |
755 |
Return the receiver. " |
|
1522 | 756 |
|methods classList aNumber| |
757 |
||
1525 | 758 |
|
1522 | 759 |
(anInteger isNil) ifTrue:[^self]. |
760 |
anInteger isNil ifTrue:[aNumber:=1] |
|
761 |
ifFalse:[aNumber:=anInteger]. |
|
1525 | 762 |
methods:=SystemBrowser findImplementorsOf: (resultSelectors at:aNumber) in:Smalltalk allClasses ignoreCase:false. |
763 |
classList:=methods asOrderedCollection collect:[:m | m mclass name , ' ' , m selector]. |
|
1522 | 764 |
|
765 |
classList:=(self markMatchingClasses:(resultSelectors at:aNumber) classesWithSelector:classList). |
|
766 |
||
767 |
self classOfResultHolder value: classList. |
|
1532 | 768 |
self selectedClassOfResultHolder value:nil. |
769 |
||
770 |
"Modified: / 13.11.2001 / 12:07:31 / cg" |
|
1522 | 771 |
! ! |
772 |
||
773 |
!MethodFinderWindow methodsFor:'aspects'! |
|
774 |
||
775 |
arg1BoxVisible |
|
1525 | 776 |
"Determines if the box should be visble or not. Return true or false" |
1522 | 777 |
arg1BoxVisible isNil ifTrue:[ |
778 |
arg1BoxVisible := BlockValue |
|
779 |
with:[:vh | vh value >= 2 ] |
|
780 |
argument:(self argCountHolder) |
|
781 |
]. |
|
782 |
^ arg1BoxVisible. |
|
783 |
! |
|
784 |
||
785 |
arg2BoxVisible |
|
1525 | 786 |
"Determines if the box should be visble or not. Return true or false" |
1522 | 787 |
arg2BoxVisible isNil ifTrue:[ |
788 |
arg2BoxVisible := BlockValue |
|
789 |
with:[:vh | vh value >= 3 ] |
|
790 |
argument:(self argCountHolder) |
|
791 |
]. |
|
792 |
^ arg2BoxVisible. |
|
793 |
! |
|
794 |
||
795 |
arg3BoxVisible |
|
1525 | 796 |
"Determines if the box should be visble or not. Return true or false" |
1522 | 797 |
arg3BoxVisible isNil ifTrue:[ |
798 |
arg3BoxVisible := BlockValue |
|
799 |
with:[:vh | vh value >= 4 ] |
|
800 |
argument:(self argCountHolder) |
|
801 |
]. |
|
802 |
^ arg3BoxVisible. |
|
803 |
! |
|
804 |
||
805 |
arg4BoxVisible |
|
1525 | 806 |
"Determines if the box should be visble or not. Return true or false" |
1522 | 807 |
arg4BoxVisible isNil ifTrue:[ |
808 |
arg4BoxVisible := BlockValue |
|
809 |
with:[:vh | vh value >= 5 ] |
|
810 |
argument:(self argCountHolder) |
|
811 |
]. |
|
812 |
^ arg4BoxVisible. |
|
813 |
! |
|
814 |
||
815 |
argCountHolder |
|
1525 | 816 |
"Return the value of argCounterHolder which is initialized at 2." |
1522 | 817 |
argCountHolder isNil ifTrue:[ |
818 |
argCountHolder := 2 asValue. |
|
819 |
]. |
|
820 |
^ argCountHolder. |
|
821 |
! |
|
822 |
||
823 |
argCountList |
|
1525 | 824 |
"Return the argCountList" |
1522 | 825 |
argCountList isNil ifTrue:[ |
826 |
argCountList := #('0 arguments' '1 argument' '2 arguments' '3 arguments') asValue |
|
827 |
]. |
|
828 |
^ argCountList. |
|
829 |
! |
|
830 |
||
831 |
classOfResultHolder |
|
1525 | 832 |
"Return a valueHolder which contains a collection with the names of the |
833 |
implementors of a specific message. " |
|
1522 | 834 |
|
835 |
|holder| |
|
836 |
(holder := builder bindingAt:#classOfResultHolder) isNil ifTrue:[ |
|
1525 | 837 |
holder := ValueHolder new. |
838 |
builder aspectAt:#classOfResultHolder put:holder |
|
1522 | 839 |
]. |
840 |
^ holder |
|
841 |
! |
|
842 |
||
1532 | 843 |
codeHolder |
844 |
codeHolder isNil ifTrue:[ |
|
845 |
codeHolder := '' asValue. |
|
846 |
]. |
|
847 |
^ codeHolder. |
|
848 |
||
849 |
"Created: / 13.11.2001 / 12:44:11 / cg" |
|
850 |
! |
|
851 |
||
1522 | 852 |
resultHolder |
1525 | 853 |
"Return a value holder which contains the results of a search as a collection." |
1522 | 854 |
|
855 |
|holder| |
|
856 |
(holder := builder bindingAt:#resultHolder) isNil ifTrue:[ |
|
1525 | 857 |
holder := ValueHolder new. |
858 |
builder aspectAt:#resultHolder put:holder. |
|
2887 | 859 |
holder value:{ |
860 |
'Please enter combination of' . |
|
861 |
' ',('receiver, arg and result' allBold) . |
|
862 |
'or a'. |
|
863 |
' ',('selector search pattern' allBold) . |
|
864 |
'into the above fields,'. |
|
865 |
'then click on either ',('"search"' allBold),'-button.' |
|
866 |
} |
|
1522 | 867 |
]. |
868 |
^ holder. |
|
2886 | 869 |
|
2887 | 870 |
"Modified: / 27-04-2012 / 15:14:32 / cg" |
1529 | 871 |
! |
872 |
||
873 |
selectedClassOfResultHolder |
|
874 |
"Return a valueHolder which contains the index of the selected result class |
|
875 |
(right list)" |
|
876 |
||
877 |
|holder| |
|
878 |
(holder := builder bindingAt:#selectedClassOfResultHolder) isNil ifTrue:[ |
|
879 |
holder := ValueHolder new. |
|
880 |
builder aspectAt:#selectedClassOfResultHolder put:holder |
|
881 |
]. |
|
882 |
^ holder |
|
2886 | 883 |
! |
884 |
||
885 |
selectorPattern |
|
886 |
|holder| |
|
887 |
(holder := builder bindingAt:#selectorPattern) isNil ifTrue:[ |
|
888 |
holder := ValueHolder new. |
|
889 |
builder aspectAt:#selectorPattern put:holder. |
|
890 |
holder onChangeSend:#searchPatternMatches to:self. |
|
891 |
]. |
|
892 |
^ holder |
|
893 |
||
894 |
"Created: / 27-04-2012 / 14:44:01 / cg" |
|
1522 | 895 |
! ! |
896 |
||
897 |
!MethodFinderWindow methodsFor:'callBacks'! |
|
898 |
||
899 |
argument1WidgetCreated: aWidget |
|
1525 | 900 |
"Store the widget as an instance variable. Return the receiver" |
901 |
||
902 |
||
1522 | 903 |
argument1Editor := aWidget scrolledView. |
1532 | 904 |
aWidget tabMeansNextField:true. |
905 |
||
906 |
"Modified: / 13.11.2001 / 12:21:41 / cg" |
|
1522 | 907 |
! |
908 |
||
909 |
argument2WidgetCreated: aWidget |
|
1525 | 910 |
"Store the widget as an instance variable. Return the receiver" |
911 |
||
1522 | 912 |
|
913 |
argument2Editor := aWidget scrolledView. |
|
1532 | 914 |
aWidget tabMeansNextField:true. |
915 |
||
916 |
"Modified: / 13.11.2001 / 12:21:45 / cg" |
|
1522 | 917 |
! |
918 |
||
919 |
argument3WidgetCreated: aWidget |
|
1525 | 920 |
"Store the widget as an instance variable. Return the receiver" |
921 |
||
1522 | 922 |
|
923 |
argument3Editor := aWidget scrolledView. |
|
1532 | 924 |
aWidget tabMeansNextField:true. |
925 |
||
926 |
"Modified: / 13.11.2001 / 12:21:49 / cg" |
|
1522 | 927 |
! |
928 |
||
1525 | 929 |
messageAnswerWidgetCreated: aWidget |
930 |
"Store the widget as an instance variable. Return the receiver" |
|
1522 | 931 |
|
1525 | 932 |
messageAnswerEditor := aWidget scrolledView. |
1532 | 933 |
aWidget tabMeansNextField:true. |
934 |
||
935 |
"Modified: / 13.11.2001 / 12:24:55 / cg" |
|
1522 | 936 |
! |
937 |
||
1525 | 938 |
openHTMLDocumentation |
939 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#METHODFINDER' |
|
1522 | 940 |
! |
941 |
||
942 |
receiverWidgetCreated: aWidget |
|
1525 | 943 |
"Store the widget as an instance variable. Return the receiver" |
1522 | 944 |
|
945 |
receiverEditor := aWidget scrolledView. |
|
1532 | 946 |
aWidget tabMeansNextField:true. |
947 |
||
948 |
"Modified: / 13.11.2001 / 12:24:49 / cg" |
|
949 |
! |
|
950 |
||
951 |
sourceCodeWidgetCreated: aWidget |
|
952 |
aWidget acceptAction:nil. |
|
953 |
aWidget readOnly:true |
|
954 |
||
955 |
"Created: / 13.11.2001 / 12:50:27 / cg" |
|
956 |
"Modified: / 13.11.2001 / 12:51:23 / cg" |
|
1522 | 957 |
! ! |
958 |
||
959 |
!MethodFinderWindow methodsFor:'controlInput'! |
|
960 |
||
961 |
cleanInputs: aDirtyString |
|
1525 | 962 |
"Find and remove common mistakes made by the user. Return the |
963 |
'aStringToBeCleaned' variable" |
|
1522 | 964 |
| aStringToBeCleaned rs position| |
965 |
||
966 |
aStringToBeCleaned:=aDirtyString. |
|
967 |
||
968 |
(aStringToBeCleaned endsWith:(Character cr)) ifTrue:[ |
|
969 |
aStringToBeCleaned:=aStringToBeCleaned copyFrom:1 to: (aStringToBeCleaned size -1).]. |
|
970 |
aStringToBeCleaned:= aStringToBeCleaned withoutSeparators. |
|
971 |
||
972 |
||
973 |
rs:=ReadStream on: aStringToBeCleaned. |
|
974 |
[rs upToAll: '#true'. rs atEnd] whileFalse: [ |
|
975 |
position:= rs position. |
|
976 |
aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #" |
|
977 |
rs:=ReadStream on: aStringToBeCleaned. |
|
978 |
]. |
|
979 |
||
980 |
rs:=ReadStream on: aStringToBeCleaned. |
|
981 |
[rs upToAll: '#false'. rs atEnd] whileFalse: [ |
|
982 |
position:= rs position. |
|
983 |
aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #" |
|
984 |
rs:=ReadStream on: aStringToBeCleaned. |
|
985 |
rs:=ReadStream on: aStringToBeCleaned. ]. |
|
986 |
||
987 |
[rs upToAll: '#nil'. rs atEnd] whileFalse: [ |
|
988 |
position:= rs position. |
|
989 |
aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #" |
|
990 |
rs:=ReadStream on: aStringToBeCleaned. ]. |
|
991 |
^aStringToBeCleaned |
|
992 |
! |
|
993 |
||
1525 | 994 |
markMatchingClasses: aSelector classesWithSelector:anOrderedCollection |
995 |
" Matches the class of the receiver with all the elements in anOrderedCollection |
|
996 |
(which are classes with selectors). If a match is found it is marked with an asterisk. |
|
997 |
The classes are then sorted so the the asterisk appears first. Return the |
|
998 |
markedClassList." |
|
1522 | 999 |
|
2165 | 1000 |
| marker recClass unmarkedClassList markedClassList| |
1522 | 1001 |
|
1532 | 1002 |
marker := self class markerForImplementingClass. |
1003 |
||
1004 |
recClass := receiver value class. |
|
1525 | 1005 |
unmarkedClassList:=anOrderedCollection copy. |
1006 |
unmarkedClassList do: |
|
1007 |
[:classAndMethod | | class | |
|
1008 |
class:=Compiler evaluate: |
|
1009 |
((ReadStream on: classAndMethod) upToAll: aSelector). |
|
1532 | 1010 |
"/ (recClass == class) |
1011 |
(recClass whichClassImplements:aSelector) == class |
|
1012 |
ifTrue: |
|
1013 |
["/ unmarkedClassList add: marker, classAndMethod. |
|
1014 |
unmarkedClassList add: classAndMethod allBold. |
|
1015 |
unmarkedClassList remove: classAndMethod. |
|
1016 |
]. |
|
1017 |
]. |
|
1522 | 1018 |
|
1019 |
unmarkedClassList sort:[:a :b | |rawA rawB| |
|
1532 | 1020 |
rawA := a string. |
1021 |
(rawA startsWith:marker) ifTrue:[rawA := rawA copyFrom:marker size+1]. |
|
1022 |
rawB := b string. |
|
1023 |
(rawB startsWith:marker) ifTrue:[rawB := rawB copyFrom:marker size+1]. |
|
1024 |
rawA < rawB. ]. |
|
1525 | 1025 |
markedClassList:= unmarkedClassList. |
1026 |
||
1027 |
^markedClassList |
|
1532 | 1028 |
|
1029 |
"Modified: / 13.11.2001 / 12:16:05 / cg" |
|
1522 | 1030 |
! |
1031 |
||
1032 |
mergReciever: aReceiver WithArgument: arguments |
|
1033 |
||
1525 | 1034 |
"Puts the receiver and arguments into an array so it can be of a suitable input for the |
1035 |
MethodFinder. Return an array." |
|
1036 |
||
1522 | 1037 |
| tempReceiver tempArguments receiverWithArgument| |
1038 |
||
1039 |
tempReceiver:= aReceiver. |
|
1040 |
tempArguments := arguments. |
|
1041 |
||
1042 |
(tempArguments isEmpty or:[(tempArguments) isNil]) |
|
1043 |
ifTrue:[ receiverWithArgument:=Array new:1."no argument" |
|
1044 |
receiverWithArgument at:1 put: tempReceiver. |
|
1045 |
] |
|
1046 |
ifFalse:[ |
|
1047 |
(tempArguments size = 1) |
|
1048 |
ifTrue:[ receiverWithArgument:=Array new:2. |
|
1049 |
receiverWithArgument at:1 put: tempReceiver. |
|
1050 |
receiverWithArgument at:2 put: (tempArguments at:1) |
|
1051 |
]. "a receiver with an argument" |
|
1052 |
||
1053 |
(tempArguments size = 2) |
|
1054 |
ifTrue:[ receiverWithArgument:=Array new:3. |
|
1055 |
receiverWithArgument at:1 put: tempReceiver. |
|
1056 |
(receiverWithArgument at:2 put: (tempArguments at:1)). |
|
1057 |
(receiverWithArgument at:3 put: (tempArguments at:2)) |
|
1058 |
]. "a receiver with an argument" |
|
1059 |
(tempArguments size = 3) |
|
1060 |
ifTrue:[ receiverWithArgument:=Array new:4. |
|
1061 |
receiverWithArgument at:1 put: tempReceiver. |
|
1062 |
(receiverWithArgument at:2 put: (tempArguments at:1)). |
|
1063 |
(receiverWithArgument at:3 put: (tempArguments at:2)). |
|
1064 |
(receiverWithArgument at:4 put: (tempArguments at:3)). |
|
1065 |
||
1066 |
]. "a receiver with an argument" |
|
1067 |
||
1068 |
]. |
|
1069 |
^receiverWithArgument |
|
1070 |
! ! |
|
1071 |
||
1532 | 1072 |
!MethodFinderWindow methodsFor:'misc'! |
1073 |
||
1074 |
aboutThisApplicationText |
|
1075 |
|msg| |
|
1076 |
||
1077 |
msg := super aboutThisApplicationText. |
|
2412 | 1078 |
msg := msg , '\\Ported from Squeak to ST/X by James Hayes (james@exept.de). |
1079 |
Original written by Ted Kaehler, Scott Wallace and Dan Ingalls.'. |
|
1532 | 1080 |
^msg withCRs. |
1081 |
||
1082 |
"Modified: / 13.11.2001 / 12:56:44 / cg" |
|
1083 |
! ! |
|
1084 |
||
1522 | 1085 |
!MethodFinderWindow class methodsFor:'documentation'! |
1086 |
||
1087 |
version |
|
1088 |
^ '$Header$' |
|
2730 | 1089 |
! |
1090 |
||
1091 |
version_CVS |
|
1092 |
^ '$Header$' |
|
1522 | 1093 |
! ! |