MethodFinderWindow.st
changeset 1534 b38fd0e5254d
parent 1533 fbe494613685
child 1538 a1de7a668cad
equal deleted inserted replaced
1533:fbe494613685 1534:b38fd0e5254d
   592 !
   592 !
   593 
   593 
   594 search
   594 search
   595 "Do a search based on the input in the various text editors. Return the receiver."
   595 "Do a search based on the input in the various text editors. Return the receiver."
   596 | tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf|
   596 | tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf|
   597 self resultHolder value: nil.               "reset the result list"
   597 
       
   598 self resultHolder value: nil.                "reset the result list"
   598 self classOfResultHolder value: nil.        "reset the implementorOf list"
   599 self classOfResultHolder value: nil.        "reset the implementorOf list"
       
   600 self codeHolder value: nil.                  "reset the source"
   599 
   601 
   600 tempArguments:=self argumentEditorsContents.
   602 tempArguments:=self argumentEditorsContents.
   601 tempReceiver :=self receiverEditorContents .  
   603 tempReceiver :=self receiverEditorContents .  
   602 tempAnswer:= self messageAnswerEditorContents.   
   604 tempAnswer:= self messageAnswerEditorContents.   
   603 
   605 
   611 anArray at:1 put:receiverWithArgument;
   613 anArray at:1 put:receiverWithArgument;
   612         at:2 put: tempAnswer value.             
   614         at:2 put: tempAnswer value.             
   613 
   615 
   614 "an array now holds the following array #(#(receiver argument) answer) or #(#(reciever) answer). which should
   616 "an array now holds the following array #(#(receiver argument) answer) or #(#(reciever) answer). which should
   615 be suitable input for the method finder."
   617 be suitable input for the method finder."
   616 mf:= MethodFinder new.
   618 self withCursor:Cursor execute do:[
   617 resultArray:= mf load: anArray; findMessage. 
   619     mf:= MethodFinder new.
       
   620     resultArray:= mf load: anArray; findMessage. 
       
   621 ].
   618 
   622 
   619 ((resultArray at:  1 )includesSubString: 'no single') ifTrue:[
   623 ((resultArray at:  1 )includesSubString: 'no single') ifTrue:[
   620                                 self warn: (resultArray at:  1 ).
   624                                 self warn: (resultArray at:  1 ).
   621                                 ^self
   625                                 ^self
   622                                                               ].  
   626                                                               ].  
   646 
   650 
   647 self resultHolder value: resultArray.
   651 self resultHolder value: resultArray.
   648 resultSelectors:= mf selectors.   "used to find implementors so we do not have to "
   652 resultSelectors:= mf selectors.   "used to find implementors so we do not have to "
   649 receiver:=tempReceiver            "search the string for the selector found. Stored as an ordered collection"
   653 receiver:=tempReceiver            "search the string for the selector found. Stored as an ordered collection"
   650 
   654 
   651     "Modified: / 13.11.2001 / 13:05:57 / cg"
   655     "Modified: / 13.11.2001 / 18:52:35 / cg"
   652 !
   656 !
   653 
   657 
   654 selectedClassOfResultHolderChanged
   658 selectedClassOfResultHolderChanged
   655     |sel classAndSelector mthd|
   659     |sel classAndSelector mthd|
   656 
   660