AbstractFileFinderApplicationComponent.st
changeset 18824 3133890f5980
parent 18488 30b7a8de3bf2
child 18875 717aa71f0945
equal deleted inserted replaced
18823:ed247fa7d8ea 18824:3133890f5980
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2002 by eXept Software AG
     4  COPYRIGHT (c) 2002 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   124         FileBrowserV2 openOn:(self shownList at:sel first) asFilename
   126         FileBrowserV2 openOn:(self shownList at:sel first) asFilename
   125     ].
   127     ].
   126 !
   128 !
   127 
   129 
   128 selectInBrowser
   130 selectInBrowser
   129     |sel entry application|
   131     |sel entry fn application|
   130 
   132 
   131     sel := self selectionHolder value.
   133     sel := self selectionHolder value.
   132     (sel notEmptyOrNil) ifTrue:[
   134     (sel notEmptyOrNil) ifTrue:[
   133         entry := self shownList at:sel first.
   135         entry := self shownList at:sel first.
   134         entry asFilename exists ifFalse:[ ^ self].
   136         (fn := entry asFilename) exists ifFalse:[ ^ self].
       
   137         
   135         application := targetApplication ? self masterApplication.
   138         application := targetApplication ? self masterApplication.
   136         application notNil ifTrue:[
   139         application notNil ifTrue:[
   137             application gotoFile:(entry asFilename).
   140             application gotoFile:fn.
   138         ].
   141         ].
   139     ].
   142     ].
       
   143 
       
   144     "Modified (format): / 15-06-2019 / 08:44:29 / Claus Gittinger"
   140 !
   145 !
   141 
   146 
   142 startSearchTask:aBlock name:taskName
   147 startSearchTask:aBlock name:taskName
   143     |thisSearchTask|
   148     |thisSearchTask|
   144 
   149 
   241         autoSelectInBrowserHolder := false asValue.
   246         autoSelectInBrowserHolder := false asValue.
   242     ].
   247     ].
   243     ^ autoSelectInBrowserHolder.
   248     ^ autoSelectInBrowserHolder.
   244 !
   249 !
   245 
   250 
       
   251 contentsPatternHolder
       
   252     "to be redefined"
       
   253     
       
   254     ^ nil
       
   255 
       
   256     "Created: / 15-06-2019 / 08:43:11 / Claus Gittinger"
       
   257 !
       
   258 
   246 enableSearch
   259 enableSearch
   247 
   260 
   248     enableSearch isNil ifTrue:[
   261     enableSearch isNil ifTrue:[
   249         enableSearch := true asValue.
   262         enableSearch := true asValue.
   250     ].
   263     ].
   263 
   276 
   264     hasListEntries isNil ifTrue:[
   277     hasListEntries isNil ifTrue:[
   265         hasListEntries := false asValue.
   278         hasListEntries := false asValue.
   266     ].
   279     ].
   267     ^ hasListEntries.
   280     ^ hasListEntries.
       
   281 !
       
   282 
       
   283 ignoreCaseInContents
       
   284     "to be redefined"
       
   285     
       
   286     ^ false
       
   287 
       
   288     "Created: / 15-06-2019 / 08:43:47 / Claus Gittinger"
   268 !
   289 !
   269 
   290 
   270 matchedFilesList
   291 matchedFilesList
   271 
   292 
   272     matchedFilesList isNil ifTrue:[
   293     matchedFilesList isNil ifTrue:[
   391         Dialog warn:('File %1 does not (no longer ?) exist.' bindWith:file allBold).
   412         Dialog warn:('File %1 does not (no longer ?) exist.' bindWith:file allBold).
   392         ^ self
   413         ^ self
   393     ].
   414     ].
   394 
   415 
   395     app := targetApplication ? self masterApplication.
   416     app := targetApplication ? self masterApplication.
   396     file asFilename isDirectory ifTrue:[
   417     fn isDirectory ifTrue:[
   397         app gotoFile:(file asFilename).
   418         app gotoFile:fn.
   398         ^ self.
   419         ^ self.
   399     ].
   420     ].
   400     app notNil ifTrue:[
   421     app notNil ifTrue:[
   401         openedAppl := app openApplForFile:file.
   422         openedAppl := app openApplForFile:file.
   402         (openedAppl notNil and:[openedAppl isTextEditor]) ifTrue:[
   423         (openedAppl notNil and:[openedAppl isTextEditor]) ifTrue:[
   407             ]        
   428             ]        
   408         ].
   429         ].
   409     ] ifFalse:[
   430     ] ifFalse:[
   410         self openInNewBrowser.
   431         self openInNewBrowser.
   411     ]
   432     ]
       
   433 
       
   434     "Modified: / 15-06-2019 / 08:42:32 / Claus Gittinger"
   412 !
   435 !
   413 
   436 
   414 fileSelected:entries
   437 fileSelected:entries
   415     |file fn|
   438     |file fn|
   416 
   439