DoWhatIMeanSupport.st
changeset 6138 1dd5dc49a996
parent 6134 4f82fe433898
child 6149 d8d846da0364
equal deleted inserted replaced
6137:2a2f2a2b59ae 6138:1dd5dc49a996
  2615                         ]
  2615                         ]
  2616                     ].    
  2616                     ].    
  2617                 ].
  2617                 ].
  2618  
  2618  
  2619                 action isNil ifTrue:[
  2619                 action isNil ifTrue:[
  2620                     numArgs := chosen numArgs.
  2620                     numArgs := chosen argumentCount.
  2621                     (bestSelectors2 notEmptyOrNil and:[bestSelectors2 includes:chosen]) ifTrue:[
  2621                     (bestSelectors2 notEmptyOrNil and:[bestSelectors2 includes:chosen]) ifTrue:[
  2622                         selectorParts := parentNode selectorParts , node selectorParts.
  2622                         selectorParts := parentNode selectorParts , node selectorParts.
  2623                     ] ifFalse:[
  2623                     ] ifFalse:[
  2624                         selectorParts := node selectorParts.
  2624                         selectorParts := node selectorParts.
  2625                     ].
  2625                     ].
  3203         selectors := selectors copyTo:100.
  3203         selectors := selectors copyTo:100.
  3204     ].
  3204     ].
  3205 
  3205 
  3206     "/ if there is only one, and user has already entered it, 
  3206     "/ if there is only one, and user has already entered it, 
  3207     "/ he might want to complete the argument-name
  3207     "/ he might want to complete the argument-name
  3208     (alreadyOK and:[selectorSoFar numArgs > 0]) ifTrue:[
  3208     (alreadyOK and:[selectorSoFar argumentCount > 0]) ifTrue:[
  3209         allExistingMethods := (Smalltalk allImplementorsOf:selectorSoFar asSymbol)
  3209         allExistingMethods := (Smalltalk allImplementorsOf:selectorSoFar asSymbol)
  3210                                     collect:[:cls | cls compiledMethodAt:selectorSoFar asSymbol].
  3210                                     collect:[:cls | cls compiledMethodAt:selectorSoFar asSymbol].
  3211         nameBag := Bag new.
  3211         nameBag := Bag new.
  3212         allExistingMethods do:[:eachMethod | nameBag addAll:(eachMethod methodArgNames ? #())].
  3212         allExistingMethods do:[:eachMethod | nameBag addAll:(eachMethod methodArgNames ? #())].
  3213         namesByCount := nameBag valuesAndCounts copy sort:[:a :b | a value < b value].
  3213         namesByCount := nameBag valuesAndCounts copy sort:[:a :b | a value < b value].
  5251 "/        info := implClass name , ' » ' , info.
  5251 "/        info := implClass name , ' » ' , info.
  5252 "/    ].
  5252 "/    ].
  5253 "/    self information:info.
  5253 "/    self information:info.
  5254 
  5254 
  5255     best ~= selector ifTrue:[
  5255     best ~= selector ifTrue:[
  5256         numArgs := best numArgs.
  5256         numArgs := best argumentCount.
  5257 
  5257 
  5258         (bestSelectors2 notEmptyOrNil and:[bestSelectors2 includes:best]) ifTrue:[
  5258         (bestSelectors2 notEmptyOrNil and:[bestSelectors2 includes:best]) ifTrue:[
  5259             selectorParts := parentNode selectorParts , node selectorParts.
  5259             selectorParts := parentNode selectorParts , node selectorParts.
  5260         ] ifFalse:[
  5260         ] ifFalse:[
  5261             selectorParts := node selectorParts.
  5261             selectorParts := node selectorParts.