equal
deleted
inserted
replaced
644 ! ! |
644 ! ! |
645 |
645 |
646 !FindFileApplication methodsFor:'event handling'! |
646 !FindFileApplication methodsFor:'event handling'! |
647 |
647 |
648 fileDoubleClick:entries |
648 fileDoubleClick:entries |
649 |file app| |
649 |file app openedAppl contentsPattern| |
650 |
650 |
651 file := self resultList at:entries first. |
651 file := self resultList at:entries first. |
652 app := targetApplication ? self masterApplication. |
652 app := targetApplication ? self masterApplication. |
653 app notNil ifTrue:[ |
653 app notNil ifTrue:[ |
654 app openApplForFile:file |
654 openedAppl := app openApplForFile:file. |
|
655 openedAppl isTextEditor ifTrue:[ |
|
656 contentsPattern := self contentsPatternHolder value. |
|
657 (contentsPattern notNil and:[ contentsPattern notEmpty and:[contentsPattern ~= '*']]) ifTrue:[ |
|
658 openedAppl searchForPattern:contentsPattern ignoreCase:(self ignoreCaseInContents value). |
|
659 ] |
|
660 ]. |
655 ] ifFalse:[ |
661 ] ifFalse:[ |
656 self openInNewBrowser. |
662 self openInNewBrowser. |
657 ] |
663 ] |
658 ! |
664 ! |
659 |
665 |
834 ^ (sel notNil and:[sel notEmpty]) |
840 ^ (sel notNil and:[sel notEmpty]) |
835 ! ! |
841 ! ! |
836 |
842 |
837 !FindFileApplication methodsFor:'startup & release'! |
843 !FindFileApplication methodsFor:'startup & release'! |
838 |
844 |
839 initialize:aFile |
|
840 |
|
841 self searchDirectoryHolder value:(self getDirWithoutFileName:aFile). |
|
842 aFile isDirectory ifTrue:[ |
|
843 self namePatternHolder value:'*'. |
|
844 ] ifFalse:[ |
|
845 self namePatternHolder value:aFile baseName. |
|
846 ]. |
|
847 self enableStop value:false. |
|
848 self enableSearch value:true. |
|
849 ! |
|
850 |
|
851 item:aItem |
845 item:aItem |
852 |
846 |
853 |file| |
847 |file| |
854 |
848 |
855 super item:aItem. |
849 super item:aItem. |
856 file := self fileName. |
850 file := self fileName. |
857 self searchDirectoryHolder value:(self getDirWithoutFileName:file). |
851 self searchDirectoryHolder value:(self getDirWithoutFileName:file). |
858 file isDirectory ifTrue:[ |
852 file isDirectory ifTrue:[ |
859 self namePatternHolder value:'*'. |
853 self namePatternHolder value:'*'. |
860 ] ifFalse:[ |
854 ] ifFalse:[ |
861 self namePatternHolder value:file baseName. |
855 self namePatternHolder value:'*.', aItem suffix. |
862 ]. |
856 ]. |
863 self enableStop value:false. |
857 self enableStop value:false. |
864 self enableSearch value:true. |
858 self enableSearch value:true. |
865 ^ true. |
859 ^ true. |
866 ! |
860 ! |
882 ! ! |
876 ! ! |
883 |
877 |
884 !FindFileApplication class methodsFor:'documentation'! |
878 !FindFileApplication class methodsFor:'documentation'! |
885 |
879 |
886 version |
880 version |
887 ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.4 2002-10-29 15:15:16 cg Exp $' |
881 ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.5 2002-11-04 10:58:03 penk Exp $' |
888 ! ! |
882 ! ! |