diff -r 4443157a398a -r b1c31e1707b2 MethodFinderWindow.st --- a/MethodFinderWindow.st Mon Sep 16 16:12:44 2019 +0200 +++ b/MethodFinderWindow.st Fri Sep 27 00:14:49 2019 +0200 @@ -1344,6 +1344,10 @@ "Created: / 01-06-2012 / 13:16:54 / cg" ! +selectedImplementorChanged + self updateImplementorsOf:selectedImplementorsHolder value +! + updateImplementorsOf:anInteger "Request the implementors of the selected argument provided by aNumber. Return the receiver." @@ -1541,7 +1545,7 @@ selectedImplementorsHolder isNil ifTrue:[ selectedImplementorsHolder := ValueHolder new. - selectedImplementorsHolder onChangeEvaluate:[self updateImplementorsOf:selectedImplementorsHolder value]. + selectedImplementorsHolder onChangeSend:#selectedImplementorChanged to:self. ]. ^ selectedImplementorsHolder @@ -1760,62 +1764,65 @@ !MethodFinderWindow methodsFor:'private'! argumentEditorsContents - -"Determine how many text editors of the arguments are used and store the result -as argCounter. The result being the minimum between how many editors have -expressions in and how many are displayed. + "Determine how many text editors of the arguments are used and store the result + as argCounter. The result being the minimum between how many editors have + expressions in and how many are displayed. -Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary -from each of the text editors. + Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary + from each of the text editors. -Return the OrderedDictionary with the expressions from all the text editors. " + Return the OrderedDictionary with the expressions from all the text editors. " | tempArguments argCounter tempArgument1Editor tempArgument2Editor tempArgument3Editor -associationKey associationValue| + associationKey associationValue| + + argCounter:=0. -argCounter:=0. + tempArgument1Editor:= (self cleanInputs: argument1Editor contents). + tempArgument2Editor:= (self cleanInputs: argument2Editor contents). + tempArgument3Editor:= (self cleanInputs: argument3Editor contents). + + tempArgument1Editor = '' ifFalse:[argCounter:=argCounter +1]. + tempArgument2Editor = '' ifFalse:[argCounter:=argCounter +1]. + tempArgument3Editor = '' ifFalse:[argCounter:=argCounter +1]. + + argCounter:= (argCounter min: (self argCountHolder value -1)). + tempArguments:= OrderedDictionary new:argCounter. -tempArgument1Editor:= (self cleanInputs: argument1Editor contents). -tempArgument2Editor:= (self cleanInputs: argument2Editor contents). -tempArgument3Editor:= (self cleanInputs: argument3Editor contents). + (argCounter value >= 1) ifTrue:[ + associationValue:= (Compiler evaluate: tempArgument1Editor). + ((self isExpression:tempArgument1Editor) or:[ associationValue isNil]) ifTrue:[ + "looks if an expression is typed in" + associationKey:=associationValue printString + ] ifFalse:[ + associationKey:=tempArgument1Editor + ]. + tempArguments add: associationKey-> associationValue. + ]. + (argCounter value >= 2) ifTrue:[ + associationValue:= (Compiler evaluate: tempArgument2Editor). + (((self isExpression:tempArgument2Editor) or:[ associationValue isNil])) ifTrue:[ + "looks if an expression is typed in" + associationKey:=associationValue printString + ] ifFalse:[ + associationKey:=tempArgument2Editor + ]. + tempArguments add: associationKey-> associationValue + ]. -tempArgument1Editor = '' ifFalse:[argCounter:=argCounter +1]. -tempArgument2Editor = '' ifFalse:[argCounter:=argCounter +1]. -tempArgument3Editor = '' ifFalse:[argCounter:=argCounter +1]. + (argCounter value >= 3) ifTrue:[ + associationValue:= (Compiler evaluate: tempArgument3Editor). + ((self isExpression:tempArgument3Editor) or:[ associationValue isNil]) ifTrue:[ + "looks if an expression is typed in" + associationKey:=associationValue printString + ] ifFalse:[ + associationKey:=tempArgument3Editor + ]. + tempArguments add: associationKey-> associationValue + ]. -argCounter:= (argCounter min: (self argCountHolder value -1)). -tempArguments:= OrderedDictionary new:argCounter. - -(argCounter value >= 1) - ifTrue:[associationValue:= (Compiler evaluate: tempArgument1Editor). - ((self isExpression:tempArgument1Editor) or:[ associationValue isNil]) ifTrue:[ "looks if an expression is typed in" - associationKey:=associationValue printString] - ifFalse:[ - associationKey:=tempArgument1Editor]. - - tempArguments add: associationKey-> associationValue. - ]. -(argCounter value >= 2) - ifTrue:[ associationValue:= (Compiler evaluate: tempArgument2Editor). - (((self isExpression:tempArgument2Editor) or:[ associationValue isNil])) ifTrue:[ "looks if an expression is typed in" - associationKey:=associationValue printString] - ifFalse:[ - associationKey:=tempArgument2Editor]. - - tempArguments add: associationKey-> associationValue]. - -(argCounter value >= 3) - ifTrue:[ associationValue:= (Compiler evaluate: tempArgument3Editor). - ((self isExpression:tempArgument3Editor) or:[ associationValue isNil]) ifTrue:[ "looks if an expression is typed in" - associationKey:=associationValue printString] - ifFalse:[ - associationKey:=tempArgument3Editor]. - - tempArguments add: associationKey-> associationValue]. - - -^tempArguments + ^tempArguments ! extractClassAndSelectorFrom:anArgument