FindFileApplication.st
changeset 11423 ba26e541c690
parent 11122 02a57283d491
child 11473 2d838f1ab6e3
equal deleted inserted replaced
11422:b7084e3e20fd 11423:ba26e541c690
   741         self removeSelectedFilesFromResultList.
   741         self removeSelectedFilesFromResultList.
   742     ].
   742     ].
   743 !
   743 !
   744 
   744 
   745 doSearch
   745 doSearch
   746     |namePatterns excludedNamePatterns contentsPattern notContentsPattern dir fileToCompareAgainst ignoreCaseInName ignoreCaseInExcludedName ignoreCaseInContents|
   746     |namePatterns excludedNamePatterns contentsPattern notContentsPattern dir fileToCompareAgainst ignoreCaseInName ignoreCaseInExcludedName 
       
   747      ignoreCaseInContents ignoreCaseInNotContents|
   747 
   748 
   748 "/    self changeExtentToSeeSearchResult.
   749 "/    self changeExtentToSeeSearchResult.
   749 
   750 
   750     dir := self searchDirectoryHolder value.
   751     dir := self searchDirectoryHolder value.
   751     dir isNil ifTrue:[
   752     dir isNil ifTrue:[
   758     ].
   759     ].
   759 
   760 
   760     LastSearchIgnoredCaseInFilename := ignoreCaseInName := self ignoreCaseInName value.
   761     LastSearchIgnoredCaseInFilename := ignoreCaseInName := self ignoreCaseInName value.
   761     LastSearchIgnoredCaseInExcludedFilename := ignoreCaseInExcludedName := self ignoreCaseInExcludedName value.
   762     LastSearchIgnoredCaseInExcludedFilename := ignoreCaseInExcludedName := self ignoreCaseInExcludedName value.
   762     LastSearchIgnoredCaseInContents := ignoreCaseInContents := self ignoreCaseInContents value.
   763     LastSearchIgnoredCaseInContents := ignoreCaseInContents := self ignoreCaseInContents value.
       
   764     ignoreCaseInNotContents := self ignoreCaseInNotContents value.
   763 
   765 
   764     self stopSearchTaskOrAbort.
   766     self stopSearchTaskOrAbort.
   765 
   767 
   766     namePatterns := self namePatternsFor:(self namePatternHolder value) ignoringCase:ignoreCaseInName.
   768     namePatterns := self namePatternsFor:(self namePatternHolder value) ignoringCase:ignoreCaseInName.
   767     excludedNamePatterns := self namePatternsFor:(self excludedNamePatternHolder value) ignoringCase:ignoreCaseInExcludedName.
   769     excludedNamePatterns := self namePatternsFor:(self excludedNamePatternHolder value) ignoringCase:ignoreCaseInExcludedName.
   777     ].
   779     ].
   778     notContentsPattern := self notContentsPatternHolder value.
   780     notContentsPattern := self notContentsPatternHolder value.
   779     notContentsPattern size == 0 ifTrue:[
   781     notContentsPattern size == 0 ifTrue:[
   780         notContentsPattern := nil
   782         notContentsPattern := nil
   781     ] ifFalse:[
   783     ] ifFalse:[
   782         self ignoreCaseInNotContents value ifTrue:[
   784         ignoreCaseInNotContents ifTrue:[
   783             notContentsPattern := notContentsPattern asLowercase
   785             notContentsPattern := notContentsPattern asLowercase
   784         ]
   786         ]
   785     ].
   787     ].
   786     searchForSameContents value ifTrue:[
   788     searchForSameContents value ifTrue:[
   787         fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators.
   789         fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators.
   811                 excludeFilesNamed:excludedNamePatterns
   813                 excludeFilesNamed:excludedNamePatterns
   812                 ignoreCaseInExcludedName:ignoreCaseInExcludedName
   814                 ignoreCaseInExcludedName:ignoreCaseInExcludedName
   813                 containingString:contentsPattern
   815                 containingString:contentsPattern
   814                 ignoreCaseInContents:ignoreCaseInContents
   816                 ignoreCaseInContents:ignoreCaseInContents
   815                 notContainingString:notContentsPattern
   817                 notContainingString:notContentsPattern
   816                 ignoreCaseInNotContents:(self ignoreCaseInNotContents value)
   818                 ignoreCaseInNotContents:ignoreCaseInNotContents
   817                 sameContentsAsFile:fileToCompareAgainst  
   819                 sameContentsAsFile:fileToCompareAgainst  
   818                 sameContentsAs:nil 
   820                 sameContentsAs:nil 
   819                 in:(self searchDirectoryHolder value).
   821                 in:(self searchDirectoryHolder value).
   820 
   822 
   821         ]
   823         ]
   822         name:('FindFile[', self searchDirectoryHolder value asFilename baseName, ']')
   824         name:('FindFile[', self searchDirectoryHolder value asFilename baseName, ']')
   823 
   825 
   824     "Modified: / 12-01-2012 / 01:54:27 / cg"
   826     "Modified: / 16-03-2012 / 09:37:13 / cg"
   825 !
   827 !
   826 
   828 
   827 fileInInBrowser
   829 fileInInBrowser
   828     |sel entry application|
   830     |sel entry application|
   829 
   831 
  1679 ! !
  1681 ! !
  1680 
  1682 
  1681 !FindFileApplication class methodsFor:'documentation'!
  1683 !FindFileApplication class methodsFor:'documentation'!
  1682 
  1684 
  1683 version
  1685 version
  1684     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.100 2012-01-13 13:44:18 cg Exp $'
  1686     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.101 2012-03-16 09:10:56 cg Exp $'
  1685 !
  1687 !
  1686 
  1688 
  1687 version_CVS
  1689 version_CVS
  1688     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.100 2012-01-13 13:44:18 cg Exp $'
  1690     ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.101 2012-03-16 09:10:56 cg Exp $'
  1689 ! !
  1691 ! !