# HG changeset patch # User Claus Gittinger # Date 1309947587 -7200 # Node ID 0be2c38f087a765b3666fe0f387fffd939ccc402 # Parent 95e82ec734ff41fa2c0cdb2f491edec6111ee6e5 comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry: changed: #addInputFieldForSelectorOrNameOrString #addTextEntryWithCaseIgnore:withMatch: resource search added diff -r 95e82ec734ff -r 0be2c38f087a Tools_SearchDialog.st --- a/Tools_SearchDialog.st Wed Jul 06 12:18:52 2011 +0200 +++ b/Tools_SearchDialog.st Wed Jul 06 12:19:47 2011 +0200 @@ -24,7 +24,8 @@ matchProcess inputField' classVariableNames:'LastCodeSearched LastCodeSearchWasMethod LastGlobalSearched LastStringSearched LastSearchWasMatch LastSearchWasCaseSensitive - LastStringSearchArea LastCodeSearchArea AREA_LISTOFMETHODS' + LastStringSearchArea LastCodeSearchArea AREA_LISTOFMETHODS + LastResourceSearched' poolDictionaries:'' category:'Interface-Browsers-New' ! @@ -165,24 +166,27 @@ searchWhat == #code ifTrue:[ self addTextEntryFieldForCode. - ] ifFalse:[ - self addInputFieldForSelectorOrNameOrString. - withCaseIgnore ifTrue:[ - self - addCheckBox:(resources string:'Case Sensitive') - on:(caseHolder := (LastSearchWasCaseSensitive ? false) asValue). - ]. - withMatch ifTrue:[ - self - addCheckBox:(resources string:'Match') - on:(matchHolder := (LastSearchWasMatch ? true) asValue). + ^ self. + ]. + + self addInputFieldForSelectorOrNameOrString. + withCaseIgnore ifTrue:[ + self + addCheckBox:(resources string:'Case Sensitive') + on:(caseHolder := (LastSearchWasCaseSensitive ? false) asValue). + ]. + withMatch ifTrue:[ + self + addCheckBox:(resources string:'Match') + on:(matchHolder := (LastSearchWasMatch ? true) asValue). "/ (isSelector and:[ sel notNil. ]) ifTrue:[ "/ sel includesMatchCharacters ifTrue:[ "/ matchHolder value:false. "/ ]. "/ ]. - ] ] + + "Modified (format): / 06-07-2011 / 11:56:31 / cg" ! askThenDo:aBlock @@ -293,9 +297,9 @@ ! setupToAskForMethodSearchTitle:title forBrowser:brwsrArg searchWhat:searchWhatArg -searchArea:whereDefault withCaseIgnore:withCaseIgnore withMatch:withMatch -withMethodList:withMethodList allowFind:allowFindArg allowBuffer:allowBufferArg -allowBrowser:allowBrowserArg withTextEntry:withTextEntryArg + searchArea:whereDefault withCaseIgnore:withCaseIgnore withMatch:withMatch + withMethodList:withMethodList allowFind:allowFindArg allowBuffer:allowBufferArg + allowBrowser:allowBrowserArg withTextEntry:withTextEntryArg |where ns methodNameSpaces methodPackages hPanel leftVerticalPanel rightVerticalPanel l| @@ -509,6 +513,7 @@ self label:(resources string:'Search'). "Modified: / 10-10-2006 / 15:30:52 / cg" + "Modified (format): / 06-07-2011 / 11:53:23 / cg" ! ! !SearchDialog methodsFor:'setup'! @@ -857,10 +862,15 @@ searchWhat == #string ifTrue:[ sel := browser stringToSearchFor ? LastStringSearched. ] ifFalse:[ - sel := browser selectorToSearchFor. + searchWhat == #resource ifTrue:[ + sel := browser stringToSearchFor ? LastResourceSearched. + ] ifFalse:[ + sel := browser selectorToSearchFor. + ] ] ]. ]. + lastSearchPatterns := browser lastSearchPatterns. sel isEmptyOrNil ifTrue:[ "/ use last searchString @@ -884,10 +894,14 @@ withWaitCursorDo:[ |best matching| - searchWhat == #globalName ifFalse:[ - what := Smalltalk selectorCompletion:s. - ] ifTrue:[ - what := Smalltalk globalNameCompletion:s. + searchWhat == #resource ifTrue:[ + what := DoWhatIMeanSupport resourceCompletion:s inEnvironment:Smalltalk match:true ignoreCase:false. + ] ifFalse:[ + searchWhat == #globalName ifFalse:[ + what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:Smalltalk. + ] ifTrue:[ + what := DoWhatIMeanSupport globalNameCompletion:s inEnvironment:Smalltalk match:true. + ]. ]. best := what first. matching := what second. @@ -901,7 +915,7 @@ selectorHolder onChangeEvaluate:[ self updateListOfMatchingSelectorsFor:inputField contents ]. - "Modified: / 23-11-2010 / 14:32:50 / cg" + "Modified: / 06-07-2011 / 12:07:12 / cg" ! addTextEntryFieldForCode @@ -1241,12 +1255,8 @@ !SearchDialog class methodsFor:'documentation'! -version - ^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.60 2010-11-23 13:33:51 cg Exp $' -! - version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.60 2010-11-23 13:33:51 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.61 2011-07-06 10:19:47 cg Exp $' ! ! SearchDialog initialize!