author | Merge Script |
Wed, 01 Jun 2016 07:00:05 +0200 | |
branch | jv |
changeset 16643 | 9fcec4cdfc7e |
parent 16617 | 69e7de1ef22f |
parent 16639 | 629bf5cdd089 |
child 16827 | 5f036e451583 |
permissions | -rw-r--r-- |
5140 | 1 |
" |
2 |
COPYRIGHT (c) 2002 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 |
" |
|
3892 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
15092 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
11096 | 16 |
AbstractFileFinderApplicationComponent subclass:#FindFileApplication |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
17 |
instanceVariableNames:'searchDirectories searchDirectoryHolder notSearchForSameContents |
10441 | 18 |
namePatternHolder excludedNamePatternHolder ignoreCaseInName |
19 |
ignoreCaseInExcludedName contentsPatternHolder |
|
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
20 |
ignoreCaseInContents notContentsPatternHolder |
11096 | 21 |
ignoreCaseInNotContents sameContentsAsHolder useLocate useGrep |
5859 | 22 |
rememberInCache searchOnlyInCache searchForSameContents |
11096 | 23 |
contentsInfoCache contentsInfoCacheAccessLock |
6330 | 24 |
fileSizeOperatorHolder fileSizeHolder enableFileSizeFilter |
11473 | 25 |
fileSizeUnitHolder modificationTimeOperatorHolder |
13920 | 26 |
modificationTimeHolder enableModificationTimeFilter |
27 |
showUnreadableFilesAndDirectoriesHolder' |
|
6442 | 28 |
classVariableNames:'ContentsInfoCache ContentsInfoCacheAccessLock LastRememberInCache |
8330 | 29 |
LastSearchIgnoredCaseInContents LastSearchIgnoredCaseInFilename |
13920 | 30 |
SearchStringHistory LastSearchIgnoredCaseInExcludedFilename |
31 |
LastShowUnreadableFilesAndDirectories' |
|
3892 | 32 |
poolDictionaries:'' |
33 |
category:'Interface-Tools-File' |
|
34 |
! |
|
35 |
||
5140 | 36 |
!FindFileApplication class methodsFor:'documentation'! |
37 |
||
38 |
copyright |
|
39 |
" |
|
40 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
41 |
All Rights Reserved |
|
42 |
||
43 |
This software is furnished under a license and may be used |
|
44 |
only in accordance with the terms of that license and with the |
|
45 |
inclusion of the above copyright notice. This software may not |
|
46 |
be provided or otherwise made available to, or used by, any |
|
47 |
other person. No title to or ownership of the software is |
|
48 |
hereby transferred. |
|
49 |
" |
|
50 |
! ! |
|
3892 | 51 |
|
52 |
!FindFileApplication class methodsFor:'instance creation'! |
|
53 |
||
54 |
open |
|
5723 | 55 |
^ self openInDirectory:(Filename currentDirectory) |
3892 | 56 |
|
5723 | 57 |
" |
58 |
self open |
|
59 |
" |
|
60 |
! |
|
61 |
||
62 |
openInDirectory:aFilename |
|
63 |
^ self openOnFileName:(aFilename asFilename asAbsoluteFilename) |
|
64 |
||
65 |
" |
|
66 |
self openInDirectory:'/etc' |
|
67 |
" |
|
3892 | 68 |
! |
69 |
||
70 |
openOnFileName:aFileName |
|
5723 | 71 |
^ self openOnFileName:aFileName for:nil |
72 |
! |
|
73 |
||
74 |
openOnFileName:aFileName for:aTargetApplicationOrNil |
|
3892 | 75 |
|
76 |
| instance builder| |
|
77 |
||
78 |
builder := super open. |
|
79 |
instance := builder application. |
|
3983 | 80 |
instance item:(DirectoryContentsBrowser itemClass fileName:aFileName). |
5723 | 81 |
aTargetApplicationOrNil notNil ifTrue:[ |
82 |
instance targetApplication:aTargetApplicationOrNil. |
|
83 |
]. |
|
3892 | 84 |
^ builder |
85 |
! ! |
|
86 |
||
87 |
!FindFileApplication class methodsFor:'defaults'! |
|
88 |
||
89 |
tabStringFor:aApplicationType |
|
7688 | 90 |
"the formatString shown in a tab (language translated)" |
3892 | 91 |
|
7688 | 92 |
^ 'Find in %1' |
93 |
||
94 |
"Modified: / 01-03-2007 / 21:47:54 / cg" |
|
3892 | 95 |
! ! |
96 |
||
9408 | 97 |
!FindFileApplication class methodsFor:'help specs'! |
98 |
||
99 |
flyByHelpSpec |
|
100 |
"This resource specification was automatically generated |
|
101 |
by the UIHelpTool of ST/X." |
|
102 |
||
103 |
"Do not manually edit this!! If it is corrupted, |
|
104 |
the UIHelpTool may not be able to read the specification." |
|
105 |
||
106 |
" |
|
107 |
UIHelpTool openOnClass:FindFileApplication |
|
108 |
" |
|
109 |
||
110 |
<resource: #help> |
|
111 |
||
112 |
^ super flyByHelpSpec addPairsFrom:#( |
|
113 |
||
114 |
#contentsPattern |
|
115 |
'Search for files containing this. Can be matchPatterns, separated by ";"' |
|
116 |
||
117 |
#namePattern |
|
118 |
'Filename(s) to search for. Can be matchPatterns, separated by ";"' |
|
119 |
||
11122 | 120 |
#excludedNamePattern |
121 |
'Filename(s) to skip. Can be matchPatterns, separated by ";"' |
|
122 |
||
9408 | 123 |
#notContentsPattern |
124 |
'Search for files NOT containing this. Can be matchPatterns, separated by ";"' |
|
125 |
||
126 |
#searchDirectory |
|
127 |
'Folder, where the search starts' |
|
128 |
||
129 |
#searchRecursive |
|
130 |
'Recursively search in sub-folders' |
|
131 |
||
132 |
#ignoreCase |
|
133 |
'Ignore upper/lowercase differences (be case-insensitive)' |
|
134 |
||
135 |
#sameContents |
|
136 |
'Search for files with same contents as the other file' |
|
137 |
||
138 |
#fileSize |
|
11097 | 139 |
'Search for files with a specific size constraint ("~" means: +/- 10%)' |
9408 | 140 |
|
11473 | 141 |
#modificationTime |
142 |
'Search for files which are newer or older' |
|
9408 | 143 |
) |
11097 | 144 |
|
11473 | 145 |
"Modified: / 28-03-2012 / 23:03:39 / cg" |
9408 | 146 |
! ! |
147 |
||
8330 | 148 |
!FindFileApplication class methodsFor:'history'! |
149 |
||
150 |
addToSearchStringHistory:aString |
|
151 |
self searchStringHistory |
|
152 |
remove:aString ifAbsent:[]; |
|
153 |
addFirst:aString. |
|
154 |
self searchStringHistory size > 25 ifTrue:[ |
|
155 |
self searchStringHistory removeLast |
|
156 |
]. |
|
157 |
! |
|
158 |
||
159 |
searchStringHistory |
|
160 |
SearchStringHistory isNil ifTrue:[ |
|
161 |
SearchStringHistory := OrderedCollection new |
|
162 |
]. |
|
163 |
^ SearchStringHistory |
|
164 |
! ! |
|
165 |
||
3892 | 166 |
!FindFileApplication class methodsFor:'interface specs'! |
167 |
||
168 |
windowSpec |
|
169 |
"This resource specification was automatically generated |
|
170 |
by the UIPainter of ST/X." |
|
171 |
||
172 |
"Do not manually edit this!! If it is corrupted, |
|
173 |
the UIPainter may not be able to read the specification." |
|
174 |
||
175 |
" |
|
176 |
UIPainter new openOnClass:FindFileApplication andSelector:#windowSpec |
|
177 |
FindFileApplication new openInterface:#windowSpec |
|
178 |
FindFileApplication open |
|
179 |
" |
|
180 |
||
181 |
<resource: #canvas> |
|
182 |
||
183 |
^ |
|
13920 | 184 |
#(FullSpec |
185 |
name: windowSpec |
|
186 |
window: |
|
187 |
(WindowSpec |
|
188 |
label: 'File Search' |
|
189 |
name: 'File Search' |
|
190 |
min: (Point 377 131) |
|
191 |
bounds: (Rectangle 0 0 759 420) |
|
192 |
) |
|
193 |
component: |
|
194 |
(SpecCollection |
|
195 |
collection: ( |
|
196 |
(MenuPanelSpec |
|
197 |
name: 'ToolBar1' |
|
198 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
199 |
level: 0 |
|
200 |
menu: searchMenu |
|
201 |
textDefault: true |
|
202 |
) |
|
203 |
(ProgressIndicatorSpec |
|
204 |
name: 'ProgressIndicator1' |
|
205 |
layout: (LayoutFrame 125 0 11 0 231 0 21 0) |
|
206 |
visibilityChannel: enableStop |
|
207 |
backgroundColor: (Color 0.0 66.9993133440147 66.9993133440147) |
|
208 |
showPercentage: false |
|
209 |
isActivityIndicator: true |
|
210 |
) |
|
211 |
(ViewSpec |
|
212 |
name: 'Box1' |
|
213 |
layout: (LayoutFrame 0 0.0 32 0 0 1.0 231 0) |
|
214 |
component: |
|
215 |
(SpecCollection |
|
216 |
collection: ( |
|
217 |
(LabelSpec |
|
218 |
label: 'Directory:' |
|
219 |
name: 'DirectoryLabel' |
|
220 |
layout: (LayoutFrame 2 0 7 0 154 0 24 0) |
|
221 |
activeHelpKey: searchDirectory |
|
222 |
translateLabel: true |
|
223 |
adjust: right |
|
224 |
) |
|
225 |
(FilenameInputFieldSpec |
|
226 |
name: 'DirectoryEntryField' |
|
227 |
layout: (LayoutFrame 156 0 4 0 -315 1 24 0) |
|
228 |
activeHelpKey: searchDirectory |
|
229 |
model: searchDirectoryHolder |
|
230 |
immediateAccept: true |
|
231 |
acceptOnPointerLeave: false |
|
232 |
) |
|
233 |
(LabelSpec |
|
234 |
label: 'Search Files Named:' |
|
235 |
name: 'FileNameLabel' |
|
236 |
layout: (LayoutFrame 2 0 31 0 154 0 48 0) |
|
237 |
activeHelpKey: namePattern |
|
238 |
translateLabel: true |
|
239 |
adjust: right |
|
240 |
) |
|
241 |
(InputFieldSpec |
|
242 |
name: 'FileNameEntryField' |
|
243 |
layout: (LayoutFrame 156 0 28 0 -315 1 48 0) |
|
244 |
activeHelpKey: namePattern |
|
245 |
tabable: true |
|
246 |
model: namePatternHolder |
|
247 |
immediateAccept: true |
|
248 |
acceptOnLeave: false |
|
249 |
acceptOnPointerLeave: false |
|
250 |
) |
|
251 |
(LabelSpec |
|
252 |
label: 'But not Named:' |
|
253 |
name: 'Label1' |
|
254 |
layout: (LayoutFrame 2 0 55 0 154 0 72 0) |
|
255 |
activeHelpKey: excludedNamePattern |
|
256 |
translateLabel: true |
|
257 |
adjust: right |
|
258 |
) |
|
259 |
(InputFieldSpec |
|
260 |
name: 'EntryField1' |
|
261 |
layout: (LayoutFrame 156 0 52 0 -315 1 72 0) |
|
262 |
activeHelpKey: excludedNamePattern |
|
263 |
tabable: true |
|
264 |
model: excludedNamePatternHolder |
|
265 |
immediateAccept: true |
|
266 |
acceptOnLeave: false |
|
267 |
acceptOnPointerLeave: false |
|
268 |
) |
|
269 |
(LabelSpec |
|
270 |
label: 'Containing:' |
|
271 |
name: 'ContentsLabel' |
|
272 |
layout: (LayoutFrame 2 0 79 0 154 0 96 0) |
|
273 |
activeHelpKey: contentsPattern |
|
274 |
translateLabel: true |
|
275 |
adjust: right |
|
276 |
) |
|
277 |
(ComboBoxSpec |
|
278 |
name: 'ComboBox1' |
|
279 |
layout: (LayoutFrame 156 0 76 0 -315 1 96 0) |
|
280 |
activeHelpKey: contentsPattern |
|
281 |
enableChannel: notSearchForSameContents |
|
282 |
tabable: true |
|
283 |
model: contentsPatternHolder |
|
284 |
immediateAccept: true |
|
285 |
acceptOnPointerLeave: false |
|
286 |
comboList: searchStringHistory |
|
287 |
) |
|
288 |
(LabelSpec |
|
289 |
label: 'Not Containing:' |
|
290 |
name: 'NotContentsLabel' |
|
291 |
layout: (LayoutFrame 2 0 103 0 154 0 120 0) |
|
292 |
activeHelpKey: notContentsPattern |
|
293 |
translateLabel: true |
|
294 |
adjust: right |
|
295 |
) |
|
296 |
(InputFieldSpec |
|
297 |
name: 'NotContentsEntryField' |
|
298 |
layout: (LayoutFrame 156 0 100 0 -315 1 120 0) |
|
299 |
activeHelpKey: notContentsPattern |
|
300 |
enableChannel: notSearchForSameContents |
|
301 |
tabable: true |
|
302 |
model: notContentsPatternHolder |
|
303 |
immediateAccept: true |
|
304 |
acceptOnPointerLeave: false |
|
305 |
) |
|
306 |
(LabelSpec |
|
307 |
label: 'Same Contents As:' |
|
308 |
name: 'SameContentsAsLabel' |
|
309 |
layout: (LayoutFrame 2 0 127 0 154 0 144 0) |
|
310 |
activeHelpKey: sameContents |
|
311 |
translateLabel: true |
|
312 |
adjust: right |
|
313 |
) |
|
314 |
(InputFieldSpec |
|
315 |
name: 'SameContentsAsEntryField' |
|
316 |
layout: (LayoutFrame 156 0 124 0 -339 1 144 0) |
|
317 |
activeHelpKey: sameContents |
|
318 |
enableChannel: searchForSameContents |
|
319 |
tabable: true |
|
320 |
model: sameContentsAsHolder |
|
321 |
immediateAccept: true |
|
322 |
acceptOnPointerLeave: false |
|
323 |
) |
|
324 |
(CheckToggleSpec |
|
325 |
name: 'EnableSameContentsCheckToggle' |
|
326 |
layout: (LayoutOrigin -334 1 128 0) |
|
327 |
activeHelpKey: sameContents |
|
328 |
model: searchForSameContents |
|
329 |
isTriggerOnDown: true |
|
330 |
showLamp: false |
|
331 |
lampColor: (Color 100.0 100.0 0.0) |
|
332 |
) |
|
333 |
(LabelSpec |
|
334 |
label: 'File Size:' |
|
335 |
name: 'FileSizeLabel' |
|
336 |
layout: (LayoutFrame 2 0 151 0 154 0 168 0) |
|
337 |
activeHelpKey: fileSize |
|
338 |
translateLabel: true |
|
339 |
adjust: right |
|
340 |
) |
|
341 |
(PopUpListSpec |
|
342 |
label: 'PopUp List' |
|
343 |
name: 'FileSizeOperatorPopUpList' |
|
344 |
layout: (LayoutFrame 157 0 148 0 212 0 168 0) |
|
345 |
activeHelpKey: fileSize |
|
346 |
tabable: true |
|
347 |
model: fileSizeOperatorHolder |
|
348 |
enableChannel: enableFileSizeFilterAndNotSearchForSameContents |
|
349 |
menu: |
|
350 |
(Array |
|
351 |
' >' ' < ' |
|
352 |
' !!= ' ' = ' |
|
353 |
' ~ ' |
|
354 |
) |
|
3892 | 355 |
) |
13920 | 356 |
(InputFieldSpec |
357 |
name: 'FileSizeEntryField' |
|
358 |
layout: (LayoutFrame 219 0 148 0 -349 1 168 0) |
|
359 |
activeHelpKey: fileSize |
|
360 |
enableChannel: enableFileSizeFilterAndNotSearchForSameContents |
|
361 |
tabable: true |
|
362 |
model: fileSizeHolder |
|
363 |
type: fileSize |
|
364 |
immediateAccept: false |
|
365 |
acceptOnLeave: true |
|
366 |
acceptOnLostFocus: true |
|
367 |
acceptOnPointerLeave: true |
|
368 |
) |
|
369 |
(CheckToggleSpec |
|
370 |
name: 'EnableSizeCheckToggle' |
|
371 |
layout: (LayoutOrigin -334 1 151 0) |
|
372 |
activeHelpKey: fileSize |
|
373 |
model: enableFileSizeFilter |
|
374 |
enableChannel: notSearchForSameContents |
|
375 |
isTriggerOnDown: true |
|
376 |
showLamp: false |
|
377 |
lampColor: (Color 100.0 100.0 0.0) |
|
378 |
) |
|
379 |
(LabelSpec |
|
380 |
label: 'Modified:' |
|
381 |
name: 'Label2' |
|
382 |
layout: (LayoutFrame 2 0 175 0 154 0 192 0) |
|
383 |
activeHelpKey: modificationTime |
|
384 |
translateLabel: true |
|
385 |
adjust: right |
|
386 |
) |
|
387 |
(PopUpListSpec |
|
388 |
label: 'PopUp List' |
|
389 |
name: 'PopUpList1' |
|
390 |
layout: (LayoutFrame 157 0 172 0 212 0 192 0) |
|
391 |
activeHelpKey: modificationTime |
|
392 |
tabable: true |
|
393 |
model: modificationTimeOperatorHolder |
|
394 |
enableChannel: enableModificationTimeFilter |
|
395 |
menu: |
|
396 |
(Array |
|
397 |
' before' ' after ' |
|
398 |
) |
|
399 |
) |
|
400 |
(InputFieldSpec |
|
401 |
name: 'EntryField2' |
|
402 |
layout: (LayoutFrame 219 0 172 0 -349 1 192 0) |
|
403 |
activeHelpKey: modificationTime |
|
404 |
enableChannel: enableModificationTimeFilter |
|
405 |
tabable: true |
|
406 |
model: modificationTimeHolder |
|
407 |
type: timestamp |
|
408 |
immediateAccept: false |
|
409 |
acceptOnLeave: true |
|
410 |
acceptOnLostFocus: true |
|
411 |
acceptOnPointerLeave: true |
|
412 |
) |
|
413 |
(CheckToggleSpec |
|
414 |
name: 'CheckToggle1' |
|
415 |
layout: (LayoutOrigin -334 1 175 0) |
|
416 |
activeHelpKey: modificationTime |
|
417 |
model: enableModificationTimeFilter |
|
418 |
isTriggerOnDown: true |
|
419 |
showLamp: false |
|
420 |
lampColor: (Color 100.0 100.0 0.0) |
|
421 |
) |
|
422 |
(CheckBoxSpec |
|
423 |
label: 'Use ''locate'' Cmd' |
|
424 |
name: 'UseLocateCheckBox' |
|
425 |
layout: (LayoutFrame -309 1 5 0 -167 1 28 0) |
|
426 |
activeHelpKey: useLocate |
|
427 |
visibilityChannel: canUseLocate |
|
428 |
tabable: true |
|
429 |
model: useLocate |
|
430 |
translateLabel: true |
|
431 |
) |
|
432 |
(CheckBoxSpec |
|
433 |
label: 'Recursive' |
|
434 |
name: 'RecursiveSearchCheckBox' |
|
435 |
layout: (LayoutFrame -169 1 5 0 -4 1 28 0) |
|
436 |
activeHelpKey: recursiveSearch |
|
437 |
tabable: true |
|
438 |
model: searchRecursively |
|
439 |
translateLabel: true |
|
440 |
) |
|
441 |
(CheckBoxSpec |
|
442 |
label: 'Directories' |
|
443 |
name: 'SearchDirectoriesCheckBox' |
|
444 |
layout: (LayoutFrame -309 1 29 0 -167 1 52 0) |
|
445 |
enableChannel: notSearchForSameContents |
|
446 |
tabable: true |
|
447 |
model: searchDirectories |
|
448 |
translateLabel: true |
|
449 |
) |
|
450 |
(CheckBoxSpec |
|
451 |
label: 'Ignore Case' |
|
452 |
name: 'IgnoreCaseInNameCheckBox' |
|
453 |
layout: (LayoutFrame -169 1 29 0 -4 1 52 0) |
|
454 |
activeHelpKey: ignoreCase |
|
455 |
tabable: true |
|
456 |
model: ignoreCaseInName |
|
457 |
translateLabel: true |
|
458 |
) |
|
459 |
(CheckBoxSpec |
|
460 |
label: 'Ignore Case' |
|
461 |
name: 'CheckBox1' |
|
462 |
layout: (LayoutFrame -169 1 53 0 -4 1 76 0) |
|
463 |
activeHelpKey: ignoreCase |
|
464 |
tabable: true |
|
465 |
model: ignoreCaseInExcludedName |
|
466 |
translateLabel: true |
|
467 |
) |
|
468 |
(CheckBoxSpec |
|
469 |
label: 'Use ''grep'' Cmd' |
|
470 |
name: 'UseGrepCheckBox' |
|
471 |
layout: (LayoutFrame -309 1 77 0 -167 1 100 0) |
|
472 |
visibilityChannel: canUseGrep |
|
473 |
enableChannel: notSearchForSameContents |
|
474 |
tabable: true |
|
475 |
model: useGrep |
|
476 |
translateLabel: true |
|
477 |
) |
|
478 |
(CheckBoxSpec |
|
479 |
label: 'Ignore Case' |
|
480 |
name: 'IgnoreCaseInContentsCheckBox' |
|
481 |
layout: (LayoutFrame -169 1 77 0 -4 1 100 0) |
|
482 |
activeHelpKey: ignoreCase |
|
483 |
enableChannel: notSearchForSameContents |
|
484 |
tabable: true |
|
485 |
model: ignoreCaseInContents |
|
486 |
translateLabel: true |
|
487 |
) |
|
488 |
(CheckBoxSpec |
|
489 |
label: 'Ignore Case' |
|
490 |
name: 'IgnoreCaseInNotContentsCheckBox' |
|
491 |
layout: (LayoutFrame -169 1 101 0 -4 1 124 0) |
|
492 |
activeHelpKey: ignoreCase |
|
493 |
enableChannel: notSearchForSameContents |
|
494 |
tabable: true |
|
495 |
model: ignoreCaseInNotContents |
|
496 |
translateLabel: true |
|
497 |
) |
|
498 |
(CheckBoxSpec |
|
499 |
label: 'Cache Info' |
|
500 |
name: 'RememberInCacheCheckBox' |
|
501 |
layout: (LayoutFrame -309 1 125 0 -167 1 148 0) |
|
502 |
visibilityChannel: canUseGrep |
|
503 |
enableChannel: searchForSameContents |
|
504 |
tabable: true |
|
505 |
model: rememberInCache |
|
506 |
translateLabel: true |
|
507 |
) |
|
508 |
(ActionButtonSpec |
|
509 |
label: 'Clear Cache' |
|
510 |
name: 'ClearCacheButton' |
|
511 |
layout: (LayoutFrame -169 1 125 0 -44 1 147 0) |
|
512 |
translateLabel: true |
|
513 |
model: clearCache |
|
514 |
) |
|
515 |
(CheckBoxSpec |
|
516 |
label: 'Show Unreadable Files and Folders' |
|
517 |
name: 'CheckBox2' |
|
518 |
layout: (LayoutFrame -309 1 149 0 0 1 172 0) |
|
519 |
tabable: true |
|
520 |
model: showUnreadableFilesAndDirectoriesHolder |
|
521 |
translateLabel: true |
|
522 |
) |
|
523 |
) |
|
524 |
||
525 |
) |
|
3892 | 526 |
) |
13920 | 527 |
(SequenceViewSpec |
528 |
name: 'List1' |
|
529 |
layout: (LayoutFrame 0 0.0 238 0 0 1.0 0 1) |
|
530 |
model: selectionHolder |
|
531 |
menu: menu |
|
532 |
hasHorizontalScrollBar: true |
|
533 |
hasVerticalScrollBar: true |
|
534 |
isMultiSelect: true |
|
535 |
doubleClickSelector: fileDoubleClick: |
|
536 |
valueChangeSelector: fileSelected: |
|
537 |
useIndex: true |
|
538 |
sequenceList: shownListHolder |
|
539 |
properties: |
|
540 |
(PropertyListDictionary |
|
541 |
displayObjectSelector: getDisplayObjects: |
|
542 |
startDragSelector: doStartDrag:in: |
|
543 |
dropObjectSelector: getDropObjects: |
|
544 |
dragArgument: findFileList |
|
545 |
) |
|
546 |
) |
|
547 |
) |
|
548 |
||
549 |
) |
|
550 |
) |
|
3892 | 551 |
! ! |
552 |
||
553 |
!FindFileApplication class methodsFor:'menu specs'! |
|
554 |
||
555 |
menu |
|
556 |
"This resource specification was automatically generated |
|
557 |
by the MenuEditor of ST/X." |
|
558 |
||
559 |
"Do not manually edit this!! If it is corrupted, |
|
560 |
the MenuEditor may not be able to read the specification." |
|
561 |
||
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
562 |
|
3892 | 563 |
" |
564 |
MenuEditor new openOnClass:FindFileApplication andSelector:#menu |
|
565 |
(Menu new fromLiteralArrayEncoding:(FindFileApplication menu)) startUp |
|
566 |
" |
|
567 |
||
568 |
<resource: #menu> |
|
569 |
||
570 |
^ |
|
5766 | 571 |
#(Menu |
572 |
( |
|
573 |
(MenuItem |
|
574 |
enabled: hasOneFileSelected |
|
7323 | 575 |
label: 'Open in New File Browser' |
576 |
itemValue: openInNewBrowser |
|
577 |
) |
|
578 |
(MenuItem |
|
579 |
enabled: hasOneFileSelected |
|
5766 | 580 |
label: 'Select in Browser' |
581 |
itemValue: selectInBrowser |
|
582 |
isVisible: isEmbeddedApplication |
|
3892 | 583 |
) |
5766 | 584 |
(MenuItem |
6158 | 585 |
label: 'Autoselect in Browser' |
586 |
indication: autoSelectInBrowserHolder |
|
587 |
) |
|
588 |
(MenuItem |
|
5766 | 589 |
label: '-' |
590 |
) |
|
591 |
(MenuItem |
|
8613 | 592 |
enabled: hasOneFileSelected |
593 |
label: 'FileIn' |
|
594 |
itemValue: fileInInBrowser |
|
595 |
) |
|
596 |
(MenuItem |
|
597 |
label: '-' |
|
598 |
) |
|
599 |
(MenuItem |
|
5766 | 600 |
enabled: hasSelectionInResultList |
601 |
label: 'Copy Selected Filenames to Clipboard' |
|
602 |
itemValue: copySelectedFileNamesToClipboard |
|
603 |
) |
|
604 |
(MenuItem |
|
605 |
label: '-' |
|
3892 | 606 |
) |
5766 | 607 |
(MenuItem |
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
608 |
enabled: hasSelection |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
609 |
label: 'Delete Selected File(s)...' |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
610 |
itemValue: deleteSelectedFiles |
12494 | 611 |
) |
612 |
(MenuItem |
|
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
613 |
enabled: hasListEntries |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
614 |
label: 'Delete all Files...' |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
615 |
itemValue: deleteAllFiles |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
616 |
isVisible: false |
5766 | 617 |
) |
618 |
(MenuItem |
|
619 |
label: '-' |
|
12778 | 620 |
isVisible: cvsMenusAreShown |
621 |
) |
|
622 |
(MenuItem |
|
623 |
enabled: hasSelection |
|
624 |
label: 'Commit Selected File(s) to CVS...' |
|
625 |
itemValue: commitSelectedFilesToCVS |
|
626 |
isVisible: cvsMenusAreShown |
|
627 |
) |
|
628 |
(MenuItem |
|
629 |
enabled: hasSelection |
|
630 |
label: 'Delete Selected File(s) and CVS Container(s)...' |
|
631 |
itemValue: deleteSelectedFilesAndCVSContainers |
|
632 |
isVisible: cvsMenusAreShown |
|
633 |
) |
|
634 |
(MenuItem |
|
635 |
label: '-' |
|
3892 | 636 |
) |
5766 | 637 |
(MenuItem |
638 |
enabled: hasSelection |
|
5767 | 639 |
label: 'Remove Selected from Resultlist' |
5766 | 640 |
itemValue: removeSelectedFilesFromResultList |
641 |
) |
|
642 |
(MenuItem |
|
643 |
enabled: hasListEntries |
|
7691 | 644 |
label: 'Clear Resultlist' |
5766 | 645 |
itemValue: clearResultList |
3892 | 646 |
) |
5859 | 647 |
(MenuItem |
648 |
label: '-' |
|
649 |
) |
|
650 |
(MenuItem |
|
7691 | 651 |
label: 'Show Matched Files (After SameContents-Search)' |
5859 | 652 |
itemValue: showMatchedFiles: |
653 |
isVisible: notShowingMatchedFiles |
|
654 |
argument: true |
|
655 |
) |
|
656 |
(MenuItem |
|
7691 | 657 |
label: 'Show Matching Files (After SameContents-Search)' |
5859 | 658 |
itemValue: showMatchedFiles: |
659 |
isVisible: showingMatchedFiles |
|
660 |
argument: false |
|
661 |
) |
|
15214 | 662 |
(MenuItem |
663 |
enabled: hasTwoFilesSelected |
|
664 |
label: 'Compare with Each Other' |
|
665 |
itemValue: doCompareTwoFiles |
|
666 |
argument: false |
|
667 |
) |
|
3892 | 668 |
) |
669 |
nil |
|
670 |
nil |
|
671 |
) |
|
672 |
! |
|
673 |
||
674 |
searchMenu |
|
675 |
"This resource specification was automatically generated |
|
676 |
by the MenuEditor of ST/X." |
|
677 |
||
678 |
"Do not manually edit this!! If it is corrupted, |
|
679 |
the MenuEditor may not be able to read the specification." |
|
680 |
||
11101 | 681 |
|
3892 | 682 |
" |
683 |
MenuEditor new openOnClass:FindFileApplication andSelector:#searchMenu |
|
684 |
(Menu new fromLiteralArrayEncoding:(FindFileApplication searchMenu)) startUp |
|
685 |
" |
|
686 |
||
687 |
<resource: #menu> |
|
688 |
||
689 |
^ |
|
7574 | 690 |
#(Menu |
691 |
( |
|
692 |
(MenuItem |
|
693 |
label: 'Search' |
|
694 |
itemValue: doSearch |
|
695 |
translateLabel: true |
|
696 |
isButton: true |
|
697 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
3892 | 698 |
) |
7574 | 699 |
(MenuItem |
700 |
enabled: enableStop |
|
701 |
label: 'Stop' |
|
702 |
itemValue: stop |
|
703 |
translateLabel: true |
|
704 |
isButton: true |
|
705 |
isVisible: enableStop |
|
706 |
labelImage: (ResourceRetriever XPToolbarIconLibrary stop22x22Icon) |
|
3892 | 707 |
) |
7574 | 708 |
(MenuItem |
709 |
label: 'Close' |
|
710 |
itemValue: doClose |
|
711 |
translateLabel: true |
|
712 |
isButton: true |
|
713 |
startGroup: right |
|
11101 | 714 |
isVisible: false |
7574 | 715 |
labelImage: (ResourceRetriever ToolbarIconLibrary removeTabIcon) |
3892 | 716 |
) |
717 |
) |
|
718 |
nil |
|
719 |
nil |
|
720 |
) |
|
721 |
! ! |
|
722 |
||
6107 | 723 |
!FindFileApplication class methodsFor:'startup & release'! |
724 |
||
725 |
releaseContentsInfoCache |
|
726 |
ContentsInfoCache := ContentsInfoCacheAccessLock := nil. |
|
727 |
! ! |
|
728 |
||
3892 | 729 |
!FindFileApplication class methodsFor:'tableColumns specs'! |
730 |
||
731 |
searchResultTable |
|
732 |
"This resource specification was automatically generated |
|
733 |
by the DataSetBuilder of ST/X." |
|
734 |
||
735 |
"Do not manually edit this!! If it is corrupted, |
|
736 |
the DataSetBuilder may not be able to read the specification." |
|
737 |
||
738 |
" |
|
739 |
DataSetBuilder new openOnClass:FindFileApplication andSelector:#searchResultTable |
|
740 |
" |
|
741 |
||
742 |
<resource: #tableColumns> |
|
743 |
||
744 |
^#( |
|
6583 | 745 |
(DataSetColumnSpec |
746 |
label: 'Filename' |
|
747 |
id: 'FileName' |
|
748 |
labelButtonType: Button |
|
749 |
model: fileName |
|
750 |
showRowSeparator: false |
|
751 |
showColSeparator: false |
|
3892 | 752 |
) |
753 |
) |
|
754 |
||
755 |
! ! |
|
756 |
||
757 |
!FindFileApplication methodsFor:'actions'! |
|
758 |
||
5850 | 759 |
clearCache |
6107 | 760 |
contentsInfoCache := nil |
5850 | 761 |
! |
762 |
||
5766 | 763 |
clearResultList |
764 |
self resultList removeAll. |
|
5859 | 765 |
self matchedFilesList removeAll. |
766 |
! |
|
767 |
||
5766 | 768 |
deleteAllFiles |
769 |
|files| |
|
770 |
||
5864 | 771 |
files := self shownList copy. |
5766 | 772 |
self deleteFiles:files confirm:true. |
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
773 |
self removeFilesFromResultList:files |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
774 |
|
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
775 |
"Modified: / 29-03-2012 / 10:06:09 / cg" |
5766 | 776 |
! |
777 |
||
778 |
deleteFiles:colOfFiles confirm:confirm |
|
779 |
"delete current selected files/directories |
|
780 |
" |
|
781 |
|delete result| |
|
782 |
||
6832
c69c570a3ec7
wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents:
6822
diff
changeset
|
783 |
"/ self windowGroup withWaitCursorDo:[ |
5961 | 784 |
delete := FileOperation deleteFiles:(colOfFiles asSet) confirm:confirm. |
5766 | 785 |
result := delete result. |
786 |
result notNil ifTrue:[ |
|
787 |
result ifFalse:[ |
|
788 |
self notify:delete errorString. |
|
789 |
] ifTrue:[ |
|
5769 | 790 |
"/ masterApplication notNil ifTrue:[ |
791 |
"/ masterApplication updateListAfterDelete:colOfFiles. |
|
792 |
"/ ] |
|
5766 | 793 |
] |
794 |
]. |
|
6832
c69c570a3ec7
wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents:
6822
diff
changeset
|
795 |
"/ ]. |
5766 | 796 |
^ result. |
6832
c69c570a3ec7
wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents:
6822
diff
changeset
|
797 |
|
c69c570a3ec7
wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents:
6822
diff
changeset
|
798 |
"Modified: / 25-07-2006 / 09:11:09 / cg" |
5766 | 799 |
! |
800 |
||
801 |
deleteSelectedFiles |
|
5856 | 802 |
|sel files result| |
5766 | 803 |
|
804 |
sel := self selectionHolder value. |
|
6109 | 805 |
sel isEmptyOrNil ifTrue:[^ self]. |
806 |
||
5864 | 807 |
files := sel collect:[:idx | self shownList at:idx]. |
5766 | 808 |
self deleteFiles:files confirm:true. |
5856 | 809 |
result == true ifTrue:[ |
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
810 |
self removeFilesFromResultList:files |
5856 | 811 |
]. |
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
812 |
|
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
813 |
"Modified: / 29-03-2012 / 10:05:39 / cg" |
5766 | 814 |
! |
815 |
||
15214 | 816 |
doCompareTwoFiles |
817 |
|sel entry1 entry2| |
|
818 |
||
819 |
sel := self selectionHolder value. |
|
820 |
sel size == 2 ifFalse:[^ self]. |
|
821 |
||
822 |
entry1 := self shownList at:sel first. |
|
823 |
(entry1 := entry1 asFilename) exists ifFalse:[ |
|
824 |
self warn:'Oops - file is gone: ',entry1 pathName |
|
825 |
]. |
|
826 |
entry2 := self shownList at:sel second. |
|
827 |
(entry2 := entry2 asFilename) exists ifFalse:[ |
|
828 |
self warn:'Oops - file is gone: ',entry2 pathName |
|
829 |
]. |
|
830 |
masterApplication openDiffViewOn:entry1 and:entry2 |
|
831 |
! |
|
832 |
||
3892 | 833 |
doSearch |
16574 | 834 |
|namePatterns excludedNamePatterns contentsPattern notContentsPattern |
835 |
dir dirs fn fileToCompareAgainst ignoreCaseInName ignoreCaseInExcludedName |
|
11423 | 836 |
ignoreCaseInContents ignoreCaseInNotContents| |
3892 | 837 |
|
838 |
"/ self changeExtentToSeeSearchResult. |
|
839 |
||
840 |
dir := self searchDirectoryHolder value. |
|
841 |
dir isNil ifTrue:[ |
|
16574 | 842 |
Dialog warn:(resources string:'Missing directory name'). |
3892 | 843 |
^ self. |
844 |
]. |
|
16608 | 845 |
dir asString includesMatchCharacters ifTrue:[ |
16574 | 846 |
dirs := Filename filesMatchingGLOB:dir. |
847 |
dirs isEmpty ifTrue:[ |
|
848 |
Dialog warn:(resources string:'No matching directory: ''%1''' with:dir allBold). |
|
849 |
^ self. |
|
850 |
]. |
|
851 |
] ifFalse:[ |
|
852 |
dir asFilename exists ifFalse:[ |
|
853 |
Dialog warn:(resources string:'No such directory: ''%1''' with:dir allBold). |
|
854 |
^ self. |
|
855 |
]. |
|
856 |
dirs := { dir } |
|
3892 | 857 |
]. |
6442 | 858 |
|
13920 | 859 |
LastShowUnreadableFilesAndDirectories := showUnreadableFilesAndDirectoriesHolder value. |
10441 | 860 |
LastSearchIgnoredCaseInFilename := ignoreCaseInName := self ignoreCaseInName value. |
861 |
LastSearchIgnoredCaseInExcludedFilename := ignoreCaseInExcludedName := self ignoreCaseInExcludedName value. |
|
862 |
LastSearchIgnoredCaseInContents := ignoreCaseInContents := self ignoreCaseInContents value. |
|
11423 | 863 |
ignoreCaseInNotContents := self ignoreCaseInNotContents value. |
6442 | 864 |
|
11101 | 865 |
self stopSearchTaskOrAbort. |
3892 | 866 |
|
10441 | 867 |
namePatterns := self namePatternsFor:(self namePatternHolder value) ignoringCase:ignoreCaseInName. |
868 |
excludedNamePatterns := self namePatternsFor:(self excludedNamePatternHolder value) ignoringCase:ignoreCaseInExcludedName. |
|
869 |
||
3892 | 870 |
contentsPattern := self contentsPatternHolder value. |
871 |
contentsPattern size == 0 ifTrue:[ |
|
872 |
contentsPattern := nil |
|
873 |
] ifFalse:[ |
|
8330 | 874 |
self class addToSearchStringHistory:contentsPattern. |
10441 | 875 |
ignoreCaseInContents ifTrue:[ |
3892 | 876 |
contentsPattern := contentsPattern asLowercase |
8330 | 877 |
]. |
3892 | 878 |
]. |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
879 |
notContentsPattern := self notContentsPatternHolder value. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
880 |
notContentsPattern size == 0 ifTrue:[ |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
881 |
notContentsPattern := nil |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
882 |
] ifFalse:[ |
11423 | 883 |
ignoreCaseInNotContents ifTrue:[ |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
884 |
notContentsPattern := notContentsPattern asLowercase |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
885 |
] |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
886 |
]. |
5787 | 887 |
searchForSameContents value ifTrue:[ |
888 |
fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators. |
|
889 |
fileToCompareAgainst isEmpty ifTrue:[ |
|
890 |
fileToCompareAgainst := nil. |
|
891 |
] ifFalse:[ |
|
892 |
fileToCompareAgainst includesMatchCharacters ifFalse:[ |
|
16574 | 893 |
(fn := fileToCompareAgainst asFilename) exists ifFalse:[ |
894 |
Dialog warn:('No such file: %1' bindWith:fileToCompareAgainst allBold). |
|
5787 | 895 |
^ self. |
896 |
]. |
|
16574 | 897 |
fn isReadable ifFalse:[ |
898 |
Dialog warn:('Cannot read: %1' bindWith:fileToCompareAgainst allBold). |
|
5787 | 899 |
^ self. |
900 |
] |
|
5768 | 901 |
]. |
5726 | 902 |
]. |
5723 | 903 |
]. |
904 |
||
11101 | 905 |
self |
906 |
startSearchTask:[ |
|
907 |
self changeInformationTo:'Find File ' , '- searching ' toTab:true. |
|
908 |
self |
|
909 |
doFindFileNamed:namePatterns |
|
910 |
directories:(self searchDirectories value) |
|
911 |
ignoreCaseInName:ignoreCaseInName |
|
912 |
excludeFilesNamed:excludedNamePatterns |
|
913 |
ignoreCaseInExcludedName:ignoreCaseInExcludedName |
|
914 |
containingString:contentsPattern |
|
915 |
ignoreCaseInContents:ignoreCaseInContents |
|
916 |
notContainingString:notContentsPattern |
|
11423 | 917 |
ignoreCaseInNotContents:ignoreCaseInNotContents |
11101 | 918 |
sameContentsAsFile:fileToCompareAgainst |
919 |
sameContentsAs:nil |
|
16574 | 920 |
in:dirs. |
5770 | 921 |
|
11101 | 922 |
] |
16574 | 923 |
name:('FindFile[', dir asFilename baseName, ']') |
5770 | 924 |
|
11423 | 925 |
"Modified: / 16-03-2012 / 09:37:13 / cg" |
3892 | 926 |
! |
927 |
||
7323 | 928 |
fileInInBrowser |
929 |
|sel entry application| |
|
930 |
||
931 |
sel := self selectionHolder value. |
|
932 |
(sel notEmptyOrNil) ifTrue:[ |
|
933 |
entry := self shownList at:sel first. |
|
934 |
entry asFilename exists ifFalse:[ ^ self]. |
|
15214 | 935 |
|
7323 | 936 |
application := targetApplication ? self masterApplication. |
937 |
application notNil ifTrue:[ |
|
938 |
application fileIn:(entry asFilename). |
|
939 |
]. |
|
940 |
]. |
|
941 |
||
942 |
"Created: / 20-09-2006 / 14:30:37 / cg" |
|
943 |
! |
|
944 |
||
10441 | 945 |
namePatternsFor:namePatternArg ignoringCase:ignoringCase |
946 |
|namePattern| |
|
947 |
||
948 |
namePattern := namePatternArg. |
|
949 |
namePattern size == 0 ifTrue:[ |
|
950 |
^ nil |
|
951 |
]. |
|
952 |
ignoringCase ifTrue:[ |
|
953 |
namePattern := namePattern asLowercase |
|
954 |
]. |
|
955 |
^ (namePattern asCollectionOfSubstringsSeparatedBy:$;) |
|
956 |
collect:[:each | each withoutSeparators]. |
|
957 |
||
958 |
"Created: / 03-08-2011 / 18:19:20 / cg" |
|
959 |
! |
|
960 |
||
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
961 |
removeFilesFromResultList:listOfFiles |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
962 |
|list| |
3892 | 963 |
|
5864 | 964 |
list := self shownList. |
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
965 |
(listOfFiles notEmptyOrNil) ifTrue:[ |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
966 |
listOfFiles reverseDo:[: key | |
3892 | 967 |
list removeAtIndex:key |
968 |
] |
|
969 |
]. |
|
11474
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
970 |
|
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
971 |
"Created: / 29-03-2012 / 10:04:58 / cg" |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
972 |
! |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
973 |
|
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
974 |
removeSelectedFilesFromResultList |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
975 |
self removeFilesFromResultList:(self selectionHolder value) |
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
976 |
|
99b9dcfbcc4a
added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents:
11473
diff
changeset
|
977 |
"Modified: / 29-03-2012 / 10:05:11 / cg" |
3892 | 978 |
! |
979 |
||
5859 | 980 |
showMatchedFiles:aBoolean |
981 |
aBoolean ifTrue:[ |
|
5864 | 982 |
self shownListHolder valueHolder:(self matchedFilesList) |
5859 | 983 |
] ifFalse:[ |
5864 | 984 |
self shownListHolder valueHolder:(self resultList) |
5859 | 985 |
]. |
3892 | 986 |
! ! |
987 |
||
12778 | 988 |
!FindFileApplication methodsFor:'actions-CVS'! |
989 |
||
990 |
commitSelectedFilesToCVS |
|
991 |
|sel files| |
|
992 |
||
993 |
sel := self selectionHolder value. |
|
994 |
files := sel collect:[:idx | (self shownList at:idx) asFilename ]. |
|
995 |
masterApplication commitFilesToCVS:files |
|
996 |
! |
|
997 |
||
998 |
deleteSelectedFilesAndCVSContainers |
|
999 |
|sel files| |
|
1000 |
||
1001 |
sel := self selectionHolder value. |
|
1002 |
files := sel collect:[:idx | (self shownList at:idx) asFilename ]. |
|
1003 |
masterApplication removeFilesAndCVSContainers:files |
|
1004 |
! ! |
|
1005 |
||
3892 | 1006 |
!FindFileApplication methodsFor:'aspects'! |
1007 |
||
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1008 |
canUseGrep |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1009 |
"grep command is much faster, but: |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1010 |
- not under MSDOS |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1011 |
" |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1012 |
|
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1013 |
^ OperatingSystem isUNIXlike and:[ OperatingSystem canExecuteCommand:'egrep' ] |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1014 |
! |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1015 |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1016 |
canUseLocate |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1017 |
"locate command is much faster, but: |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1018 |
- only if searching recursively, |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1019 |
- no case ignore |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1020 |
- no contents matching |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1021 |
" |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1022 |
|
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1023 |
^ OperatingSystem isUNIXlike and:[ OperatingSystem canExecuteCommand:'locate' ] |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1024 |
! |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1025 |
|
3892 | 1026 |
contentsPatternHolder |
1027 |
||
1028 |
contentsPatternHolder isNil ifTrue:[ |
|
1029 |
contentsPatternHolder := nil asValue. |
|
8330 | 1030 |
self class searchStringHistory size > 0 ifTrue:[ |
1031 |
contentsPatternHolder value:(self class searchStringHistory first). |
|
1032 |
]. |
|
3892 | 1033 |
]. |
1034 |
^ contentsPatternHolder. |
|
1035 |
! |
|
1036 |
||
6330 | 1037 |
enableFileSizeFilter |
1038 |
enableFileSizeFilter isNil ifTrue:[ |
|
1039 |
enableFileSizeFilter := false asValue. |
|
1040 |
]. |
|
1041 |
^ enableFileSizeFilter. |
|
1042 |
! |
|
1043 |
||
1044 |
enableFileSizeFilterAndNotSearchForSameContents |
|
1045 |
^ BlockValue forLogical:self notSearchForSameContents and:self enableFileSizeFilter |
|
1046 |
! |
|
1047 |
||
11473 | 1048 |
enableModificationTimeFilter |
1049 |
enableModificationTimeFilter isNil ifTrue:[ |
|
1050 |
enableModificationTimeFilter := false asValue. |
|
1051 |
]. |
|
1052 |
^ enableModificationTimeFilter. |
|
1053 |
||
1054 |
"Created: / 28-03-2012 / 23:11:58 / cg" |
|
1055 |
! |
|
1056 |
||
10441 | 1057 |
excludedNamePatternHolder |
1058 |
excludedNamePatternHolder isNil ifTrue:[ |
|
1059 |
excludedNamePatternHolder := '' asValue. |
|
1060 |
]. |
|
1061 |
^ excludedNamePatternHolder. |
|
1062 |
||
1063 |
"Created: / 03-08-2011 / 18:03:14 / cg" |
|
1064 |
! |
|
1065 |
||
6330 | 1066 |
fileSizeHolder |
1067 |
fileSizeHolder isNil ifTrue:[ |
|
1068 |
fileSizeHolder := 0 asValue. |
|
1069 |
]. |
|
1070 |
^ fileSizeHolder. |
|
1071 |
! |
|
1072 |
||
1073 |
fileSizeOperatorHolder |
|
1074 |
fileSizeOperatorHolder isNil ifTrue:[ |
|
1075 |
fileSizeOperatorHolder := '>' asValue. |
|
1076 |
]. |
|
1077 |
^ fileSizeOperatorHolder. |
|
1078 |
! |
|
1079 |
||
1080 |
fileSizeUnitHolder |
|
1081 |
fileSizeUnitHolder isNil ifTrue:[ |
|
1082 |
fileSizeUnitHolder := 'b' asValue. |
|
1083 |
]. |
|
1084 |
^ fileSizeUnitHolder. |
|
1085 |
! |
|
1086 |
||
3892 | 1087 |
ignoreCaseInContents |
1088 |
ignoreCaseInContents isNil ifTrue:[ |
|
10441 | 1089 |
ignoreCaseInContents := (LastSearchIgnoredCaseInContents notNil |
1090 |
ifTrue:[ LastSearchIgnoredCaseInContents ] |
|
1091 |
ifFalse:[ TextView lastSearchIgnoredCase ? true]) asValue. |
|
3892 | 1092 |
]. |
1093 |
^ ignoreCaseInContents. |
|
10441 | 1094 |
|
1095 |
"Modified: / 03-08-2011 / 18:05:02 / cg" |
|
1096 |
! |
|
1097 |
||
1098 |
ignoreCaseInExcludedName |
|
1099 |
||
1100 |
ignoreCaseInExcludedName isNil ifTrue:[ |
|
1101 |
ignoreCaseInExcludedName := (LastSearchIgnoredCaseInExcludedFilename notNil |
|
1102 |
ifTrue:[ LastSearchIgnoredCaseInExcludedFilename ] |
|
1103 |
ifFalse:[ OperatingSystem caseSensitiveFilenames not]) asValue. |
|
1104 |
]. |
|
1105 |
^ ignoreCaseInExcludedName. |
|
1106 |
||
1107 |
"Created: / 03-08-2011 / 18:03:38 / cg" |
|
3892 | 1108 |
! |
1109 |
||
1110 |
ignoreCaseInName |
|
1111 |
ignoreCaseInName isNil ifTrue:[ |
|
10441 | 1112 |
ignoreCaseInName := (LastSearchIgnoredCaseInFilename notNil |
1113 |
ifTrue:[LastSearchIgnoredCaseInFilename] |
|
1114 |
ifFalse:[ OperatingSystem caseSensitiveFilenames not ]) asValue. |
|
3892 | 1115 |
]. |
1116 |
^ ignoreCaseInName. |
|
10441 | 1117 |
|
1118 |
"Modified (format): / 03-08-2011 / 18:05:49 / cg" |
|
3892 | 1119 |
! |
1120 |
||
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1121 |
ignoreCaseInNotContents |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1122 |
ignoreCaseInNotContents isNil ifTrue:[ |
6442 | 1123 |
ignoreCaseInNotContents := (LastSearchIgnoredCaseInContents |
1124 |
? TextView lastSearchIgnoredCase |
|
1125 |
? true) asValue. |
|
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1126 |
]. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1127 |
^ ignoreCaseInNotContents. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1128 |
! |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1129 |
|
11473 | 1130 |
modificationTimeHolder |
1131 |
modificationTimeHolder isNil ifTrue:[ |
|
1132 |
modificationTimeHolder := (Timestamp now subtractDays:1) asValue. |
|
1133 |
]. |
|
1134 |
^ modificationTimeHolder. |
|
1135 |
||
1136 |
"Created: / 28-03-2012 / 23:08:25 / cg" |
|
1137 |
! |
|
1138 |
||
1139 |
modificationTimeOperatorHolder |
|
1140 |
modificationTimeOperatorHolder isNil ifTrue:[ |
|
1141 |
modificationTimeOperatorHolder := 'after' asValue. |
|
1142 |
]. |
|
1143 |
^ modificationTimeOperatorHolder. |
|
1144 |
||
1145 |
"Created: / 28-03-2012 / 23:04:44 / cg" |
|
1146 |
! |
|
1147 |
||
3892 | 1148 |
namePatternHolder |
1149 |
||
1150 |
namePatternHolder isNil ifTrue:[ |
|
1151 |
namePatternHolder := '*' asValue. |
|
1152 |
]. |
|
1153 |
^ namePatternHolder. |
|
1154 |
! |
|
1155 |
||
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1156 |
notContentsPatternHolder |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1157 |
notContentsPatternHolder isNil ifTrue:[ |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1158 |
notContentsPatternHolder := nil asValue. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1159 |
]. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1160 |
^ notContentsPatternHolder. |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1161 |
! |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1162 |
|
3892 | 1163 |
notSearchForSameContents |
5743 | 1164 |
^ BlockValue forLogicalNot:self searchForSameContents |
3892 | 1165 |
! |
1166 |
||
5859 | 1167 |
notShowingMatchedFiles |
5865 | 1168 |
^ self shownList == self resultList |
5859 | 1169 |
! |
1170 |
||
5723 | 1171 |
rememberInCache |
1172 |
rememberInCache isNil ifTrue:[ |
|
5859 | 1173 |
rememberInCache := (LastRememberInCache ? false) asValue. |
5723 | 1174 |
]. |
1175 |
^ rememberInCache. |
|
1176 |
! |
|
1177 |
||
1178 |
sameContentsAsHolder |
|
1179 |
|sel| |
|
1180 |
||
1181 |
sameContentsAsHolder isNil ifTrue:[ |
|
1182 |
sameContentsAsHolder := ValueHolder new. |
|
1183 |
masterApplication notNil ifTrue:[ |
|
1184 |
sel := masterApplication currentSelectedFiles. |
|
1185 |
sel size > 0 ifTrue:[ |
|
1186 |
sameContentsAsHolder value:(sel first asFilename pathName). |
|
1187 |
]. |
|
1188 |
]. |
|
1189 |
]. |
|
1190 |
^ sameContentsAsHolder. |
|
1191 |
! |
|
1192 |
||
4518
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1193 |
searchDirectories |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1194 |
searchDirectories isNil ifTrue:[ |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1195 |
searchDirectories := false asValue. |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1196 |
]. |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1197 |
^ searchDirectories. |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1198 |
! |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1199 |
|
3892 | 1200 |
searchDirectoryHolder |
1201 |
||
1202 |
searchDirectoryHolder isNil ifTrue:[ |
|
1203 |
searchDirectoryHolder := ValueHolder new. |
|
1204 |
]. |
|
1205 |
^ searchDirectoryHolder. |
|
1206 |
! |
|
1207 |
||
5743 | 1208 |
searchForSameContents |
1209 |
searchForSameContents isNil ifTrue:[ |
|
1210 |
searchForSameContents := false asValue. |
|
1211 |
]. |
|
1212 |
^ searchForSameContents. |
|
1213 |
! |
|
1214 |
||
5726 | 1215 |
searchOnlyInCache |
1216 |
searchOnlyInCache isNil ifTrue:[ |
|
1217 |
searchOnlyInCache := false asValue. |
|
1218 |
]. |
|
1219 |
^ searchOnlyInCache. |
|
1220 |
! |
|
1221 |
||
13920 | 1222 |
showUnreadableFilesAndDirectoriesHolder |
1223 |
showUnreadableFilesAndDirectoriesHolder isNil ifTrue:[ |
|
1224 |
showUnreadableFilesAndDirectoriesHolder := (LastShowUnreadableFilesAndDirectories ? false) asValue. |
|
1225 |
]. |
|
1226 |
^ showUnreadableFilesAndDirectoriesHolder. |
|
1227 |
! |
|
1228 |
||
5859 | 1229 |
showingMatchedFiles |
5865 | 1230 |
^ self shownList == self matchedFilesList |
5859 | 1231 |
! |
1232 |
||
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1233 |
useGrep |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1234 |
useGrep isNil ifTrue:[ |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1235 |
useGrep := false asValue. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1236 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1237 |
^ useGrep. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1238 |
! |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1239 |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1240 |
useLocate |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1241 |
useLocate isNil ifTrue:[ |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1242 |
useLocate := false asValue. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1243 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1244 |
^ useLocate. |
3892 | 1245 |
! ! |
1246 |
||
1247 |
!FindFileApplication methodsFor:'private'! |
|
1248 |
||
1249 |
changeExtentToSeeSearchResult |
|
1250 |
||
1251 |
| extent window| |
|
1252 |
||
1253 |
expanded isNil ifTrue:[ |
|
1254 |
window := self builder window. |
|
9536
ea60487ceeee
changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents:
9475
diff
changeset
|
1255 |
window notNil ifTrue:[ |
3892 | 1256 |
window := window topView. |
1257 |
extent := window extent. |
|
1258 |
window extent:((extent x) @ (extent y + 300)). |
|
1259 |
expanded := true. |
|
1260 |
window containerChangedSize. |
|
1261 |
]. |
|
1262 |
]. |
|
9536
ea60487ceeee
changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents:
9475
diff
changeset
|
1263 |
|
ea60487ceeee
changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents:
9475
diff
changeset
|
1264 |
"Modified: / 08-08-2010 / 14:42:40 / cg" |
3892 | 1265 |
! ! |
1266 |
||
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1267 |
!FindFileApplication methodsFor:'private - searching'! |
3892 | 1268 |
|
5856 | 1269 |
cachedFileSizeOf:aFilenameString |
1270 |
|cache cacheLine fileSize| |
|
1271 |
||
1272 |
cache := self contentsInfoCache. |
|
1273 |
cache isNil ifTrue:[ |
|
5859 | 1274 |
fileSize := aFilenameString asFilename fileSize |
5856 | 1275 |
] ifFalse:[ |
5859 | 1276 |
ContentsInfoCacheAccessLock critical:[ |
1277 |
cacheLine := cache at:aFilenameString ifAbsent:nil. |
|
1278 |
cacheLine isNil ifTrue:[ |
|
1279 |
cache at:aFilenameString put:(cacheLine := Array new:2). |
|
1280 |
] ifFalse:[ |
|
1281 |
fileSize := (cacheLine at:1). |
|
1282 |
]. |
|
5856 | 1283 |
|
5859 | 1284 |
fileSize isNil ifTrue:[ |
1285 |
fileSize := aFilenameString asFilename fileSize. |
|
1286 |
cacheLine at:1 put:fileSize. |
|
1287 |
]. |
|
1288 |
]. |
|
5856 | 1289 |
]. |
1290 |
^ fileSize |
|
1291 |
! |
|
1292 |
||
1293 |
cachedHashValueOfFile:aFilenameString |
|
1294 |
|cache cacheLine hashValue| |
|
1295 |
||
1296 |
cache := self contentsInfoCache. |
|
1297 |
cache isNil ifTrue:[ |
|
5859 | 1298 |
hashValue := MD5Stream hashValueOfFile:aFilenameString asFilename |
5856 | 1299 |
] ifFalse:[ |
5859 | 1300 |
ContentsInfoCacheAccessLock critical:[ |
1301 |
cacheLine := cache at:aFilenameString ifAbsent:nil. |
|
1302 |
cacheLine isNil ifTrue:[ |
|
1303 |
cache at:aFilenameString put:(Array new:2). |
|
1304 |
] ifFalse:[ |
|
1305 |
hashValue := (cacheLine at:2). |
|
1306 |
]. |
|
5856 | 1307 |
|
5859 | 1308 |
hashValue isNil ifTrue:[ |
1309 |
hashValue := MD5Stream hashValueOfFile:aFilenameString asFilename. |
|
1310 |
cacheLine at:2 put:hashValue. |
|
1311 |
]. |
|
1312 |
]. |
|
5856 | 1313 |
]. |
1314 |
^ hashValue |
|
1315 |
! |
|
1316 |
||
1317 |
contentsInfoCache |
|
6107 | 1318 |
contentsInfoCache isNil ifTrue:[ |
1319 |
ContentsInfoCache isNil ifTrue:[ |
|
1320 |
ContentsInfoCache := Dictionary new. |
|
1321 |
ContentsInfoCacheAccessLock := Semaphore forMutualExclusion. |
|
1322 |
]. |
|
1323 |
contentsInfoCache := ContentsInfoCache |
|
5856 | 1324 |
]. |
6107 | 1325 |
^ contentsInfoCache |
5856 | 1326 |
! |
1327 |
||
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1328 |
doFindFileNamed:namePatterns directories:searchDirectories ignoreCase:ignCaseInName |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1329 |
containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1330 |
notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents |
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1331 |
sameContentsAsFile:filenameToCompareContentsOrNil sameContentsAs:bytesToCompareContentsOrNil in:aDirectory |
3892 | 1332 |
|
10441 | 1333 |
"/ only for backward compatibility... |
1334 |
^ self |
|
1335 |
doFindFileNamed:namePatterns directories:searchDirectories ignoreCaseInName:ignCaseInName |
|
1336 |
excludeFilesNamed:'' ignoreCaseInExcludedName:false |
|
1337 |
containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents |
|
1338 |
notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents |
|
1339 |
sameContentsAsFile:filenameToCompareContentsOrNil sameContentsAs:bytesToCompareContentsOrNil in:aDirectory |
|
1340 |
||
1341 |
"Modified: / 03-08-2011 / 18:16:42 / cg" |
|
1342 |
! |
|
1343 |
||
1344 |
doFindFileNamed:namePatterns directories:searchDirectories ignoreCaseInName:ignCaseInName |
|
1345 |
excludeFilesNamed:excludedNamePatterns ignoreCaseInExcludedName:ignoreCaseInExcludedName |
|
1346 |
containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents |
|
1347 |
notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents |
|
16574 | 1348 |
sameContentsAsFile:filenameToCompareContentsOrNil |
1349 |
sameContentsAs:bytesToCompareContentsOrNil |
|
1350 |
in:aDirectoryOrCollectionOfDirectories |
|
10441 | 1351 |
|
15217 | 1352 |
"the main workhorse for searching files. |
1353 |
Creates optimized search blocks, depending on how we search, |
|
1354 |
and passes these to the recursive directory walker. |
|
1355 |
(got too big, and may need some splitting/refactoring" |
|
1356 |
||
16574 | 1357 |
|theSingleDirectory lines contentsToCompare resultList inStream |
5601 | 1358 |
doesFileMatch contentsString notContentsString check checkNot |
11473 | 1359 |
grepCommand nameMatch nameExcludedMatch realNameMatch |
1360 |
fileSizesToSearchFor filesToSearchFor fileMD5sToSearchFor |
|
12339 | 1361 |
setOfFilesToSearchFor remember cache fn dirSearchedRelative easyCheck| |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1362 |
|
16574 | 1363 |
(aDirectoryOrCollectionOfDirectories isFilename |
1364 |
or:[aDirectoryOrCollectionOfDirectories isString]) ifTrue:[ |
|
1365 |
theSingleDirectory := aDirectoryOrCollectionOfDirectories asFilename |
|
1366 |
] ifFalse:[ |
|
1367 |
(aDirectoryOrCollectionOfDirectories size == 1) ifTrue:[ |
|
1368 |
theSingleDirectory := aDirectoryOrCollectionOfDirectories first asFilename |
|
1369 |
]. |
|
1370 |
]. |
|
1371 |
||
1372 |
"/ dir := aDirectory asFilename. |
|
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1373 |
contentsString := contentsStringArg. |
12385 | 1374 |
(contentsString notEmptyOrNil and:[ ignCaseInContents ]) ifTrue:[ |
11097 | 1375 |
contentsString := contentsString asLowercase |
6183
e6d9cfbfb358
care for empty search-arguments
Michael Beyl <mb@exept.de>
parents:
6158
diff
changeset
|
1376 |
]. |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1377 |
notContentsString := notContentsStringArg. |
12385 | 1378 |
(notContentsString notEmptyOrNil and:[ ignCaseInNotContents ]) ifTrue:[ |
11097 | 1379 |
notContentsString := notContentsString asLowercase |
6183
e6d9cfbfb358
care for empty search-arguments
Michael Beyl <mb@exept.de>
parents:
6158
diff
changeset
|
1380 |
]. |
12385 | 1381 |
filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[ |
5768 | 1382 |
fileSizesToSearchFor := OrderedCollection new. |
1383 |
filesToSearchFor := OrderedCollection new. |
|
1384 |
fileMD5sToSearchFor := OrderedCollection new. |
|
1385 |
||
1386 |
filenameToCompareContentsOrNil includesMatchCharacters ifTrue:[ |
|
16574 | 1387 |
|dir| |
1388 |
||
5768 | 1389 |
dir := filenameToCompareContentsOrNil asFilename. |
1390 |
[dir pathName includesMatchCharacters] whileTrue:[ |
|
1391 |
dir := dir directory |
|
1392 |
]. |
|
1393 |
dir recursiveDirectoryContentsDo:[:relName | |
|
1394 |
|path fn| |
|
1395 |
||
1396 |
fn := dir construct:relName. |
|
5770 | 1397 |
(filenameToCompareContentsOrNil match:fn name) ifTrue:[ |
5847 | 1398 |
fn isDirectory ifFalse:[ |
5856 | 1399 |
fileSizesToSearchFor add:(self cachedFileSizeOf:fn). |
5847 | 1400 |
filesToSearchFor add:(fn name). |
5856 | 1401 |
fileMD5sToSearchFor add:(self cachedHashValueOfFile:fn). |
5847 | 1402 |
] |
5768 | 1403 |
] |
1404 |
]. |
|
1405 |
] ifFalse:[ |
|
1406 |
fn := filenameToCompareContentsOrNil asFilename. |
|
5856 | 1407 |
fileSizesToSearchFor add:(self cachedFileSizeOf:fn). |
5768 | 1408 |
filesToSearchFor add:(fn pathName). |
5856 | 1409 |
fileMD5sToSearchFor add:(self cachedHashValueOfFile:fn). |
5768 | 1410 |
]. |
1411 |
||
5859 | 1412 |
remember := LastRememberInCache := self rememberInCache value. |
5723 | 1413 |
remember ifTrue:[ |
5856 | 1414 |
cache := self contentsInfoCache. |
5723 | 1415 |
]. |
5866 | 1416 |
setOfFilesToSearchFor := filesToSearchFor asSet. |
1417 |
]. |
|
16574 | 1418 |
|
10441 | 1419 |
"/ dirSearchedRelative := (dir name) copyFrom:(self searchDirectoryHolder value asString size + 1). |
1420 |
"/ dirSearchedRelative notEmpty ifTrue:[ |
|
1421 |
"/ self changeInformationTo:('Find File - searching %1' bindWith:dirSearchedRelative) toTab:false. |
|
1422 |
"/ ] ifFalse:[ |
|
1423 |
self changeInformationTo:'Find File - searching' toTab:false. |
|
1424 |
"/ ]. |
|
3892 | 1425 |
|
5859 | 1426 |
resultList := self resultList. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1427 |
|
12385 | 1428 |
filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[ |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1429 |
doesFileMatch := |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1430 |
[:f | |
5859 | 1431 |
|contentsMatches mustValidateExistance |
1432 |
fileMD5 fileName fileSize cacheLine idxInList matchedFile| |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1433 |
|
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1434 |
"/ contents compare ... |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1435 |
contentsMatches := false. |
5771 | 1436 |
fileName := f name. |
5859 | 1437 |
(setOfFilesToSearchFor includes:fileName) ifFalse:[ |
5850 | 1438 |
mustValidateExistance := false. |
5856 | 1439 |
|
5727 | 1440 |
cache notNil ifTrue:[ |
5859 | 1441 |
ContentsInfoCacheAccessLock critical:[ |
1442 |
cacheLine := cache at:fileName ifAbsent:nil. |
|
1443 |
cacheLine notNil ifTrue:[ |
|
1444 |
fileSize := cacheLine at:1. |
|
1445 |
fileMD5 := cacheLine at:2. |
|
1446 |
mustValidateExistance := true. |
|
1447 |
]. |
|
5727 | 1448 |
]. |
5723 | 1449 |
]. |
5850 | 1450 |
|
5723 | 1451 |
fileSize isNil ifTrue:[ |
1452 |
fileSize := f fileSize. |
|
1453 |
]. |
|
1454 |
remember ifTrue:[ |
|
5859 | 1455 |
ContentsInfoCacheAccessLock critical:[ |
1456 |
cacheLine := cache at:fileName ifAbsentPut:[Array new:2]. |
|
1457 |
cacheLine at:1 put:fileSize. |
|
1458 |
] |
|
5723 | 1459 |
]. |
5768 | 1460 |
(idxInList := fileSizesToSearchFor indexOf:fileSize) ~~ 0 ifTrue:[ |
5723 | 1461 |
fileMD5 isNil ifTrue:[ |
5850 | 1462 |
OpenError handle:[:ex | |
1463 |
ObjectMemory garbageCollect. |
|
1464 |
fileMD5 := MD5Stream hashValueOfFile:f. |
|
1465 |
] do:[ |
|
1466 |
fileMD5 := MD5Stream hashValueOfFile:f. |
|
1467 |
]. |
|
5723 | 1468 |
remember ifTrue:[ |
1469 |
cacheLine at:2 put:fileMD5 |
|
1470 |
]. |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1471 |
]. |
5768 | 1472 |
contentsMatches := (fileMD5 = (fileMD5sToSearchFor at:idxInList)). |
5850 | 1473 |
contentsMatches ifTrue:[ |
1474 |
mustValidateExistance ifTrue:[ |
|
1475 |
fileName asFilename exists ifFalse:[ |
|
5859 | 1476 |
ContentsInfoCacheAccessLock critical:[ |
1477 |
cache removeKey:fileName. |
|
1478 |
]. |
|
5850 | 1479 |
contentsMatches := false. |
1480 |
]. |
|
5859 | 1481 |
]. |
1482 |
contentsMatches ifTrue:[ |
|
1483 |
matchedFile := filesToSearchFor at:idxInList. |
|
11106
86ac37a9a382
changed: #doFindFileNamed:directories:ignoreCaseInName:excludeFilesNamed:ignoreCaseInExcludedName:containingString:ignoreCaseInContents:notContainingString:ignoreCaseInNotContents:sameContentsAsFile:sameContentsAs:in:
Claus Gittinger <cg@exept.de>
parents:
11103
diff
changeset
|
1484 |
self matchedFilesList add:matchedFile. |
5859 | 1485 |
]. |
5850 | 1486 |
]. |
5723 | 1487 |
"/ contentsToCompare isNil ifTrue:[ |
1488 |
"/ filenameToCompareContentsOrNil fileSize < (512*1024) ifTrue:[ |
|
1489 |
"/ contentsToCompare := filenameToCompareContentsOrNil binaryContentsOfEntireFile |
|
1490 |
"/ ] |
|
1491 |
"/ ]. |
|
1492 |
"/ contentsToCompare isNil ifTrue:[ |
|
1493 |
"/ "/ too large - compare block-wise ... |
|
1494 |
"/ contentsMatches := (filenameToCompareContentsOrNil sameContentsAs:f). |
|
1495 |
"/ ] ifFalse:[ |
|
1496 |
"/ contentsMatches := contentsToCompare = (f binaryContentsOfEntireFile). |
|
1497 |
"/ ] |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1498 |
]. |
5773 | 1499 |
] ifTrue:[ |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1500 |
f isSymbolicLink ifTrue:[ |
5859 | 1501 |
resultList add: (f name , ' is a symbolic link to ' , f pathName). |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1502 |
] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1503 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1504 |
contentsMatches |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1505 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1506 |
] ifFalse:[ |
12385 | 1507 |
(contentsString isEmptyOrNil and:[notContentsString isEmptyOrNil]) ifTrue:[ |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1508 |
doesFileMatch := [:f | true]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1509 |
] ifFalse:[ |
11097 | 1510 |
(self canUseGrep and:[self useGrep value]) ifTrue:[ |
5601 | 1511 |
(ignCaseInContents not and:[ignCaseInNotContents not]) ifTrue:[ |
12385 | 1512 |
contentsString notEmptyOrNil ifTrue:[ |
1513 |
notContentsString notEmptyOrNil ifTrue:[ |
|
5601 | 1514 |
grepCommand := '(grep "',contentsString,'" %1) && (grep -v "',notContentsString,'" %1)'. |
1515 |
] ifFalse:[ |
|
1516 |
grepCommand := 'grep "' , contentsString , '" %1'. |
|
1517 |
]. |
|
1518 |
] ifFalse:[ |
|
1519 |
grepCommand := 'grep -v "' , notContentsString , '" %1'. |
|
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1520 |
]. |
5601 | 1521 |
doesFileMatch := [:f | |cmd ret| |
1522 |
cmd := grepCommand bindWith:f pathName. |
|
1523 |
ret := OperatingSystem executeCommand:cmd. |
|
1524 |
ret |
|
1525 |
]. |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1526 |
] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1527 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1528 |
|
5601 | 1529 |
doesFileMatch isNil ifTrue:[ |
12385 | 1530 |
contentsString notEmptyOrNil ifTrue:[ |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1531 |
ignCaseInContents ifTrue:[ |
12339 | 1532 |
check := easyCheck := [:l | l includesString:contentsString caseSensitive:false] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1533 |
] ifFalse:[ |
12339 | 1534 |
check := easyCheck := [:l | l includesString:contentsString] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1535 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1536 |
]. |
12385 | 1537 |
notContentsString notEmptyOrNil ifTrue:[ |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1538 |
ignCaseInNotContents ifTrue:[ |
12385 | 1539 |
checkNot := [:l | (l includesString:notContentsString caseSensitive:false)] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1540 |
] ifFalse:[ |
12385 | 1541 |
checkNot := [:l | (l includesString:notContentsString)] |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1542 |
]. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1543 |
]. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1544 |
|
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1545 |
doesFileMatch := |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1546 |
[:f | |
16186 | 1547 |
|realFile contentsMatches contentsNotMatches sz hugeFile bigFile isBadFile| |
10441 | 1548 |
|
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1549 |
"/ string search ... |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1550 |
contentsMatches := true. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1551 |
(f exists and:[f isReadable]) ifFalse:[ |
13920 | 1552 |
showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
16511 | 1553 |
resultList add: (('*** "',f pathName,'" skipped - unreadable or bad symbolic link ***') withColor:(Color red darkened)). |
13920 | 1554 |
]. |
13773 | 1555 |
contentsMatches := false. |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1556 |
] ifTrue:[ |
16186 | 1557 |
isBadFile := false. |
1558 |
realFile := f. |
|
1559 |
f isSymbolicLink ifTrue:[ |
|
1560 |
realFile := f linkInfo linkTargetPath asFilename. |
|
1561 |
(realFile exists and:[realFile isReadable]) ifFalse:[ |
|
13920 | 1562 |
showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
16511 | 1563 |
resultList add: (('*** "',f pathName,'"->"',realFile pathName,'" skipped - unreadable or bad symbolic link destination ***') withColor:(Color red darkened)). |
13920 | 1564 |
]. |
13773 | 1565 |
contentsMatches := false. |
16186 | 1566 |
isBadFile := true. |
1567 |
]. |
|
1568 |
]. |
|
1569 |
isBadFile ifFalse:[ |
|
1570 |
realFile isDirectory ifTrue:[ |
|
1571 |
contentsMatches := false. |
|
1572 |
] ifFalse:[ |
|
1573 |
sz := realFile fileSize. |
|
1574 |
sz isNil ifTrue:[ |
|
1575 |
contentsMatches := false. |
|
1576 |
] ifFalse:[ |
|
1577 |
hugeFile := (sz ? 0) > (4024*1024). |
|
1578 |
bigFile := (sz ? 0) > (512*1024). |
|
15105 | 1579 |
|
16186 | 1580 |
hugeFile ifTrue:[ |
1581 |
showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
|
16511 | 1582 |
resultList add: (('*** ' , f pathName , ' skipped - too large ***') withColor:(Color red darkened)). |
16186 | 1583 |
]. |
1584 |
contentsMatches := false. |
|
1585 |
] ifFalse:[ |
|
15105 | 1586 |
Stream lineTooLongErrorSignal handle:[:ex | |
16186 | 1587 |
|cont| |
1588 |
||
1589 |
"/ "/ this typically happens, when a binary file is read linewise ... |
|
15105 | 1590 |
showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
16511 | 1591 |
resultList add: (('*** ' , f pathName , ' skipped - binary/long line ***') withColor:(Color red darkened)). |
15105 | 1592 |
]. |
1593 |
contentsMatches := false. |
|
1594 |
] do:[ |
|
16186 | 1595 |
bigFile ifTrue:[ |
1596 |
Stream lineTooLongErrorSignal handle:[:ex | |
|
1597 |
showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
|
16511 | 1598 |
resultList add: (('*** ' , f pathName , ' skipped - too large ***') withColor:(Color red darkened)). |
15105 | 1599 |
]. |
16186 | 1600 |
contentsMatches := false. |
1601 |
] do:[ |
|
1602 |
contentsMatches := false. |
|
1603 |
(check == easyCheck |
|
1604 |
and:[ realFile size < (128*1024) ]) ifTrue:[ |
|
1605 |
check notNil ifTrue:[ |
|
1606 |
contentsMatches := realFile contentsAsString includesString: contentsString caseSensitive:ignCaseInContents not. |
|
1607 |
(contentsMatches and:[ checkNot notNil ]) ifTrue:[ |
|
1608 |
contentsMatches := (realFile contentsAsString includesString: notContentsString caseSensitive:ignCaseInNotContents not) not. |
|
1609 |
]. |
|
1610 |
] ifFalse:[ |
|
1611 |
checkNot notNil ifTrue:[ |
|
1612 |
contentsMatches := (realFile contentsAsString includesString: notContentsString caseSensitive:ignCaseInNotContents not) not. |
|
1613 |
]. |
|
1614 |
]. |
|
1615 |
] ifFalse:[ |
|
1616 |
contentsNotMatches := false. |
|
1617 |
realFile readingFileDo:[:stream | |
|
1618 |
[contentsMatches or:[contentsNotMatches or:[stream atEnd]]] whileFalse:[ |
|
1619 |
|line| |
|
1620 |
||
1621 |
line := stream nextLine. |
|
1622 |
check notNil ifTrue:[ |
|
1623 |
contentsMatches := check value:line |
|
1624 |
]. |
|
1625 |
checkNot notNil ifTrue:[ |
|
1626 |
contentsNotMatches := checkNot value:line |
|
1627 |
]. |
|
1628 |
] |
|
1629 |
]. |
|
15105 | 1630 |
]. |
12385 | 1631 |
]. |
1632 |
] ifFalse:[ |
|
16186 | 1633 |
lines := realFile contents ? #(). |
1634 |
check notNil ifTrue:[ |
|
1635 |
contentsMatches := lines contains:check |
|
12385 | 1636 |
]. |
16186 | 1637 |
(contentsMatches and:[ checkNot notNil ]) ifTrue:[ |
1638 |
contentsMatches := (lines contains:checkNot) not |
|
1639 |
] |
|
1640 |
] |
|
15105 | 1641 |
]. |
16186 | 1642 |
]. |
15105 | 1643 |
]. |
5231
d74730347ed8
added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents:
5224
diff
changeset
|
1644 |
]. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1645 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1646 |
]. |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1647 |
contentsMatches |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1648 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1649 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1650 |
]. |
11097 | 1651 |
doesFileMatch := self fileSizeWrapperFor:doesFileMatch. |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1652 |
]. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1653 |
|
11473 | 1654 |
doesFileMatch := self modificationTimeWrapperFor:doesFileMatch. |
1655 |
||
10441 | 1656 |
namePatterns isNil ifTrue:[ |
1657 |
nameMatch := [:fn | true] |
|
1658 |
] ifFalse:[ |
|
1659 |
ignCaseInName ifTrue:[ |
|
1660 |
nameMatch := [:fn | namePatterns contains:[:aPattern | aPattern match:(fn asLowercase)]]. |
|
1661 |
] ifFalse:[ |
|
1662 |
nameMatch := [:fn | namePatterns contains:[:aPattern | aPattern match:fn]]. |
|
1663 |
]. |
|
1664 |
]. |
|
1665 |
||
1666 |
excludedNamePatterns isNil ifTrue:[ |
|
1667 |
nameExcludedMatch := [:fn | true] |
|
1668 |
] ifFalse:[ |
|
1669 |
ignoreCaseInExcludedName ifTrue:[ |
|
1670 |
nameExcludedMatch := [:fn | excludedNamePatterns contains:[:aPattern | aPattern match:(fn asLowercase)]]. |
|
1671 |
] ifFalse:[ |
|
1672 |
nameExcludedMatch := [:fn | excludedNamePatterns contains:[:aPattern | aPattern match:fn]]. |
|
1673 |
]. |
|
1674 |
]. |
|
1675 |
||
1676 |
"/ combine |
|
1677 |
namePatterns isNil ifTrue:[ |
|
1678 |
excludedNamePatterns isNil ifTrue:[ |
|
1679 |
realNameMatch := [:fn | true] |
|
1680 |
] ifFalse:[ |
|
1681 |
realNameMatch := [:fn | (nameExcludedMatch value:fn) not] |
|
1682 |
]. |
|
1683 |
] ifFalse:[ |
|
1684 |
excludedNamePatterns isNil ifTrue:[ |
|
1685 |
realNameMatch := nameMatch |
|
1686 |
] ifFalse:[ |
|
1687 |
realNameMatch := [:fn | (nameMatch value:fn) and:[ (nameExcludedMatch value:fn) not ]] |
|
1688 |
]. |
|
1689 |
]. |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1690 |
|
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1691 |
(self canUseLocate |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1692 |
and:[self useLocate value |
16574 | 1693 |
and:[searchDirectories not |
1694 |
and:[theSingleDirectory notNil]]]) |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1695 |
ifTrue:[ |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1696 |
[ |
16639 | 1697 |
|updateInfo cmd line f| |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1698 |
|
16639 | 1699 |
updateInfo := |
1700 |
[ |
|
1701 |
self |
|
1702 |
changeInformationTo:('%1 found' bindWith:resultList size) |
|
1703 |
toTab:false. |
|
1704 |
]. |
|
1705 |
||
1706 |
self window shown ifTrue:[ |
|
1707 |
updateInfo value. |
|
1708 |
]. |
|
1709 |
||
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1710 |
cmd := 'locate '. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1711 |
ignCaseInName ifTrue:[ |
16186 | 1712 |
"/ cmd := cmd , '--ignore-case ' |
1713 |
cmd := cmd , '-i ' |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1714 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1715 |
|
16186 | 1716 |
cmd := cmd , ((namePatterns |
1717 |
collect:[:nm | '"',nm,'"']) |
|
1718 |
asStringCollection asStringWith:Character space). |
|
16574 | 1719 |
inStream := PipeStream readingFrom:cmd inDirectory:theSingleDirectory. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1720 |
[inStream atEnd] whileFalse:[ |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1721 |
line := inStream nextLine. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1722 |
|
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1723 |
f := line asFilename. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1724 |
(doesFileMatch value:f) ifTrue:[ |
5859 | 1725 |
resultList add:line. |
16639 | 1726 |
updateInfo value. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1727 |
] |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1728 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1729 |
] ensure:[ |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1730 |
inStream notNil ifTrue:[inStream close]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1731 |
]. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1732 |
^ self. |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1733 |
]. |
12339 | 1734 |
|
3892 | 1735 |
bytesToCompareContentsOrNil notNil ifTrue:[ |
1736 |
contentsToCompare := bytesToCompareContentsOrNil |
|
1737 |
]. |
|
1738 |
||
12385 | 1739 |
filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[ |
5727 | 1740 |
self searchOnlyInCache value ifTrue:[ |
5726 | 1741 |
cache notEmptyOrNil ifTrue:[ |
1742 |
cache keysAndValuesDo:[:fn :info | |
|
5768 | 1743 |
|filesSize filesMD5 idxInList| |
12339 | 1744 |
|
5726 | 1745 |
filesSize := info at:1. |
1746 |
filesSize isNil ifTrue:[ |
|
1747 |
filesSize := fn asFilename fileSize. |
|
1748 |
info at:1 put:filesSize. |
|
1749 |
]. |
|
5768 | 1750 |
(idxInList := fileSizesToSearchFor indexOf:filesSize) ~~ 0 ifTrue:[ |
6250
5b0673ccff1c
refactored intention revealing code:
Claus Gittinger <cg@exept.de>
parents:
6183
diff
changeset
|
1751 |
(setOfFilesToSearchFor includes:fn) ifFalse:[ |
5729 | 1752 |
fn asFilename exists ifFalse:[ |
1753 |
info at:1 put:nil. |
|
1754 |
info at:2 put:nil. |
|
1755 |
] ifTrue:[ |
|
1756 |
filesMD5 := info at:2. |
|
1757 |
filesMD5 isNil ifTrue:[ |
|
1758 |
filesMD5 := MD5Stream hashValueOfFile:fn asFilename. |
|
1759 |
info at:2 put:filesMD5. |
|
1760 |
]. |
|
5768 | 1761 |
filesMD5 = (fileMD5sToSearchFor at:idxInList) ifTrue:[ |
5859 | 1762 |
resultList add:fn. |
5728 | 1763 |
] |
5727 | 1764 |
] |
5726 | 1765 |
] |
1766 |
] |
|
1767 |
]. |
|
1768 |
]. |
|
1769 |
^ self. |
|
1770 |
]. |
|
1771 |
]. |
|
1772 |
||
15217 | 1773 |
filesSearchedCount := 0. |
1774 |
||
16574 | 1775 |
aDirectoryOrCollectionOfDirectories do:[:eachDir | |
1776 |
self |
|
1777 |
doFindFileNamed:namePatterns |
|
1778 |
directories:searchDirectories |
|
1779 |
nameMatch:realNameMatch |
|
1780 |
contentsMatch:doesFileMatch |
|
1781 |
in:eachDir. |
|
1782 |
] |
|
1783 |
||
10441 | 1784 |
"Created: / 03-08-2011 / 18:16:02 / cg" |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1785 |
! |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1786 |
|
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1787 |
doFindFileNamed:namePatterns directories:searchDirectories nameMatch:nameMatch contentsMatch:doesFileMatch in:aDirectory |
15217 | 1788 |
"the recursive walker. Searches for files matching namematch-block, |
1789 |
and contents matching doesFileMatch-block" |
|
1790 |
||
1791 |
|dir subDirs list directoryContents updateInfo| |
|
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1792 |
|
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1793 |
dir := aDirectory asFilename. |
5844 | 1794 |
|
15217 | 1795 |
updateInfo := |
1796 |
[ |
|
1797 |
self |
|
1798 |
changeInformationTo:('%1 found - searching %2' |
|
1799 |
bindWith:resultList size |
|
1800 |
with:((dir name) copyFrom:(self searchDirectoryHolder value asString size + 1))) |
|
1801 |
toTab:false. |
|
1802 |
]. |
|
1803 |
||
14748 | 1804 |
self window shown ifTrue:[ |
15217 | 1805 |
updateInfo value. |
14748 | 1806 |
]. |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1807 |
list := self resultList. |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1808 |
|
3892 | 1809 |
subDirs := OrderedCollection new. |
1810 |
||
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1811 |
[ |
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1812 |
directoryContents := dir directoryContents. |
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1813 |
] on:FileStream openErrorSignal do:[:ex| |
15660 | 1814 |
self showUnreadableFilesAndDirectoriesHolder value ifTrue:[ |
16511 | 1815 |
list add:((ex pathName , ' -> ' , ex description) withColor:Color red darkened). |
15660 | 1816 |
]. |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1817 |
"/ self warn:('Cannot access %1\(%2)' |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1818 |
"/ bindWith:ex parameter printString |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1819 |
"/ with:ex description) withCRs. |
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1820 |
^ self |
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1821 |
]. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1822 |
|
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4518
diff
changeset
|
1823 |
directoryContents sort do:[:fn | |
4518
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1824 |
|f isDirectory| |
3892 | 1825 |
|
1826 |
f := dir construct:fn. |
|
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1827 |
|
4518
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1828 |
isDirectory := f isDirectory. |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1829 |
isDirectory ifTrue:[ |
3892 | 1830 |
f isSymbolicLink ifFalse:[ |
1831 |
subDirs add:f |
|
1832 |
] |
|
4518
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1833 |
]. |
85b13890d7b1
allow to search for directories
Claus Gittinger <cg@exept.de>
parents:
4336
diff
changeset
|
1834 |
(searchDirectories or:[isDirectory not]) ifTrue:[ |
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1835 |
(nameMatch value:fn) ifTrue:[ |
15217 | 1836 |
filesSearchedCount := (filesSearchedCount ? 0) + 1. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1837 |
(isDirectory or:[ doesFileMatch value:f ]) |
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1838 |
ifTrue:[ |
15217 | 1839 |
updateInfo value. |
5176
b76af7e92feb
option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents:
5140
diff
changeset
|
1840 |
list add:(f asString). |
3892 | 1841 |
] |
1842 |
] |
|
1843 |
] |
|
1844 |
]. |
|
1845 |
||
1846 |
self searchRecursively value ifTrue:[ |
|
1847 |
subDirs do:[:dir | |
|
1848 |
self |
|
1849 |
doFindFileNamed:namePatterns |
|
5600
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1850 |
directories:searchDirectories |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1851 |
nameMatch:nameMatch |
4e7bca968c09
findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents:
5557
diff
changeset
|
1852 |
contentsMatch:doesFileMatch |
3892 | 1853 |
in:dir |
1854 |
]. |
|
1855 |
] |
|
10441 | 1856 |
|
15660 | 1857 |
"Modified: / 22-05-2015 / 11:42:17 / cg" |
11097 | 1858 |
! |
1859 |
||
1860 |
fileSizeWrapperFor:aFileMatchBlock |
|
1861 |
"possibly wrap the search-match block into a file-size matcher" |
|
1862 |
||
1863 |
|fileSizeToCompare sizeMatch op compare| |
|
1864 |
||
1865 |
self enableFileSizeFilter value ifFalse:[ ^ aFileMatchBlock ]. |
|
1866 |
||
1867 |
fileSizeToCompare := self fileSizeHolder value. |
|
1868 |
op := self fileSizeOperatorHolder value withoutSeparators. |
|
1869 |
op = '~' ifTrue:[ |
|
1870 |
compare := [:sz | sz between:(fileSizeToCompare*0.9) and:(fileSizeToCompare*1.1) ]. |
|
1871 |
] ifFalse:[ |
|
1872 |
op := op asSymbol. |
|
1873 |
compare := [:sz | sz perform:op with:fileSizeToCompare ]. |
|
1874 |
]. |
|
1875 |
||
1876 |
sizeMatch := [:f | |
|
1877 |
|sz| |
|
1878 |
||
1879 |
sz := f fileSize. |
|
1880 |
sz notNil and:[ compare value:sz ] |
|
1881 |
]. |
|
1882 |
||
1883 |
^ [:f | (sizeMatch value:f) and:[ aFileMatchBlock value:f ]] |
|
1884 |
||
1885 |
"Created: / 11-01-2012 / 23:17:02 / cg" |
|
11473 | 1886 |
! |
1887 |
||
1888 |
modificationTimeWrapperFor:aFileMatchBlock |
|
1889 |
"possibly wrap the search-match block into a modification time matcher" |
|
1890 |
||
1891 |
|timeToCompare timeMatch op compare| |
|
1892 |
||
1893 |
self enableModificationTimeFilter value ifFalse:[ ^ aFileMatchBlock ]. |
|
1894 |
||
1895 |
timeToCompare := self modificationTimeHolder value. |
|
1896 |
op := self modificationTimeOperatorHolder value withoutSeparators. |
|
1897 |
op = 'after' ifTrue:[ |
|
1898 |
compare := [:t | t > timeToCompare ]. |
|
1899 |
] ifFalse:[ |
|
1900 |
compare := [:t | t < timeToCompare ]. |
|
1901 |
]. |
|
1902 |
||
1903 |
timeMatch := [:f | |
|
1904 |
|t| |
|
1905 |
||
1906 |
t := f modificationTime. |
|
1907 |
t notNil and:[ compare value:t ] |
|
1908 |
]. |
|
1909 |
||
1910 |
^ [:f | (timeMatch value:f) and:[ aFileMatchBlock value:f ]] |
|
1911 |
||
1912 |
"Created: / 28-03-2012 / 23:18:32 / cg" |
|
3892 | 1913 |
! ! |
1914 |
||
1915 |
!FindFileApplication methodsFor:'queries'! |
|
1916 |
||
7688 | 1917 |
getTabValueString |
1918 |
"the item shown in a tab (not language translated)" |
|
3892 | 1919 |
|
7691 | 1920 |
^ self fileName directory baseName |
7688 | 1921 |
|
1922 |
"Created: / 01-03-2007 / 21:39:54 / cg" |
|
3892 | 1923 |
! ! |
1924 |
||
1925 |
!FindFileApplication methodsFor:'startup & release'! |
|
1926 |
||
11101 | 1927 |
initialize |
1928 |
super initialize. |
|
1929 |
||
1930 |
self enableStop value:false. |
|
1931 |
self enableSearch value:true. |
|
1932 |
||
1933 |
"Created: / 12-01-2012 / 01:38:29 / cg" |
|
1934 |
! |
|
1935 |
||
5010 | 1936 |
item:anItem |
3892 | 1937 |
|
4797 | 1938 |
|file newPattern| |
3892 | 1939 |
|
5010 | 1940 |
super item:anItem. |
4797 | 1941 |
|
3892 | 1942 |
file := self fileName. |
1943 |
self searchDirectoryHolder value:(self getDirWithoutFileName:file). |
|
4797 | 1944 |
|
3892 | 1945 |
file isDirectory ifTrue:[ |
4797 | 1946 |
newPattern := '*'. |
3892 | 1947 |
] ifFalse:[ |
12739 | 1948 |
anItem suffix isEmptyOrNil ifTrue:[ |
1949 |
newPattern := '*'. |
|
1950 |
] ifFalse:[ |
|
1951 |
newPattern := '*.', anItem suffix. |
|
1952 |
]. |
|
3892 | 1953 |
]. |
4797 | 1954 |
self namePatternHolder value:newPattern. |
3892 | 1955 |
^ true. |
11101 | 1956 |
|
1957 |
"Modified: / 12-01-2012 / 01:38:14 / cg" |
|
3892 | 1958 |
! |
1959 |
||
1960 |
postOpenWith:aBuilder |
|
1961 |
self masterApplication isNil ifTrue:[ |
|
1962 |
self masterApplication:nil. |
|
1963 |
]. |
|
1964 |
findFileView := aBuilder window. |
|
1965 |
self windowGroup addPreEventHook:self. |
|
6633 | 1966 |
super postOpenWith:aBuilder. |
11101 | 1967 |
|
1968 |
"Modified (format): / 12-01-2012 / 01:40:44 / cg" |
|
3892 | 1969 |
! |
1970 |
||
1971 |
release |
|
1972 |
self stopSearchTask. |
|
6107 | 1973 |
contentsInfoCache := nil. |
14064 | 1974 |
super release |
3892 | 1975 |
! ! |
1976 |
||
1977 |
!FindFileApplication class methodsFor:'documentation'! |
|
1978 |
||
1979 |
version |
|
16186 | 1980 |
^ '$Header$' |
9036
9242245f6689
no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents:
8613
diff
changeset
|
1981 |
! |
9242245f6689
no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents:
8613
diff
changeset
|
1982 |
|
9242245f6689
no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents:
8613
diff
changeset
|
1983 |
version_CVS |
16186 | 1984 |
^ '$Header$' |
3892 | 1985 |
! ! |
12339 | 1986 |