--- a/FindFileApplication.st Sat Mar 20 14:58:40 2004 +0100
+++ b/FindFileApplication.st Sat Mar 20 15:24:00 2004 +0100
@@ -653,47 +653,49 @@
].
].
- searchTask := Process for:[
- |message t|
+ searchTask :=
+ [
+ |message t|
- [
- (self stopSignal) catch:[
- self enableStop value:true.
- self resultList removeAll.
- self changeInformationTo:'Find File ' , '- searching ' toTab:true.
- self notify:'searching...'.
- t := Time millisecondsToRun:[
+ [
+ (self stopSignal) catch:[
+ self enableStop value:true.
+ self resultList removeAll.
+ self changeInformationTo:'Find File ' , '- searching ' toTab:true.
+ self notify:'searching...'.
+ t := Time millisecondsToRun:[
- self
- doFindFileNamed:namePatterns
- directories:(self searchDirectories value)
- ignoreCase:(self ignoreCaseInName value)
- containingString:contentsPattern
- ignoreCaseInContents:(self ignoreCaseInContents value)
- notContainingString:notContentsPattern
- ignoreCaseInNotContents:(self ignoreCaseInNotContents value)
- sameContentsAsFile:fileToCompareAgainst
- sameContentsAs:nil
- in:(self searchDirectoryHolder value).
+ self
+ doFindFileNamed:namePatterns
+ directories:(self searchDirectories value)
+ ignoreCase:(self ignoreCaseInName value)
+ containingString:contentsPattern
+ ignoreCaseInContents:(self ignoreCaseInContents value)
+ notContainingString:notContentsPattern
+ ignoreCaseInNotContents:(self ignoreCaseInNotContents value)
+ sameContentsAsFile:fileToCompareAgainst
+ sameContentsAs:nil
+ in:(self searchDirectoryHolder value).
+ ].
+ t > 100 ifTrue:[
+ t := ((t / 1000) asFixedPoint:2) printString , ' s'
+ ] ifFalse:[
+ t := t printString , ' ms'
+ ].
+ message := 'Found %1 file%2 in %3' bindWith:(resultList size) with:(resultList size == 1 ifTrue:'' ifFalse:'s') with:t.
+ self enableStop value:false.
+ self enableSearch value:true.
+ self changeInformationTo:'Find File ' , '- done.' toTab:true.
].
- t > 100 ifTrue:[
- t := ((t / 1000) asFixedPoint:2) printString , ' s'
- ] ifFalse:[
- t := t printString , ' ms'
- ].
- message := 'Found %1 file%2 in %3' bindWith:(resultList size) with:(resultList size == 1 ifTrue:'' ifFalse:'s') with:t.
+ ] valueNowOrOnUnwindDo:[
+ searchTask := nil.
self enableStop value:false.
- self enableSearch value:true.
- self changeInformationTo:'Find File ' , '- done.' toTab:true.
- ].
- ] valueNowOrOnUnwindDo:[
- searchTask := nil.
- self enableStop value:false.
- self notify:message.
- ]
- ] priority:(Processor systemBackgroundPriority).
+ self notify:message.
+ ]
+ ] newProcess.
+ searchTask priorityRange:(Processor systemBackgroundPriority to:Processor userSchedulingPriority).
searchTask name:('FindFile[', self searchDirectoryHolder value asFilename baseName, ']').
searchTask resume.
!
@@ -1452,5 +1454,5 @@
!FindFileApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.40 2004-03-20 13:26:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.41 2004-03-20 14:24:00 cg Exp $'
! !