on doubleclick after search the file is opened and searchPatternStrin is selected
--- a/FindFileApplication.st Sat Nov 02 19:47:55 2002 +0100
+++ b/FindFileApplication.st Mon Nov 04 11:58:03 2002 +0100
@@ -646,12 +646,18 @@
!FindFileApplication methodsFor:'event handling'!
fileDoubleClick:entries
- |file app|
+ |file app openedAppl contentsPattern|
file := self resultList at:entries first.
app := targetApplication ? self masterApplication.
app notNil ifTrue:[
- app openApplForFile:file
+ openedAppl := app openApplForFile:file.
+ openedAppl isTextEditor ifTrue:[
+ contentsPattern := self contentsPatternHolder value.
+ (contentsPattern notNil and:[ contentsPattern notEmpty and:[contentsPattern ~= '*']]) ifTrue:[
+ openedAppl searchForPattern:contentsPattern ignoreCase:(self ignoreCaseInContents value).
+ ]
+ ].
] ifFalse:[
self openInNewBrowser.
]
@@ -836,18 +842,6 @@
!FindFileApplication methodsFor:'startup & release'!
-initialize:aFile
-
- self searchDirectoryHolder value:(self getDirWithoutFileName:aFile).
- aFile isDirectory ifTrue:[
- self namePatternHolder value:'*'.
- ] ifFalse:[
- self namePatternHolder value:aFile baseName.
- ].
- self enableStop value:false.
- self enableSearch value:true.
-!
-
item:aItem
|file|
@@ -858,7 +852,7 @@
file isDirectory ifTrue:[
self namePatternHolder value:'*'.
] ifFalse:[
- self namePatternHolder value:file baseName.
+ self namePatternHolder value:'*.', aItem suffix.
].
self enableStop value:false.
self enableSearch value:true.
@@ -884,5 +878,5 @@
!FindFileApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.4 2002-10-29 15:15:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.5 2002-11-04 10:58:03 penk Exp $'
! !