--- a/Tools__SearchDialog.st Mon Mar 09 12:12:39 2020 +0100
+++ b/Tools__SearchDialog.st Mon Mar 09 14:54:28 2020 +0100
@@ -371,6 +371,10 @@
!SearchDialog methodsFor:'private'!
+addCheckBox:untranslatedString on:aHolder
+ ^ super addCheckBox:(resources string:untranslatedString) on:aHolder.
+!
+
searchClassProtocolHolder
searchClassProtocolHolder isNil ifTrue:[
searchClassProtocolHolder := true asValue
@@ -444,46 +448,6 @@
!SearchDialog methodsFor:'public'!
-addTextEntryWithCaseIgnore:withCaseIgnore withMatch:withMatch
- |initialMatch initialCaseSensitive|
-
- matchHolder := caseHolder := nil.
-
- searchWhat == #code ifTrue:[
- self addTextEntryFieldForCode.
- ^ self.
- ].
-
- self addInputFieldForSelectorOrNameOrString.
- withCaseIgnore ifTrue:[
- initialCaseSensitive := false.
- (searchWhat ~~ #resource) ifTrue:[
- initialCaseSensitive := (LastSearchWasCaseSensitive ? false)
- ].
- (self
- addCheckBox:(resources string:'Case Sensitive')
- on:(caseHolder := initialCaseSensitive asValue))
- helpKey:#caseSensitive.
- ].
- withMatch ifTrue:[
- initialMatch := true.
- (searchWhat ~~ #resource) ifTrue:[
- initialMatch := (LastSearchWasMatch ? true)
- ].
- (self
- addCheckBox:(resources string:'Match')
- on:(matchHolder := initialMatch asValue))
- helpKey:#match.
-"/ (isSelector and:[ sel notNil. ]) ifTrue:[
-"/ sel includesMatchCharacters ifTrue:[
-"/ matchHolder value:false.
-"/ ].
-"/ ].
- ]
-
- "Modified (format): / 06-07-2011 / 11:56:31 / cg"
-!
-
askThenDo:aBlock
|where code sel matchHolderValue caseHolderValue|
@@ -807,10 +771,10 @@
searchAreas isEmptyOrNil ifTrue:[
self addCheckBoxForEverywhere.
].
- self addCheckBoxForChangedClassesList.
withMethodList ifTrue:[
browser isMethodListBrowser ifTrue:[
+ self addCheckBoxForChangedClassesList.
searchAreas isEmptyOrNil ifTrue:[
self addCheckBoxForEverywhere.
].
@@ -819,11 +783,14 @@
self addCheckBoxForSelectedMethodClasses.
self addCheckBoxForSelectedMethodPackages.
] ifFalse:[
+ self addCheckBoxForChangedClassesList.
searchAreas isEmptyOrNil ifTrue:[
self addCheckBoxForEverywhere.
].
self addCheckBoxForChangedMethodList.
].
+ ] ifFalse:[
+ self addCheckBoxForChangedClassesList.
].
searchAreas isEmptyOrNil ifTrue:[
@@ -1341,12 +1308,12 @@
|y b1 b2|
y := self yPosition.
- b1 := self addCheckBox:(resources string:'Instance Protocol') on:(self searchInstanceProtocolHolder).
+ b1 := self addCheckBox:'Instance Protocol' on:(self searchInstanceProtocolHolder).
b1 helpKey:#classesOnly.
"/ b1 width:0.5.
"/ self yPosition:y.
- b2 := self addCheckBox:(resources string:'Class Protocol') on:(self searchClassProtocolHolder).
+ b2 := self addCheckBox:'Class Protocol' on:(self searchClassProtocolHolder).
b2 helpKey:#metaClassesOnly.
"/ b2 left:0.5; width:0.5.
@@ -1538,7 +1505,7 @@
errMessageField := (self addTextLabel:'') adjust:#left.
errMessageField level:-1.
- self addCheckBox:(resources string:'Method') on:self isMethodHolder.
+ self addCheckBox:'Method' on:self isMethodHolder.
checkCodeAction := [ self checkCodeIn:codeField notifying:errMessageField. ].
@@ -1555,6 +1522,47 @@
"Modified: / 23-07-2011 / 10:35:14 / cg"
!
+addTextEntryWithCaseIgnore:withCaseIgnore withMatch:withMatch
+ |initialMatch initialCaseSensitive y check|
+
+ matchHolder := caseHolder := nil.
+
+ searchWhat == #code ifTrue:[
+ self addTextEntryFieldForCode.
+ ^ self.
+ ].
+
+ self addInputFieldForSelectorOrNameOrString.
+ y := self yPosition.
+ withMatch ifTrue:[
+ initialMatch := true.
+ (searchWhat ~~ #resource) ifTrue:[
+ initialMatch := (LastSearchWasMatch ? true)
+ ].
+ check := self addCheckBox:'Match' on:(matchHolder := initialMatch asValue).
+ check helpKey:#match.
+"/ (isSelector and:[ sel notNil. ]) ifTrue:[
+"/ sel includesMatchCharacters ifTrue:[
+"/ matchHolder value:false.
+"/ ].
+"/ ].
+ ].
+ withCaseIgnore ifTrue:[
+ initialCaseSensitive := false.
+ (searchWhat ~~ #resource) ifTrue:[
+ initialCaseSensitive := (LastSearchWasCaseSensitive ? false)
+ ].
+ withMatch ifTrue:[
+ self yPosition:y.
+ ].
+ check := self addCheckBox:'Case Sensitive' on:(caseHolder := initialCaseSensitive asValue).
+ check helpKey:#caseSensitive.
+ check left:0.5; width:0.5.
+ ].
+
+ "Modified (format): / 06-07-2011 / 11:56:31 / cg"
+!
+
checkCodeIn:codeField notifying:errMessageField
|codeString tree errAction|