#FEATURE by cg
sclass: Tools::SearchDialog
class definition
added:
#addCheckBoxForIgnoreDocumentationMethods
#ignoreDocumentationMethods
changed: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
--- a/Tools__SearchDialog.st Sun Oct 09 12:11:21 2016 +0200
+++ b/Tools__SearchDialog.st Tue Oct 11 13:53:47 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2000 by eXept Software AG
All Rights Reserved
@@ -26,7 +24,8 @@
listHolder matchProcess inputField showMetaFilter
metaclassesOnlyHolder classesOnlyHolder initialText
withSearchStringInLiterals searchStringInLiteralsHolder
- searchFreeStandingWordsOnlyHolder withSearchFreeStandingWordsOnly'
+ searchFreeStandingWordsOnlyHolder withSearchFreeStandingWordsOnly
+ ignoreDocumentationMethodsHolder'
classVariableNames:'LastCodeSearched LastCodeSearchWasMethod LastGlobalSearched
LastStringSearched LastSearchWasMatch LastSearchWasCaseSensitive
LastStringSearchArea LastCodeSearchArea AREA_LISTOFMETHODS
@@ -225,6 +224,13 @@
^ selectorOrCode.
!
+ignoreDocumentationMethods
+ "the value of the corresponding check toggle;
+ if on, only search in metaclasses"
+
+ ^ (ignoreDocumentationMethodsHolder ? false) value
+!
+
matchMethods
^ isMethodHolder value ? false.
!
@@ -548,8 +554,8 @@
Any additional parameters (metaOnly, searchLiterals etc. must have been done
already."
- "searchWhat:
- one of:#selector
+ "searchWhatArg:
+ one of:#selector #string
searchArea:
one of: #everywhere #currentNameSpace
"
@@ -603,6 +609,12 @@
currentPanel := self.
self addCheckBoxForSearchFreeStandingWordsOnly
].
+ (showMetaFilter ? false) ifTrue:[
+ currentPanel := self.
+ searchWhat == #string ifTrue:[
+ self addCheckBoxForIgnoreDocumentationMethods
+ ].
+ ].
self addHorizontalLine.
@@ -913,6 +925,20 @@
^ b.
!
+addCheckBoxForIgnoreDocumentationMethods
+ |p b|
+
+ p := View new.
+
+ b := CheckBox label:(resources string:'Ignore Documentation Methods') in:p.
+ b model:(ignoreDocumentationMethodsHolder := false asValue).
+ b helpKey:#ignoreDocumentationMethods.
+ self makeTabable:b.
+
+ currentPanel add:p.
+ ^ nil.
+!
+
addCheckBoxForMetaClassesOnly
|p b|