author | Claus Gittinger <cg@exept.de> |
Mon, 14 Feb 2011 18:16:36 +0100 | |
branch | initialV |
changeset 9777 | 82d9e1236f1f |
parent 9645 | 8ff383213d07 |
child 10189 | 0be2c38f087a |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5592 | 12 |
"{ Package: 'stx:libtool' }" |
5591 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
DialogBox subclass:#SearchDialog |
|
17 |
instanceVariableNames:'openHow classes methods selectedClasses selectedCategories |
|
7042 | 18 |
selectedMethods selectedPackages currentClass currentNamespace |
19 |
currentClassCategory currentPackage browser whereRadioGroup |
|
8782 | 20 |
currentPanel searchAreas caseHolder matchHolder isMethodHolder |
7042 | 21 |
codeField selectorHolder defaultOpenHow withTextEntry allowFind |
9311 | 22 |
allowBuffer allowBrowser searchWhat searchClassProtocolHolder |
9309 | 23 |
searchInstanceProtocolHolder selectorOrCode listHolder |
9315 | 24 |
matchProcess inputField' |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
25 |
classVariableNames:'LastCodeSearched LastCodeSearchWasMethod LastGlobalSearched |
9001
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
26 |
LastStringSearched LastSearchWasMatch LastSearchWasCaseSensitive |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
27 |
LastStringSearchArea LastCodeSearchArea AREA_LISTOFMETHODS' |
5591 | 28 |
poolDictionaries:'' |
29 |
category:'Interface-Browsers-New' |
|
30 |
! |
|
31 |
||
32 |
!SearchDialog class methodsFor:'documentation'! |
|
33 |
||
34 |
copyright |
|
35 |
" |
|
36 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
37 |
All Rights Reserved |
|
38 |
||
39 |
This software is furnished under a license and may be used |
|
40 |
only in accordance with the terms of that license and with the |
|
41 |
inclusion of the above copyright notice. This software may not |
|
42 |
be provided or otherwise made available to, or used by, any |
|
43 |
other person. No title to or ownership of the software is |
|
44 |
hereby transferred. |
|
45 |
" |
|
46 |
! ! |
|
47 |
||
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
48 |
!SearchDialog class methodsFor:'initialization'! |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
49 |
|
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
50 |
initialize |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
51 |
AREA_LISTOFMETHODS := #listOfMethods |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
52 |
|
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
53 |
"Created: / 19-11-2010 / 12:00:18 / cg" |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
54 |
! ! |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
55 |
|
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
56 |
!SearchDialog class methodsFor:'constants'! |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
57 |
|
9642 | 58 |
constantForListOfMethodsArea |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
59 |
^ AREA_LISTOFMETHODS |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
60 |
|
9642 | 61 |
"Created: / 19-11-2010 / 12:11:50 / cg" |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
62 |
! ! |
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
63 |
|
6381
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
64 |
!SearchDialog class methodsFor:'queries'! |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
65 |
|
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
66 |
lastCodeSearchArea |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
67 |
^ LastCodeSearchArea |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
68 |
! |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
69 |
|
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
70 |
lastStringSearchArea |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
71 |
^ LastStringSearchArea |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
72 |
! ! |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
73 |
|
6685 | 74 |
!SearchDialog methodsFor:'accessing-entered values'! |
75 |
||
76 |
classesToSearch |
|
77 |
^ classes. |
|
78 |
! |
|
79 |
||
80 |
codeToSearch |
|
81 |
^ selectorOrCode. |
|
82 |
! |
|
83 |
||
84 |
matchMethods |
|
85 |
^ isMethodHolder value ? false. |
|
86 |
! |
|
87 |
||
88 |
methodsToSearch |
|
89 |
^ methods. |
|
90 |
! |
|
91 |
||
92 |
openHow |
|
93 |
^ openHow. |
|
94 |
! |
|
95 |
||
96 |
searchIgnoringCase |
|
9001
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
97 |
^ self searchIsCaseSensitive not |
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
98 |
! |
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
99 |
|
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
100 |
searchIsCaseSensitive |
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
101 |
^ (caseHolder value ? false) |
6685 | 102 |
! |
103 |
||
104 |
searchWithMatch |
|
105 |
^ matchHolder value ? false. |
|
106 |
! |
|
107 |
||
108 |
selectorToSearch |
|
109 |
^ selectorOrCode. |
|
110 |
! ! |
|
111 |
||
5591 | 112 |
!SearchDialog methodsFor:'private'! |
113 |
||
6685 | 114 |
searchClassProtocolHolder |
115 |
searchClassProtocolHolder isNil ifTrue:[ |
|
116 |
searchClassProtocolHolder := true asValue |
|
117 |
]. |
|
118 |
^ searchClassProtocolHolder |
|
119 |
! |
|
120 |
||
121 |
searchInstanceProtocolHolder |
|
122 |
searchInstanceProtocolHolder isNil ifTrue:[ |
|
123 |
searchInstanceProtocolHolder := true asValue |
|
124 |
]. |
|
125 |
^ searchInstanceProtocolHolder |
|
126 |
! |
|
127 |
||
5591 | 128 |
showHelpOnCodePatterns |
129 |
HTMLDocumentView openFullOnHelpFile:'Browser/RBSearchPatterns.html' |
|
9315 | 130 |
! |
131 |
||
132 |
updateListOfMatchingSelectorsFor:s |
|
133 |
|p| |
|
134 |
||
135 |
(p := matchProcess) notNil ifTrue:[ |
|
136 |
p terminate. |
|
137 |
]. |
|
138 |
listHolder isNil ifTrue:[^ self]. |
|
139 |
||
140 |
matchProcess := |
|
141 |
[ |
|
142 |
|what matching| |
|
143 |
||
144 |
[ |
|
145 |
searchWhat == #globalName ifFalse:[ |
|
9600
301631add7e9
changed: #updateListOfMatchingSelectorsFor:
Claus Gittinger <cg@exept.de>
parents:
9519
diff
changeset
|
146 |
what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:Smalltalk match:(matchHolder value) ignoreCase:(caseHolder value not) |
9315 | 147 |
] ifTrue:[ |
148 |
what := DoWhatIMeanSupport globalNameCompletion:s inEnvironment:Smalltalk match:(matchHolder value). |
|
149 |
]. |
|
150 |
"/ best := what first. |
|
151 |
matching := what second. |
|
152 |
self sensor pushAction:[ listHolder contents:matching ]. |
|
153 |
] ensure:[ |
|
154 |
matchProcess := nil. |
|
155 |
]. |
|
156 |
] fork. |
|
9600
301631add7e9
changed: #updateListOfMatchingSelectorsFor:
Claus Gittinger <cg@exept.de>
parents:
9519
diff
changeset
|
157 |
|
301631add7e9
changed: #updateListOfMatchingSelectorsFor:
Claus Gittinger <cg@exept.de>
parents:
9519
diff
changeset
|
158 |
"Modified: / 26-10-2010 / 20:33:05 / cg" |
5591 | 159 |
! ! |
160 |
||
161 |
!SearchDialog methodsFor:'public'! |
|
162 |
||
6242 | 163 |
addTextEntryWithCaseIgnore:withCaseIgnore withMatch:withMatch |
9366
58c82c246a2f
changed: #addTextEntryWithCaseIgnore:withMatch:
Claus Gittinger <cg@exept.de>
parents:
9365
diff
changeset
|
164 |
matchHolder := caseHolder := nil. |
58c82c246a2f
changed: #addTextEntryWithCaseIgnore:withMatch:
Claus Gittinger <cg@exept.de>
parents:
9365
diff
changeset
|
165 |
|
9311 | 166 |
searchWhat == #code ifTrue:[ |
6242 | 167 |
self addTextEntryFieldForCode. |
168 |
] ifFalse:[ |
|
169 |
self addInputFieldForSelectorOrNameOrString. |
|
170 |
withCaseIgnore ifTrue:[ |
|
6685 | 171 |
self |
9001
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
172 |
addCheckBox:(resources string:'Case Sensitive') |
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
173 |
on:(caseHolder := (LastSearchWasCaseSensitive ? false) asValue). |
6242 | 174 |
]. |
175 |
withMatch ifTrue:[ |
|
6685 | 176 |
self |
177 |
addCheckBox:(resources string:'Match') |
|
6242 | 178 |
on:(matchHolder := (LastSearchWasMatch ? true) asValue). |
179 |
"/ (isSelector and:[ sel notNil. ]) ifTrue:[ |
|
180 |
"/ sel includesMatchCharacters ifTrue:[ |
|
181 |
"/ matchHolder value:false. |
|
182 |
"/ ]. |
|
183 |
"/ ]. |
|
9366
58c82c246a2f
changed: #addTextEntryWithCaseIgnore:withMatch:
Claus Gittinger <cg@exept.de>
parents:
9365
diff
changeset
|
184 |
] |
6242 | 185 |
] |
186 |
! |
|
187 |
||
5591 | 188 |
askThenDo:aBlock |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
189 |
|where code sel matchHolderValue caseHolderValue| |
5591 | 190 |
|
191 |
self open. |
|
9406 | 192 |
self beScreenDialog. "raise it above all windows" |
5591 | 193 |
self accepted ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
194 |
^ self. |
5591 | 195 |
]. |
196 |
||
197 |
openHow isNil ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
198 |
openHow := defaultOpenHow. |
5591 | 199 |
]. |
200 |
where := whereRadioGroup value. |
|
201 |
withTextEntry ifTrue:[ |
|
9311 | 202 |
searchWhat == #code ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
203 |
code := codeField contentsAsString. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
204 |
LastCodeSearched := code. |
6381
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
205 |
LastCodeSearchArea := where. |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
206 |
] ifFalse:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
207 |
sel := selectorHolder value. |
8304
3e556502d05e
changed #askThenDo: check selection for isEmptyOrNil (not only isEmpty)
ca
parents:
8282
diff
changeset
|
208 |
sel isEmptyOrNil ifTrue:[ |
9311 | 209 |
browser warn:((searchWhat == #selector) |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
210 |
ifTrue:[ 'No selector entered for search'. ] |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
211 |
ifFalse:[ 'Nothing entered for search'. ]). |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
212 |
^ self. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
213 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
214 |
sel := sel string. |
6667 | 215 |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
216 |
browser rememberSearchPattern:sel. |
9311 | 217 |
searchWhat == #globalName ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
218 |
LastGlobalSearched := sel. |
6381
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
219 |
] ifFalse:[ |
9311 | 220 |
searchWhat == #string ifTrue:[ |
8123 | 221 |
LastStringSearched := sel. |
6381
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
222 |
LastStringSearchArea := where. |
6667 | 223 |
] ifFalse:[ |
6700 | 224 |
(sel startsWith:'#''') ifTrue:[ |
225 |
sel := sel copyFrom:3. |
|
226 |
(sel endsWith:$') ifTrue:[ |
|
227 |
sel := sel copyWithoutLast:1. |
|
6667 | 228 |
]. |
229 |
]. |
|
6381
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
230 |
] |
f8696b036204
remember last search areas for string and code search
Claus Gittinger <cg@exept.de>
parents:
6379
diff
changeset
|
231 |
] |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
232 |
]. |
5591 | 233 |
]. |
234 |
where isNil ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
235 |
browser warn:'No class(es) for search'. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
236 |
^ self. |
5591 | 237 |
]. |
9336
fe62308cf539
comment/format in: #askThenDo:
Claus Gittinger <cg@exept.de>
parents:
9331
diff
changeset
|
238 |
self getClassesAndMethodsFor:where. |
5591 | 239 |
|
240 |
(#(#classesWithPrivateClasses #classHierarchiesWithPrivateClasses #ownersWithPrivateClasses #ownersHierarchiesWithPrivateClasses) |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
241 |
includes:where) |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
242 |
ifTrue:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
243 |
|toSearch| |
5591 | 244 |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
245 |
toSearch := IdentitySet withAll:classes. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
246 |
classes := IdentitySet withAll:toSearch. |
9336
fe62308cf539
comment/format in: #askThenDo:
Claus Gittinger <cg@exept.de>
parents:
9331
diff
changeset
|
247 |
[ toSearch notEmpty ] whileTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
248 |
|cls| |
5591 | 249 |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
250 |
cls := toSearch removeFirst. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
251 |
classes addAll:cls allPrivateClasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
252 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
253 |
]. |
5591 | 254 |
|
255 |
classes size == 0 ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
256 |
classes := nil. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
257 |
methods size == 0 ifTrue:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
258 |
browser warn:'No class(es) given for search.'. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
259 |
^ self. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
260 |
]. |
5591 | 261 |
] ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
262 |
classes := classes asOrderedCollection. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
263 |
methods size ~~ 0 ifTrue:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
264 |
browser warn:'oops'. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
265 |
methods := nil. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
266 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
267 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
268 |
|
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
269 |
matchHolderValue := matchHolder value. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
270 |
matchHolderValue notNil ifTrue:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
271 |
LastSearchWasMatch := matchHolderValue |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
272 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
273 |
caseHolderValue := caseHolder value. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
274 |
caseHolderValue notNil ifTrue:[ |
9001
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
275 |
LastSearchWasCaseSensitive := caseHolderValue |
5591 | 276 |
]. |
277 |
||
6685 | 278 |
selectorOrCode := sel ? code. |
279 |
||
280 |
aBlock numArgs == 7 ifTrue:[ |
|
281 |
"/ old style |
|
282 |
aBlock |
|
283 |
value:classes |
|
284 |
value:(sel ? code) |
|
9001
22e3a719e91a
inverted the check-box meaning: \"Ignore case\" vs. \"Case Sensitive\"
Claus Gittinger <cg@exept.de>
parents:
8833
diff
changeset
|
285 |
value:(self searchIgnoringCase) |
6685 | 286 |
value:openHow |
287 |
value:(matchHolderValue ? false) |
|
288 |
value:methods |
|
289 |
value:(isMethodHolder value ? false). |
|
290 |
] ifFalse:[ |
|
291 |
aBlock value. |
|
292 |
] |
|
5591 | 293 |
! |
294 |
||
9365
c27204a9244b
comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9336
diff
changeset
|
295 |
setupToAskForMethodSearchTitle:title forBrowser:brwsrArg searchWhat:searchWhatArg |
c27204a9244b
comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9336
diff
changeset
|
296 |
searchArea:whereDefault withCaseIgnore:withCaseIgnore withMatch:withMatch |
c27204a9244b
comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9336
diff
changeset
|
297 |
withMethodList:withMethodList allowFind:allowFindArg allowBuffer:allowBufferArg |
c27204a9244b
comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9336
diff
changeset
|
298 |
allowBrowser:allowBrowserArg withTextEntry:withTextEntryArg |
c27204a9244b
comment/format in: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9336
diff
changeset
|
299 |
|
9309 | 300 |
|where ns methodNameSpaces methodPackages hPanel leftVerticalPanel rightVerticalPanel l| |
5591 | 301 |
|
302 |
allowFind := allowFindArg. |
|
303 |
allowBuffer := allowBufferArg. |
|
304 |
allowBrowser := allowBrowserArg. |
|
9311 | 305 |
searchWhat := searchWhatArg. |
306 |
||
5591 | 307 |
withTextEntry := withTextEntryArg. |
308 |
browser := brwsrArg. |
|
309 |
resources := browser resources. |
|
310 |
||
6351 | 311 |
(self addTextLabel:(resources stringWithCRs:title)) adjust:#left. |
6685 | 312 |
|
5591 | 313 |
selectedClasses := browser selectedClasses value. |
314 |
selectedCategories := browser selectedCategoriesValue. |
|
8756 | 315 |
selectedCategories := selectedCategories reject:[:cat | NavigatorModel isPseudoCategory:cat]. |
5591 | 316 |
selectedMethods := browser selectedMethods value. |
317 |
currentClass := browser theSingleSelectedClass. |
|
318 |
currentClassCategory := browser theSingleSelectedCategory. |
|
7042 | 319 |
currentPackage := browser theSingleSelectedProject. |
6242 | 320 |
currentClass isNil ifTrue:[ |
321 |
browser hasMethodSelected ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
322 |
currentClass := selectedMethods first mclass. |
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
323 |
"/ selectedClasses := (selectedMethods collect:[:each | each mclass ]) asIdentitySet. |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
324 |
"/ selectedClasses := selectedClasses select:[:each | each notNil ]. |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
325 |
]. |
5591 | 326 |
]. |
6242 | 327 |
currentClass notNil ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
328 |
currentClass := currentClass theNonMetaclass. |
5591 | 329 |
]. |
6242 | 330 |
withTextEntry ifTrue:[ |
331 |
self addTextEntryWithCaseIgnore:withCaseIgnore withMatch:withMatch. |
|
5591 | 332 |
]. |
333 |
searchAreas := OrderedCollection new. |
|
6685 | 334 |
|
5591 | 335 |
self addHorizontalLine. |
336 |
self addVerticalSpace. |
|
6685 | 337 |
|
338 |
hPanel := HorizontalPanelView "SimpleView" new. |
|
339 |
hPanel verticalLayout:#top. |
|
340 |
hPanel horizontalLayout:#left. |
|
341 |
||
8782 | 342 |
leftVerticalPanel := currentPanel := VerticalPanelView new. |
6685 | 343 |
leftVerticalPanel verticalLayout:#topSpace. |
344 |
leftVerticalPanel horizontalLayout:#fitSpace. |
|
345 |
||
5591 | 346 |
(self addTextLabel:(resources string:'Search in:')) adjust:#left. |
347 |
whereRadioGroup := RadioButtonGroup new. |
|
7042 | 348 |
|
6242 | 349 |
(selectedCategories size > 0 or:[ selectedClasses size > 0 ]) ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
350 |
self addCheckBoxForEverywhere. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
351 |
"/ classMethodListView notNil ifTrue:[ |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
352 |
"/ b := CheckBox label:(resources string:'Shown Methods'). |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
353 |
"/ panel add:b. whereChannel add:b value:#currentMethodList. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
354 |
"/ areas add:#currentMethodList. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
355 |
"/ self makeTabable:b. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
356 |
"/ ]. |
6242 | 357 |
browser isMethodListBrowser ifTrue:[ |
7374 | 358 |
methods := browser selectedMethods value ? #(). |
359 |
methodNameSpaces := methods |
|
360 |
select:[:eachMethod | eachMethod mclass notNil] |
|
361 |
thenCollect:[:eachMethod | eachMethod mclass topNameSpace ]. |
|
362 |
methodPackages := methods |
|
7042 | 363 |
collect:[:eachMethod | eachMethod package ]. |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
364 |
]. |
6242 | 365 |
methodNameSpaces size == 1 ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
366 |
currentNamespace := methodNameSpaces first. |
6242 | 367 |
] ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
368 |
currentNamespace := browser currentNamespace. |
6379 | 369 |
selectedClasses size == 0 ifTrue:[ |
370 |
|classesInAllSelectedCategories nameSpacesOfAllClassesInAllSelectedCategories| |
|
371 |
classesInAllSelectedCategories := Smalltalk allClasses select:[:cls | selectedCategories includes:cls category]. |
|
372 |
nameSpacesOfAllClassesInAllSelectedCategories := classesInAllSelectedCategories collect:[:eachClass | eachClass topNameSpace]. |
|
373 |
nameSpacesOfAllClassesInAllSelectedCategories size == 1 ifTrue:[ |
|
374 |
currentNamespace := nameSpacesOfAllClassesInAllSelectedCategories first. |
|
375 |
]. |
|
376 |
]. |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
377 |
]. |
7042 | 378 |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
379 |
(currentNamespace notNil |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
380 |
and:[ currentNamespace ~= (browser nameListEntryForALL) ]) |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
381 |
ifTrue:[ self addCheckBoxForCurrentNamespace ] |
6242 | 382 |
ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
383 |
(currentClass notNil |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
384 |
and:[ (ns := currentClass nameSpace) notNil and:[ ns ~~ Smalltalk ] ]) |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
385 |
ifTrue:[ self addCheckBoxForClassesNamespace:ns ]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
386 |
]. |
7042 | 387 |
|
388 |
methodPackages size == 1 ifTrue:[ |
|
389 |
currentPackage := methodPackages first. |
|
390 |
] ifFalse:[ |
|
391 |
currentPackage := browser currentProject. |
|
7384 | 392 |
"/ selectedClasses size == 0 ifTrue:[ |
393 |
"/ |classesInAllSelectedCategories packagesOfAllClassesInAllSelectedCategories| |
|
394 |
"/ classesInAllSelectedCategories := Smalltalk allClasses select:[:cls | selectedCategories includes:cls category]. |
|
395 |
"/ packagesOfAllClassesInAllSelectedCategories := classesInAllSelectedCategories collect:[:eachClass | eachClass package]. |
|
396 |
"/ packagesOfAllClassesInAllSelectedCategories size == 1 ifTrue:[ |
|
397 |
"/ currentPackage := packagesOfAllClassesInAllSelectedCategories first. |
|
398 |
"/ ]. |
|
399 |
"/ ]. |
|
7042 | 400 |
]. |
401 |
||
402 |
(currentPackage notNil |
|
403 |
and:[ currentPackage ~= (browser nameListEntryForALL) ]) |
|
404 |
ifTrue:[ self addCheckBoxForCurrentPackage ] |
|
405 |
ifFalse:[ |
|
406 |
(currentClass notNil) ifTrue:[ |
|
407 |
self addCheckBoxForClassesPackage:(currentClass package) |
|
408 |
]. |
|
409 |
]. |
|
410 |
||
6242 | 411 |
selectedCategories size > 0 ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
412 |
self addCheckBoxForSelectedClassCategory. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
413 |
]. |
6242 | 414 |
(selectedClasses size > 0 or:[ selectedMethods size > 0 ]) ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
415 |
self addCheckBoxForSelectedClass. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
416 |
self addCheckBoxForSelectedClassAndSuperclasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
417 |
self addCheckBoxForSelectedClassAndSubclasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
418 |
self addCheckBoxForSelectedClassAndPrivateClasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
419 |
self addCheckBoxForSelectedClassAndSubclassesAndPrivateClasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
420 |
self addCheckBoxForOwnerAndItsPrivateClasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
421 |
self addCheckBoxForOwnerAndItsSubclassesAndItsPrivateClasses. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
422 |
]. |
6242 | 423 |
] ifFalse:[ |
424 |
browser currentNamespace ~~ Smalltalk ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
425 |
self addCheckBoxForEverywhere. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
426 |
currentNamespace := browser currentNamespace. |
6242 | 427 |
currentNamespace ~= (browser nameListEntryForALL) ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
428 |
self addCheckBoxForCurrentNamespace. |
6242 | 429 |
] ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
430 |
(currentClass notNil |
6685 | 431 |
and:[ (ns := currentClass nameSpace) notNil |
432 |
and:[ ns ~~ Smalltalk ] ]) |
|
433 |
ifTrue:[ |
|
434 |
self addCheckBoxForClassesNamespace:ns |
|
435 |
]. |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
436 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
437 |
]. |
5591 | 438 |
]. |
8083
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
439 |
searchAreas size == 0 ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
440 |
self addCheckBoxForEverywhere. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
441 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
442 |
self addCheckBoxForChangedClassesList. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
443 |
|
6242 | 444 |
(withMethodList and:[ browser isMethodListBrowser ]) ifTrue:[ |
445 |
searchAreas size == 0 ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
446 |
self addCheckBoxForEverywhere. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
447 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
448 |
self addCheckBoxForMethodList. |
6242 | 449 |
browser selectedMethods value size > 1 ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
450 |
self addCheckBoxForSelectedMethods. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
451 |
]. |
8566 | 452 |
self addCheckBoxForSelectedMethodClasses. |
8083
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
453 |
] ifFalse:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
454 |
searchAreas size == 0 ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
455 |
self addCheckBoxForEverywhere. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
456 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
457 |
self addCheckBoxForChangedMethodList. |
5591 | 458 |
]. |
7042 | 459 |
|
6242 | 460 |
searchAreas size == 0 ifTrue:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
461 |
whereRadioGroup := #everywhere asValue. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
462 |
self addDummyCheckBoxForEverywhere. |
6242 | 463 |
] ifFalse:[ |
464 |
whereDefault notNil ifTrue:[ |
|
465 |
(searchAreas includes:whereDefault) ifTrue:[ |
|
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
466 |
where := whereDefault asSymbol. |
6242 | 467 |
] ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
468 |
where := searchAreas first. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
469 |
]. |
6242 | 470 |
] ifFalse:[ |
5886
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
471 |
where := #everywhere. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
472 |
]. |
a212a4614597
remember last match- and last case-flag setting as default
Claus Gittinger <cg@exept.de>
parents:
5592
diff
changeset
|
473 |
whereRadioGroup value:where. |
5591 | 474 |
]. |
6685 | 475 |
|
476 |
hPanel add:leftVerticalPanel. |
|
477 |
||
8782 | 478 |
rightVerticalPanel := currentPanel := VerticalPanelView new. |
6685 | 479 |
rightVerticalPanel verticalLayout:#topSpace. |
480 |
rightVerticalPanel horizontalLayout:#fitSpace. |
|
481 |
||
482 |
false ifTrue:[ |
|
483 |
self addCheckBoxForClassMethodSearch. |
|
484 |
self addCheckBoxForInstanceMethodSearch. |
|
485 |
]. |
|
486 |
||
487 |
"/ rightVerticalPanel origin:0.75@0.0 corner:1.0@1.0. |
|
488 |
hPanel |
|
8165
d7d59fbdcd2b
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8124
diff
changeset
|
489 |
preferredExtent:(leftVerticalPanel preferredHeight + rightVerticalPanel preferredHeight) |
6685 | 490 |
@ |
8165
d7d59fbdcd2b
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8124
diff
changeset
|
491 |
(leftVerticalPanel preferredHeight max:rightVerticalPanel preferredHeight). |
6685 | 492 |
hPanel add:rightVerticalPanel. |
493 |
self addComponent:hPanel indent:0. |
|
494 |
||
5591 | 495 |
"/ panel has its own idea of indenting |
496 |
self addVerticalSpace. |
|
9311 | 497 |
searchWhat == #selector ifTrue:[ |
498 |
l := self addFilteredListOfMatchingSelectors. |
|
499 |
self stickAtBottomWithVariableHeight:l. |
|
9315 | 500 |
matchHolder notNil ifTrue:[ |
501 |
matchHolder onChangeEvaluate:[ self updateListOfMatchingSelectorsFor:inputField contents ] |
|
502 |
]. |
|
9331
f5f593eca2dd
changed: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
Claus Gittinger <cg@exept.de>
parents:
9327
diff
changeset
|
503 |
inputField notNil ifTrue:[ self updateListOfMatchingSelectorsFor:inputField contents ]. |
9311 | 504 |
] ifFalse:[ |
505 |
self addHorizontalLine. |
|
506 |
]. |
|
5591 | 507 |
self addButtons. |
6685 | 508 |
|
5591 | 509 |
self label:(resources string:'Search'). |
7374 | 510 |
|
7384 | 511 |
"Modified: / 10-10-2006 / 15:30:52 / cg" |
5591 | 512 |
! ! |
513 |
||
514 |
!SearchDialog methodsFor:'setup'! |
|
515 |
||
516 |
addCheckBox:b forSearchArea:area |
|
8782 | 517 |
currentPanel add:b. |
5591 | 518 |
whereRadioGroup add:b value:area. |
519 |
searchAreas add:area. |
|
520 |
self makeTabable:b. |
|
521 |
! |
|
522 |
||
8083
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
523 |
addCheckBoxForChangedClassesList |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
524 |
|b| |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
525 |
|
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
526 |
b := CheckBox label:(resources string:'Changed Classes'). |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
527 |
self addCheckBox:b forSearchArea:#listOfChangedClasses. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
528 |
ChangeSet current changedClasses isEmpty ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
529 |
b disable |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
530 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
531 |
^ b. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
532 |
! |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
533 |
|
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
534 |
addCheckBoxForChangedMethodList |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
535 |
|b| |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
536 |
|
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
537 |
b := CheckBox label:(resources string:'Changed Methods'). |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
538 |
self addCheckBox:b forSearchArea:#listOfChangedMethods. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
539 |
ChangeSet current changeSelectors isEmpty ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
540 |
b disable |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
541 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
542 |
^ b. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
543 |
! |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
544 |
|
6685 | 545 |
addCheckBoxForClassMethodSearch |
546 |
|b| |
|
547 |
||
548 |
b := CheckBox label:(resources string:'Class Protocol'). |
|
549 |
b model:(self searchClassProtocolHolder). |
|
8782 | 550 |
currentPanel add:b. |
6685 | 551 |
^ b. |
552 |
! |
|
553 |
||
5591 | 554 |
addCheckBoxForClassesNamespace:ns |
555 |
|b| |
|
556 |
||
557 |
b := CheckBox |
|
8124 | 558 |
label:(resources string:'Classes'' nameSpace ("%1")' with:ns name). |
5591 | 559 |
self addCheckBox:b forSearchArea:#currentClassesNameSpace. |
560 |
^ b. |
|
561 |
! |
|
562 |
||
7333 | 563 |
addCheckBoxForClassesPackage:pkg |
564 |
|b| |
|
565 |
||
566 |
b := CheckBox |
|
8124 | 567 |
label:(resources string:'Classes'' package ("%1")' with:pkg). |
7333 | 568 |
self addCheckBox:b forSearchArea:#currentClassesPackage. |
569 |
^ b. |
|
570 |
||
571 |
"Created: / 21-09-2006 / 17:39:55 / cg" |
|
572 |
! |
|
573 |
||
5591 | 574 |
addCheckBoxForCurrentNamespace |
575 |
|b| |
|
576 |
||
7384 | 577 |
b := CheckBox |
8124 | 578 |
label:(resources string:'Current nameSpace ("%1")' with:currentNamespace name). |
5591 | 579 |
self addCheckBox:b forSearchArea:#currentNameSpace. |
580 |
^ b. |
|
7384 | 581 |
|
582 |
"Modified: / 10-10-2006 / 15:28:47 / cg" |
|
5591 | 583 |
! |
584 |
||
7042 | 585 |
addCheckBoxForCurrentPackage |
586 |
|b| |
|
587 |
||
7384 | 588 |
b := CheckBox |
8124 | 589 |
label:(resources string:'Current package ("%1")' with:currentPackage). |
7042 | 590 |
self addCheckBox:b forSearchArea:#currentPackage. |
591 |
^ b. |
|
7384 | 592 |
|
593 |
"Modified: / 10-10-2006 / 15:28:51 / cg" |
|
7042 | 594 |
! |
595 |
||
596 |
addCheckBoxForCurrentPackage:pkg |
|
597 |
|b| |
|
598 |
||
599 |
b := CheckBox |
|
8124 | 600 |
label:(resources string:'Classes'' package ("%1")' with:pkg). |
7042 | 601 |
self addCheckBox:b forSearchArea:#currentClassesPackage. |
602 |
^ b. |
|
7384 | 603 |
|
604 |
"Modified: / 10-10-2006 / 15:29:06 / cg" |
|
7042 | 605 |
! |
606 |
||
5591 | 607 |
addCheckBoxForEverywhere |
608 |
|b| |
|
609 |
||
610 |
b := CheckBox label:(resources string:'Everywhere'). |
|
611 |
self addCheckBox:b forSearchArea:#everywhere. |
|
612 |
^ b. |
|
613 |
! |
|
614 |
||
6685 | 615 |
addCheckBoxForInstanceMethodSearch |
616 |
|b| |
|
617 |
||
618 |
b := CheckBox label:(resources string:'Instance Protocol'). |
|
619 |
b model:(self searchInstanceProtocolHolder). |
|
8782 | 620 |
currentPanel add:b. |
6685 | 621 |
^ b. |
622 |
! |
|
623 |
||
5591 | 624 |
addCheckBoxForMethodList |
625 |
|b| |
|
626 |
||
627 |
b := CheckBox label:(resources string:'Methodlist'). |
|
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
628 |
self addCheckBox:b forSearchArea:AREA_LISTOFMETHODS. |
5591 | 629 |
^ b. |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
630 |
|
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
631 |
"Modified: / 19-11-2010 / 12:00:52 / cg" |
5591 | 632 |
! |
633 |
||
634 |
addCheckBoxForOwnerAndItsPrivateClasses |
|
8124 | 635 |
|b lbl arg| |
5591 | 636 |
|
637 |
(currentClass notNil and:[ currentClass isPrivate. ]) ifTrue:[ |
|
8124 | 638 |
lbl := 'Owner (%1) & all its private classes'. |
639 |
arg := currentClass owningClass name. |
|
5591 | 640 |
] ifFalse:[ |
8124 | 641 |
lbl := 'Owners & all their private classes'. |
5591 | 642 |
]. |
8124 | 643 |
b := CheckBox label:(resources string:lbl with:arg). |
5591 | 644 |
self addCheckBox:b forSearchArea:#ownersWithPrivateClasses. |
645 |
(selectedClasses contains:[ :cls | cls isPrivate. ]) ifFalse:[ |
|
8124 | 646 |
b disable. |
5591 | 647 |
]. |
648 |
^ b. |
|
649 |
! |
|
650 |
||
651 |
addCheckBoxForOwnerAndItsSubclassesAndItsPrivateClasses |
|
8124 | 652 |
|b lbl arg| |
5591 | 653 |
|
654 |
(currentClass notNil and:[ currentClass isPrivate. ]) ifTrue:[ |
|
8124 | 655 |
lbl := 'Owner (%1) & its subclasses & all its private classes'. |
656 |
arg := currentClass owningClass name. |
|
5591 | 657 |
] ifFalse:[ |
8124 | 658 |
lbl := 'Owners & their subclasses & all their private classes'. |
5591 | 659 |
]. |
8124 | 660 |
b := CheckBox label:(resources string:lbl with:arg). |
5591 | 661 |
self addCheckBox:b forSearchArea:#ownersHierarchiesWithPrivateClasses. |
662 |
(selectedClasses contains:[ :cls | cls isPrivate. ]) ifFalse:[ |
|
8124 | 663 |
b disable. |
5591 | 664 |
]. |
665 |
^ b. |
|
666 |
! |
|
667 |
||
668 |
addCheckBoxForSelectedClass |
|
8124 | 669 |
|b lbl arg| |
5591 | 670 |
|
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
671 |
(browser isMethodListBrowser |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
672 |
or:[ currentClass isNil |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
673 |
or:[ selectedClasses size > 1] ]) ifTrue:[ |
8124 | 674 |
selectedClasses size == 1 ifTrue:[ |
675 |
lbl := 'Selected class ("%1")'. |
|
676 |
arg := selectedClasses first theNonMetaclass name. |
|
677 |
] ifFalse:[ |
|
678 |
lbl := 'Selected classes (%1)'. |
|
679 |
arg := selectedClasses size. |
|
680 |
]. |
|
5591 | 681 |
] ifFalse:[ |
8124 | 682 |
lbl := 'Class ("%1")'. |
683 |
arg := currentClass name. |
|
5591 | 684 |
]. |
8124 | 685 |
b := CheckBox label:(resources string:lbl with:arg). |
5591 | 686 |
self addCheckBox:b forSearchArea:#classes. |
687 |
^ b. |
|
688 |
! |
|
689 |
||
690 |
addCheckBoxForSelectedClassAndPrivateClasses |
|
691 |
|b lbl| |
|
692 |
||
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
693 |
(browser isMethodListBrowser |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
694 |
or:[ currentClass isNil |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
695 |
or:[ selectedClasses size > 1] ]) ifTrue:[ |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
696 |
lbl := 'Selected classes & all private classes'. |
5591 | 697 |
] ifFalse:[ |
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
698 |
lbl := 'Class & private classes'. |
5591 | 699 |
]. |
700 |
b := CheckBox label:(resources string:lbl). |
|
701 |
self addCheckBox:b forSearchArea:#classesWithPrivateClasses. |
|
702 |
(selectedClasses |
|
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
703 |
contains:[ :cls | cls theNonMetaclass privateClasses size > 0. ]) |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
704 |
ifFalse:[ b disable. ]. |
5591 | 705 |
^ b. |
706 |
! |
|
707 |
||
708 |
addCheckBoxForSelectedClassAndSubclasses |
|
709 |
|b lbl| |
|
710 |
||
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
711 |
(browser isMethodListBrowser |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
712 |
or:[ currentClass isNil |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
713 |
or:[ selectedClasses size > 1] ]) ifTrue:[ |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
714 |
lbl := 'Selected classes & all subclasses'. |
5591 | 715 |
] ifFalse:[ |
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
716 |
lbl := 'Class & subclasses'. |
5591 | 717 |
]. |
718 |
b := CheckBox label:(resources string:lbl). |
|
719 |
self addCheckBox:b forSearchArea:#classHierarchies. |
|
720 |
(selectedClasses |
|
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
721 |
contains:[ :cls | cls theNonMetaclass subclasses size > 0. ]) |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
722 |
ifFalse:[ b disable. ]. |
5591 | 723 |
^ b. |
724 |
! |
|
725 |
||
726 |
addCheckBoxForSelectedClassAndSubclassesAndPrivateClasses |
|
727 |
|b lbl| |
|
728 |
||
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
729 |
(browser isMethodListBrowser |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
730 |
or:[ currentClass isNil |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
731 |
or:[ selectedClasses size > 1] ]) ifTrue:[ |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
732 |
lbl := 'Selected classes & all subclasses & all private classes'. |
5591 | 733 |
] ifFalse:[ |
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
734 |
lbl := 'Class & subclasses & all private classes'. |
5591 | 735 |
]. |
736 |
b := CheckBox label:(resources string:lbl). |
|
737 |
self addCheckBox:b forSearchArea:#classHierarchiesWithPrivateClasses. |
|
738 |
(selectedClasses |
|
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
739 |
contains:[ :cls | cls theNonMetaclass privateClasses size > 0. ]) |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
740 |
ifFalse:[ b disable. ]. |
5591 | 741 |
^ b. |
742 |
! |
|
743 |
||
744 |
addCheckBoxForSelectedClassAndSuperclasses |
|
745 |
|b lbl| |
|
746 |
||
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
747 |
(browser isMethodListBrowser |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
748 |
or:[ currentClass isNil |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
749 |
or:[ selectedClasses size > 1] ]) ifTrue:[ |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
750 |
lbl := 'Selected classes & all superclasses'. |
5591 | 751 |
] ifFalse:[ |
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
752 |
lbl := 'Class & superclasses'. |
5591 | 753 |
]. |
754 |
b := CheckBox label:(resources string:lbl). |
|
755 |
self addCheckBox:b forSearchArea:#classesAndSuperclasses. |
|
756 |
(selectedClasses |
|
8269
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
757 |
contains:[ :cls | cls theNonMetaclass superclass notNil. ]) |
eb414f5f7bf1
multiple seleted class search also when an inheritance classList is shown
Claus Gittinger <cg@exept.de>
parents:
8165
diff
changeset
|
758 |
ifFalse:[ b disable. ]. |
5591 | 759 |
^ b. |
760 |
! |
|
761 |
||
762 |
addCheckBoxForSelectedClassCategory |
|
8124 | 763 |
|b lbl arg| |
5591 | 764 |
|
765 |
currentClassCategory notNil ifTrue:[ |
|
8124 | 766 |
lbl := 'Class category ("%1")'. |
767 |
arg := currentClassCategory. |
|
5591 | 768 |
] ifFalse:[ |
8124 | 769 |
lbl := 'Selected classes categories (%1)'. |
770 |
arg := selectedCategories size. |
|
5591 | 771 |
]. |
8124 | 772 |
b := CheckBox label:(resources string:lbl with:arg). |
5591 | 773 |
self addCheckBox:b forSearchArea:#classCategories. |
774 |
^ b. |
|
775 |
! |
|
776 |
||
8566 | 777 |
addCheckBoxForSelectedMethodClasses |
778 |
|b classes| |
|
779 |
||
9619
23273d2df296
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9600
diff
changeset
|
780 |
classes := ((browser selectedMethods value ? #()) |
23273d2df296
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9600
diff
changeset
|
781 |
select:[:m | m mclass notNil] |
23273d2df296
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9600
diff
changeset
|
782 |
thenCollect:[:m | m mclass theNonMetaclass]) asSet. |
8566 | 783 |
classes size == 1 ifTrue:[ |
9271
4fc80f22048c
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9245
diff
changeset
|
784 |
b := CheckBox label:(resources string:'Selected method''s class (%1)' |
8566 | 785 |
with:classes first name). |
786 |
] ifFalse:[ |
|
9271
4fc80f22048c
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9245
diff
changeset
|
787 |
b := CheckBox label:(resources string:'Selected methods'' classes (%1)' |
8566 | 788 |
with:classes size). |
789 |
]. |
|
790 |
self addCheckBox:b forSearchArea:#listOfSelectedMethodClasses. |
|
791 |
^ b. |
|
9619
23273d2df296
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9600
diff
changeset
|
792 |
|
23273d2df296
changed: #addCheckBoxForSelectedMethodClasses
Claus Gittinger <cg@exept.de>
parents:
9600
diff
changeset
|
793 |
"Modified: / 01-11-2010 / 21:35:46 / cg" |
8566 | 794 |
! |
795 |
||
5591 | 796 |
addCheckBoxForSelectedMethods |
797 |
|b| |
|
798 |
||
799 |
b := CheckBox label:(resources string:'Selected methods (%1)' |
|
800 |
with:browser selectedMethods value size). |
|
801 |
self addCheckBox:b forSearchArea:#listOfSelectedMethods. |
|
802 |
^ b. |
|
803 |
! |
|
804 |
||
7042 | 805 |
addCheckBoxForSelectedPackage |
8124 | 806 |
|b lbl arg| |
7042 | 807 |
|
808 |
currentClassCategory notNil ifTrue:[ |
|
8124 | 809 |
lbl := 'Class category ("%1")'. |
810 |
arg := currentClassCategory. |
|
7042 | 811 |
] ifFalse:[ |
8124 | 812 |
lbl := 'Selected classes categories (%1)'. |
813 |
arg := selectedCategories size. |
|
7042 | 814 |
]. |
8124 | 815 |
b := CheckBox label:(resources string:lbl with:arg). |
7042 | 816 |
self addCheckBox:b forSearchArea:#classCategories. |
817 |
^ b. |
|
818 |
! |
|
819 |
||
5591 | 820 |
addDummyCheckBoxForEverywhere |
821 |
|b| |
|
822 |
||
823 |
b := CheckBox label:(resources string:'Everywhere'). |
|
824 |
b turnOn. |
|
825 |
b disable. |
|
6685 | 826 |
|
8782 | 827 |
currentPanel add:b. |
5591 | 828 |
! |
829 |
||
9309 | 830 |
addFilteredListOfMatchingSelectors |
831 |
|l| |
|
832 |
||
833 |
listHolder := List new. |
|
834 |
||
835 |
l := HVScrollableView for:SelectionInListView. |
|
836 |
l listHolder:listHolder. |
|
837 |
self addComponent:l. |
|
838 |
l doubleClickAction:[ |
|
839 |
selectorHolder value:(l selectionValue). |
|
840 |
matchHolder value:false. |
|
841 |
caseHolder value:false. |
|
842 |
self doAccept. |
|
843 |
self okPressed. |
|
844 |
]. |
|
845 |
^ l. |
|
846 |
! |
|
847 |
||
5591 | 848 |
addInputFieldForSelectorOrNameOrString |
9315 | 849 |
|sel lastSearchPatterns| |
5591 | 850 |
|
9311 | 851 |
searchWhat == #selector ifTrue:[ |
8123 | 852 |
sel := browser selectorToSearchFor. |
5591 | 853 |
] ifFalse:[ |
9311 | 854 |
searchWhat == #globalName ifTrue:[ |
8123 | 855 |
sel := browser globalNameToSearchFor ? LastGlobalSearched. |
856 |
] ifFalse:[ |
|
9311 | 857 |
searchWhat == #string ifTrue:[ |
8123 | 858 |
sel := browser stringToSearchFor ? LastStringSearched. |
859 |
] ifFalse:[ |
|
860 |
sel := browser selectorToSearchFor. |
|
861 |
] |
|
862 |
]. |
|
5591 | 863 |
]. |
9315 | 864 |
lastSearchPatterns := browser lastSearchPatterns. |
8123 | 865 |
sel isEmptyOrNil ifTrue:[ |
866 |
"/ use last searchString |
|
867 |
lastSearchPatterns size > 0 ifTrue:[ |
|
868 |
sel := lastSearchPatterns first. |
|
869 |
]. |
|
5591 | 870 |
]. |
9645
8ff383213d07
comment/format in: #addCheckBoxForSelectedPackage
Claus Gittinger <cg@exept.de>
parents:
9644
diff
changeset
|
871 |
selectorHolder := (sel ? '') withoutSeparators asValue. |
5591 | 872 |
|
873 |
inputField := self addComboBoxOn:selectorHolder tabable:true. |
|
9309 | 874 |
inputField list:lastSearchPatterns. |
9245
1f903a58f92c
changed: #addInputFieldForSelectorOrNameOrString
Claus Gittinger <cg@exept.de>
parents:
9001
diff
changeset
|
875 |
inputField selectAllInitially. |
9309 | 876 |
inputField immediateAccept:true. |
9506
757e644f44f6
changed: #addInputFieldForSelectorOrNameOrString
Stefan Vogel <sv@exept.de>
parents:
9424
diff
changeset
|
877 |
inputField takeFocus. |
5591 | 878 |
inputField |
8123 | 879 |
entryCompletionBlock:[ :contents | |
880 |
|s what| |
|
5591 | 881 |
|
8123 | 882 |
s := contents withoutSpaces. |
883 |
self topView |
|
9309 | 884 |
withWaitCursorDo:[ |
885 |
|best matching| |
|
886 |
||
9311 | 887 |
searchWhat == #globalName ifFalse:[ |
8123 | 888 |
what := Smalltalk selectorCompletion:s. |
889 |
] ifTrue:[ |
|
890 |
what := Smalltalk globalNameCompletion:s. |
|
891 |
]. |
|
9309 | 892 |
best := what first. |
893 |
matching := what second. |
|
894 |
inputField contents:best. |
|
895 |
"/ listHolder contents:matching. |
|
896 |
matching size ~~ 1 ifTrue:[ |
|
8123 | 897 |
browser window beep. |
898 |
]. |
|
899 |
]. |
|
900 |
]. |
|
9309 | 901 |
|
902 |
selectorHolder onChangeEvaluate:[ self updateListOfMatchingSelectorsFor:inputField contents ]. |
|
9644
d417581c978b
changed: #addInputFieldForSelectorOrNameOrString
Claus Gittinger <cg@exept.de>
parents:
9642
diff
changeset
|
903 |
|
9645
8ff383213d07
comment/format in: #addCheckBoxForSelectedPackage
Claus Gittinger <cg@exept.de>
parents:
9644
diff
changeset
|
904 |
"Modified: / 23-11-2010 / 14:32:50 / cg" |
5591 | 905 |
! |
906 |
||
907 |
addTextEntryFieldForCode |
|
9423 | 908 |
|initial box panel patternInfoBox infoLabel helpButton errMessageField checkCodeAction |
7170 | 909 |
metaBox b| |
5591 | 910 |
|
911 |
box := View new. |
|
6443 | 912 |
box extent:(600 @ 200). |
5591 | 913 |
|
6608 | 914 |
panel := VariableHorizontalPanel in:box. |
915 |
panel origin:0.0@0.0 corner:(1.0@1.0). |
|
5591 | 916 |
|
6608 | 917 |
codeField := CodeView in:panel. |
7748 | 918 |
codeField canTab:true. |
6608 | 919 |
"/ codeField origin:0.0@0.0 corner:(0.75@1.0). |
920 |
||
9423 | 921 |
patternInfoBox := View in:panel. |
922 |
||
923 |
infoLabel := Label in:patternInfoBox. |
|
924 |
infoLabel geometryLayout:(LayoutFrame bottomInset:30). |
|
925 |
||
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
926 |
infoLabel font:(codeField font asSize:(codeField font size - 2)). |
6608 | 927 |
infoLabel adjust:#left. |
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
928 |
infoLabel label:(self helpTextForMetaPatterns). |
5591 | 929 |
|
6608 | 930 |
panel relativeCorners:#(0.6 1.0). |
9423 | 931 |
panel showHandle:true. |
6608 | 932 |
|
9423 | 933 |
helpButton := Button label:(resources string:'Pattern Help') in:patternInfoBox. |
6608 | 934 |
helpButton layout:((AlignmentOrigin fractionalFromPoint:0.5@1.0) |
6443 | 935 |
leftOffset:2 |
8165
d7d59fbdcd2b
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
8124
diff
changeset
|
936 |
topOffset:helpButton preferredHeight negated; |
6608 | 937 |
leftAlignmentFraction:0.5 topAlignmentFraction:0). |
5591 | 938 |
helpButton topInset:0.75@1.0. |
939 |
helpButton action:[self showHelpOnCodePatterns]. |
|
940 |
||
6608 | 941 |
|
5591 | 942 |
self addComponent:box tabable:true. |
7170 | 943 |
|
944 |
metaBox := HorizontalPanelView new. |
|
945 |
metaBox horizontalLayout:#leftMax. |
|
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
946 |
b := Button label:'+Lit' action:[ codeField pasteOrReplace:'`#n' ] in:metaBox. |
8833
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
947 |
b helpKey:#matchAnyLiteral. |
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
948 |
b := Button label:'+Var' action:[ codeField pasteOrReplace:'`v' ] in:metaBox. |
8833
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
949 |
b helpKey:#matchAnyVariable. |
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
950 |
b := Button label:'+Expr' action:[ codeField pasteOrReplace:'`@e' ] in:metaBox. |
8833
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
951 |
b helpKey:#matchAnyExpression. |
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
952 |
b := Button label:'+Msg' action:[ codeField pasteOrReplace:'`@m:' ] in:metaBox. |
8833
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
953 |
b helpKey:#matchAnyMessage. |
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
954 |
b := Button label:'+Node' action:[ codeField pasteOrReplace:'`{:node | node isLiteral and:[node value isSymbol] }' ] in:metaBox. |
9424
ea700a8c978a
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9423
diff
changeset
|
955 |
b helpKey:#matchAnyNode. |
7170 | 956 |
self addComponent:metaBox. |
957 |
||
5591 | 958 |
errMessageField := (self addTextLabel:'') adjust:#left. |
959 |
errMessageField level:-1. |
|
960 |
self addCheckBox:(resources string:'Method') on:self isMethodHolder. |
|
961 |
||
962 |
checkCodeAction := [ self checkCodeIn:codeField notifying:errMessageField. ]. |
|
963 |
||
964 |
codeField modifiedChannel onChangeEvaluate:checkCodeAction. |
|
8282
9b4068f2dd30
method-code search fixed: correctly pass the isMethod argument
Claus Gittinger <cg@exept.de>
parents:
8269
diff
changeset
|
965 |
self isMethodHolder onChangeEvaluate:checkCodeAction. |
5591 | 966 |
|
967 |
initial := browser selectionInCodeView. |
|
968 |
initial isEmptyOrNil ifTrue:[ |
|
6443 | 969 |
initial := LastCodeSearched ? '' |
5591 | 970 |
]. |
971 |
codeField contents:initial. |
|
972 |
checkCodeAction value. |
|
7748 | 973 |
|
9519
e02cc8f995ec
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
9506
diff
changeset
|
974 |
"Modified: / 11-07-2010 / 10:26:41 / cg" |
5591 | 975 |
! |
976 |
||
977 |
checkCodeIn:codeField notifying:errMessageField |
|
978 |
|codeString tree errAction| |
|
979 |
||
980 |
codeString := codeField contents asString string. |
|
981 |
errAction := [:str :pos | |
|
6608 | 982 |
|line col badLine| |
5591 | 983 |
|
6608 | 984 |
line := codeField lineOfCharacterPosition:pos. |
985 |
col := (codeField colOfCharacterPosition:pos) max:1. |
|
5591 | 986 |
|
8282
9b4068f2dd30
method-code search fixed: correctly pass the isMethod argument
Claus Gittinger <cg@exept.de>
parents:
8269
diff
changeset
|
987 |
badLine := (codeField listAt:line) ? ''. |
9b4068f2dd30
method-code search fixed: correctly pass the isMethod argument
Claus Gittinger <cg@exept.de>
parents:
8269
diff
changeset
|
988 |
col <= badLine size size ifTrue:[ |
6608 | 989 |
codeField |
990 |
listAt:line |
|
991 |
put:(badLine asText |
|
992 |
emphasisAt:col |
|
993 |
put:(UserPreferences current unknownIdentifierEmphasis)). |
|
994 |
"/ codeField selectFromCharacterPosition:pos to:pos. |
|
995 |
]. |
|
996 |
errMessageField label:('line: ',line printString,' ',str). |
|
997 |
errMessageField backgroundColor:Color red. |
|
998 |
codeField requestFocus. |
|
999 |
nil. |
|
1000 |
]. |
|
5591 | 1001 |
|
1002 |
isMethodHolder value ifTrue:[ |
|
6608 | 1003 |
tree := RBParser parseRewriteMethod:codeString onError: errAction. |
5591 | 1004 |
] ifFalse:[ |
6608 | 1005 |
tree := RBParser parseRewriteExpression:codeString onError: errAction. |
5591 | 1006 |
]. |
6608 | 1007 |
tree notNil ifTrue:[ |
1008 |
errMessageField backgroundColor:View defaultViewBackgroundColor. |
|
1009 |
errMessageField label:nil |
|
1010 |
]. |
|
5591 | 1011 |
codeField modifiedChannel setValue:false. |
1012 |
! |
|
1013 |
||
1014 |
getClassesAndMethodsFor:where |
|
1015 |
where == #everywhere ifTrue:[ |
|
7042 | 1016 |
classes := Smalltalk allClasses. |
7378 | 1017 |
methods := nil. |
7042 | 1018 |
^ self. |
5591 | 1019 |
]. |
1020 |
where == #currentNameSpace ifTrue:[ |
|
7042 | 1021 |
classes := currentNamespace allClassesWithAllPrivateClasses. |
7378 | 1022 |
methods := nil. |
7042 | 1023 |
^ self. |
5591 | 1024 |
]. |
1025 |
where == #currentClassesNameSpace ifTrue:[ |
|
7042 | 1026 |
currentClass isPrivate ifTrue:[ |
1027 |
classes := currentClass topOwningClass nameSpace |
|
1028 |
allClassesWithAllPrivateClasses. |
|
1029 |
] ifFalse:[ |
|
1030 |
classes := currentClass nameSpace allClassesWithAllPrivateClasses. |
|
1031 |
]. |
|
7378 | 1032 |
methods := nil. |
7042 | 1033 |
^ self. |
1034 |
]. |
|
1035 |
where == #currentPackage ifTrue:[ |
|
1036 |
classes := Smalltalk allClassesInPackage:currentPackage. |
|
7378 | 1037 |
methods := nil. |
7042 | 1038 |
^ self. |
1039 |
]. |
|
1040 |
where == #currentClassesPackage ifTrue:[ |
|
1041 |
classes := Smalltalk allClassesInPackage:currentClass package. |
|
7378 | 1042 |
methods := nil. |
7042 | 1043 |
^ self. |
5591 | 1044 |
]. |
1045 |
where == #classCategories ifTrue:[ |
|
7042 | 1046 |
classes := Smalltalk allClasses |
1047 |
select:[ :cls | selectedCategories includes:cls category. ]. |
|
1048 |
classes := classes collect:[ :each | each theNonMetaclass. ]. |
|
7378 | 1049 |
methods := nil. |
7042 | 1050 |
^ self. |
5591 | 1051 |
]. |
1052 |
(where == #classes or:[ where == #classesWithPrivateClasses. ]) ifTrue:[ |
|
7042 | 1053 |
classes := selectedClasses collect:[ :each | each theNonMetaclass. ]. |
7378 | 1054 |
methods := nil. |
7042 | 1055 |
^ self. |
5591 | 1056 |
]. |
7378 | 1057 |
(where == #classHierarchies or:[ where == #classHierarchiesWithPrivateClasses. ]) |
1058 |
ifTrue:[ |
|
1059 |
classes := IdentitySet new. |
|
1060 |
selectedClasses do:[ :cls | |
|
1061 |
classes addAll:cls theNonMetaclass withAllSubclasses. |
|
1062 |
]. |
|
1063 |
methods := nil. |
|
1064 |
^ self. |
|
1065 |
]. |
|
5591 | 1066 |
where == #ownersWithPrivateClasses ifTrue:[ |
7042 | 1067 |
classes := IdentitySet new. |
1068 |
selectedClasses do:[ :cls | |
|
1069 |
|c| |
|
5591 | 1070 |
|
7042 | 1071 |
c := cls theNonMetaclass. |
1072 |
classes add:(c owningClass ? c). |
|
1073 |
]. |
|
7378 | 1074 |
methods := nil. |
7042 | 1075 |
^ self. |
5591 | 1076 |
]. |
1077 |
where == #ownersHierarchiesWithPrivateClasses ifTrue:[ |
|
7042 | 1078 |
classes := IdentitySet new. |
1079 |
selectedClasses do:[ :cls | |
|
1080 |
|c| |
|
5591 | 1081 |
|
7042 | 1082 |
c := cls theNonMetaclass. |
1083 |
classes addAll:(c owningClass ? c) withAllSubclasses. |
|
1084 |
]. |
|
7378 | 1085 |
methods := nil. |
7042 | 1086 |
^ self. |
5591 | 1087 |
]. |
1088 |
(where == #classesAndSuperclasses) ifTrue:[ |
|
7042 | 1089 |
classes := IdentitySet new. |
1090 |
selectedClasses do:[ :cls | |
|
1091 |
classes addAll:cls theNonMetaclass withAllSuperclasses. |
|
1092 |
]. |
|
7378 | 1093 |
methods := nil. |
7042 | 1094 |
^ self. |
5591 | 1095 |
]. |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
1096 |
(where == AREA_LISTOFMETHODS) ifTrue:[ |
7042 | 1097 |
classes := nil. |
1098 |
methods := browser methodListApp methodList value. |
|
1099 |
^ self. |
|
5591 | 1100 |
]. |
1101 |
(where == #listOfSelectedMethods) ifTrue:[ |
|
7042 | 1102 |
classes := nil. |
1103 |
methods := browser selectedMethods value. |
|
1104 |
^ self. |
|
5591 | 1105 |
]. |
8566 | 1106 |
(where == #listOfSelectedMethodClasses) ifTrue:[ |
1107 |
classes := (browser selectedMethods value collect:[:m | m mclass theNonMetaclass]) asSet asOrderedCollection. |
|
1108 |
methods := nil. |
|
1109 |
^ self. |
|
1110 |
]. |
|
8083
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1111 |
(where == #listOfChangedClasses) ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1112 |
classes := ChangeSet current changedClasses. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1113 |
methods := nil. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1114 |
^ self. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1115 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1116 |
(where == #listOfChangedMethods) ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1117 |
classes := nil. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1118 |
methods := Set new. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1119 |
ChangeSet current do:[:chg | |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1120 |
|mthd| |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1121 |
|
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1122 |
chg notNil ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1123 |
chg isMethodChange ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1124 |
mthd := chg changeMethod. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1125 |
mthd notNil ifTrue:[ |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1126 |
methods add:mthd |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1127 |
] |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1128 |
] |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1129 |
] |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1130 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1131 |
methods := methods asOrderedCollection. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1132 |
^ self. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1133 |
]. |
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1134 |
|
53aba2c722ad
+search in changed methods & changed classes
Claus Gittinger <cg@exept.de>
parents:
8067
diff
changeset
|
1135 |
self halt:'inumplemented search'. |
7378 | 1136 |
|
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
1137 |
"Modified: / 19-11-2010 / 12:01:15 / cg" |
5591 | 1138 |
! |
1139 |
||
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1140 |
helpTextForMetaPatterns |
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1141 |
^ 'MetaPatterns: |
9423 | 1142 |
' , '`' allBold , ' = meta |
1143 |
' , '@' allBold , ' = list/any |
|
1144 |
' , '.' allBold , ' = statement |
|
1145 |
' , '`' allBold , ' = recurse |
|
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1146 |
|
9423 | 1147 |
' , '`#n' allBold , ' any lit |
1148 |
' , '`v' allBold , ' any var |
|
1149 |
' , '`@e' allBold , ' any expr |
|
1150 |
' , '`m' allBold , ' any unary message |
|
1151 |
' , '`@m:' allBold , ' any message |
|
1152 |
' , '`{:n|...}' allBold , ' node pattern |
|
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1153 |
'. |
9423 | 1154 |
|
1155 |
"Modified: / 26-04-2010 / 15:37:08 / cg" |
|
8786
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1156 |
! |
caa3e9c06b2d
added: #helpTextForMetaPatterns
Claus Gittinger <cg@exept.de>
parents:
8782
diff
changeset
|
1157 |
|
5591 | 1158 |
isMethodHolder |
1159 |
isMethodHolder isNil ifTrue:[isMethodHolder := (LastCodeSearchWasMethod ? false) asValue]. |
|
1160 |
^ isMethodHolder |
|
1161 |
! ! |
|
1162 |
||
1163 |
!SearchDialog methodsFor:'setup-buttons'! |
|
1164 |
||
1165 |
addBrowseButton |
|
1166 |
|b| |
|
1167 |
||
1168 |
b := Button label:(resources string:'Browse'). |
|
1169 |
(DialogBox defaultOKButtonAtLeft) ifTrue:[ |
|
1170 |
self addButton:b before:nil. |
|
1171 |
] ifFalse:[ |
|
1172 |
self addButton:b after:nil. |
|
1173 |
]. |
|
1174 |
b |
|
1175 |
action:[ |
|
1176 |
openHow := #newBrowser. |
|
1177 |
self doAccept. |
|
1178 |
self okPressed. |
|
1179 |
]. |
|
1180 |
^ b. |
|
1181 |
! |
|
1182 |
||
1183 |
addBufferButton |
|
1184 |
|b| |
|
1185 |
||
1186 |
b := Button label:(resources string:'Add Buffer'). |
|
1187 |
(DialogBox defaultOKButtonAtLeft) ifTrue:[ |
|
1188 |
self addButton:b before:nil. |
|
1189 |
] ifFalse:[ |
|
1190 |
self addButton:b after:nil. |
|
1191 |
]. |
|
1192 |
b |
|
1193 |
action:[ |
|
1194 |
openHow := #newBuffer. |
|
1195 |
self doAccept. |
|
1196 |
self okPressed. |
|
1197 |
]. |
|
1198 |
^ b. |
|
1199 |
! |
|
1200 |
||
1201 |
addButtons |
|
6685 | 1202 |
"add find/newBrowser/newBuffer buttons" |
1203 |
||
5591 | 1204 |
|prevButton| |
1205 |
||
1206 |
allowFind ifTrue:[ |
|
6685 | 1207 |
defaultOpenHow := #showHere. |
1208 |
prevButton := self addFindButton. |
|
5591 | 1209 |
]. |
1210 |
allowBrowser ifTrue:[ |
|
6685 | 1211 |
defaultOpenHow := #newBrowser. |
1212 |
prevButton := self addBrowseButton. |
|
5591 | 1213 |
]. |
1214 |
allowBuffer ifTrue:[ |
|
6685 | 1215 |
defaultOpenHow := #newBuffer. |
1216 |
prevButton := self addBufferButton. |
|
5591 | 1217 |
]. |
1218 |
prevButton notNil ifTrue:[ |
|
6685 | 1219 |
prevButton isReturnButton:true. |
5591 | 1220 |
]. |
1221 |
self addAbortButton. |
|
1222 |
! |
|
1223 |
||
1224 |
addFindButton |
|
1225 |
|b| |
|
1226 |
||
1227 |
b := Button label:(resources string:'Find'). |
|
1228 |
(DialogBox defaultOKButtonAtLeft) ifTrue:[ |
|
1229 |
self addButton:b before:nil. |
|
1230 |
] ifFalse:[ |
|
1231 |
self addButton:b after:nil. |
|
1232 |
]. |
|
1233 |
b |
|
1234 |
action:[ |
|
1235 |
openHow := #showHere. |
|
1236 |
self doAccept. |
|
1237 |
self okPressed. |
|
1238 |
]. |
|
1239 |
^ b. |
|
1240 |
! ! |
|
1241 |
||
1242 |
!SearchDialog class methodsFor:'documentation'! |
|
1243 |
||
1244 |
version |
|
9645
8ff383213d07
comment/format in: #addCheckBoxForSelectedPackage
Claus Gittinger <cg@exept.de>
parents:
9644
diff
changeset
|
1245 |
^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.60 2010-11-23 13:33:51 cg Exp $' |
8833
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
1246 |
! |
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
1247 |
|
fa0f28ab2b85
changed: #addTextEntryFieldForCode
Claus Gittinger <cg@exept.de>
parents:
8786
diff
changeset
|
1248 |
version_CVS |
9645
8ff383213d07
comment/format in: #addCheckBoxForSelectedPackage
Claus Gittinger <cg@exept.de>
parents:
9644
diff
changeset
|
1249 |
^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.60 2010-11-23 13:33:51 cg Exp $' |
5591 | 1250 |
! ! |
9640
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
1251 |
|
68bba6744726
default for text-search in method -list
Claus Gittinger <cg@exept.de>
parents:
9619
diff
changeset
|
1252 |
SearchDialog initialize! |