--- a/Tools__NewSystemBrowser.st Tue Nov 28 14:22:10 2017 +0100
+++ b/Tools__NewSystemBrowser.st Tue Nov 28 14:41:57 2017 +0100
@@ -57123,6 +57123,7 @@
methods := dialog methodsToSearch.
isMethod := dialog matchMethods.
+ [:searchAgain |
self withSearchCursorDo:[
|initialList list newBrowser numFound label
selectorList selector entities arguments numArgs answer
@@ -57262,11 +57263,28 @@
arguments := altArguments.
] ifFalse:[
- answer := Dialog
- confirm:question
- yesLabel:(resources string:'Search Again')
- noLabel:(resources string:'Cancel').
- answer ifFalse:[
+ "/ answer := Dialog
+ "/ confirm:question
+ "/ yesLabel:(resources string:'Search Again')
+ "/ noLabel:(resources string:'Cancel').
+ (match not and:[string includesMatchCharacters]) ifTrue:[
+ answer := Dialog
+ choose:question
+ labels:(resources array:#('Cancel' 'Search as Matchpattern' 'Search Again'))
+ values:#(false #matchSearch true)
+ default:#matchSearch.
+ ] ifFalse:[
+ answer := Dialog
+ choose:question
+ labels:(resources array:#('Cancel' 'Search Again'))
+ values:#(false true)
+ default:true.
+ ].
+ answer == #matchSearch ifTrue:[
+ match := true.
+ searchAgain value.
+ ].
+ (answer isNil or:[answer == false]) ifTrue:[
^ self
].
restart value.
@@ -57317,11 +57335,12 @@
"/ Transcript show:'search time: '; showCR:t.
^ newBrowser.
].
+ ] valueWithRestart.
].
] valueWithRestart.
"Modified: / 04-09-2013 / 17:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 15-03-2017 / 13:03:54 / cg"
+ "Modified: / 28-11-2017 / 14:41:02 / cg"
!
askForMethodAndSpawnSearchTitle:title browserLabel:labelHolderOrBlock