FindFileApplication.st
author Claus Gittinger <cg@exept.de>
Mon, 20 Jan 2020 21:02:47 +0100
changeset 19422 c6ca1c3e0fd7
parent 19417 2f5d4b7bc507
child 19503 c4e9982b4847
permissions -rw-r--r--
#REFACTORING by exept class: MultiViewToolApplication added: #askForFile:default:forSave:thenDo: changed: #askForFile:default:thenDo: #askForFile:thenDo: #menuSaveAllAs #menuSaveAs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19417
2f5d4b7bc507 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19399
diff changeset
     1
"{ Encoding: utf8 }"
2f5d4b7bc507 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19399
diff changeset
     2
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     3
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     4
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     5
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     6
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     7
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     8
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    10
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    11
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    12
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    13
"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    14
"{ Package: 'stx:libtool' }"
321c1729db5b initial checkin
penk
parents:
diff changeset
    15
15092
1684fd8d6a41 class: FindFileApplication
sr
parents: 14748
diff changeset
    16
"{ NameSpace: Smalltalk }"
1684fd8d6a41 class: FindFileApplication
sr
parents: 14748
diff changeset
    17
11096
c9585b9d2697 refactored
Claus Gittinger <cg@exept.de>
parents: 10441
diff changeset
    18
AbstractFileFinderApplicationComponent subclass:#FindFileApplication
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
    19
	instanceVariableNames:'searchDirectories searchDirectoryHolder notSearchForSameContents
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
    20
		namePatternHolder excludedNamePatternHolder ignoreCaseInName
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
    21
		ignoreCaseInExcludedName contentsPatternHolder
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
    22
		ignoreCaseInContents notContentsPatternHolder
11096
c9585b9d2697 refactored
Claus Gittinger <cg@exept.de>
parents: 10441
diff changeset
    23
		ignoreCaseInNotContents sameContentsAsHolder useLocate useGrep
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
    24
		rememberInCache searchOnlyInCache searchForSameContents
11096
c9585b9d2697 refactored
Claus Gittinger <cg@exept.de>
parents: 10441
diff changeset
    25
		contentsInfoCache contentsInfoCacheAccessLock
6330
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
    26
		fileSizeOperatorHolder fileSizeHolder enableFileSizeFilter
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
    27
		fileSizeUnitHolder modificationTimeOperatorHolder
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
    28
		modificationTimeHolder enableModificationTimeFilter
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
    29
		showUnreadableFilesAndDirectoriesHolder
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
    30
		modificationTimeOperatorIndexHolder searchForBinaryContentsHolder'
6442
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
    31
	classVariableNames:'ContentsInfoCache ContentsInfoCacheAccessLock LastRememberInCache
8330
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
    32
		LastSearchIgnoredCaseInContents LastSearchIgnoredCaseInFilename
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
    33
		SearchStringHistory LastSearchIgnoredCaseInExcludedFilename
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
    34
		LastShowUnreadableFilesAndDirectories LastSearchForBinaryContents'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    35
	poolDictionaries:''
321c1729db5b initial checkin
penk
parents:
diff changeset
    36
	category:'Interface-Tools-File'
321c1729db5b initial checkin
penk
parents:
diff changeset
    37
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    38
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    39
!FindFileApplication class methodsFor:'documentation'!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    40
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    41
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    42
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    43
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    44
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    45
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    46
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    47
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    48
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    49
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    50
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    51
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    52
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
    53
! !
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    54
321c1729db5b initial checkin
penk
parents:
diff changeset
    55
!FindFileApplication class methodsFor:'instance creation'!
321c1729db5b initial checkin
penk
parents:
diff changeset
    56
321c1729db5b initial checkin
penk
parents:
diff changeset
    57
open
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    58
    ^ self openInDirectory:(Filename currentDirectory)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    59
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    60
    "
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    61
     self open
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    62
    "
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    63
!
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    64
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    65
openInDirectory:aFilename
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    66
    ^ self openOnFileName:(aFilename asFilename asAbsoluteFilename)
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    67
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    68
    "
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    69
     self openInDirectory:'/etc'
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    70
    "
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    71
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    72
321c1729db5b initial checkin
penk
parents:
diff changeset
    73
openOnFileName:aFileName
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    74
    ^ self openOnFileName:aFileName for:nil
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    75
!
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    76
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    77
openOnFileName:aFileName for:aTargetApplicationOrNil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    78
321c1729db5b initial checkin
penk
parents:
diff changeset
    79
    | instance builder|
321c1729db5b initial checkin
penk
parents:
diff changeset
    80
321c1729db5b initial checkin
penk
parents:
diff changeset
    81
    builder := super open.
321c1729db5b initial checkin
penk
parents:
diff changeset
    82
    instance := builder application.
3983
dd593a7482fa *** empty log message ***
penk
parents: 3937
diff changeset
    83
    instance item:(DirectoryContentsBrowser itemClass fileName:aFileName).
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    84
    aTargetApplicationOrNil notNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    85
        instance targetApplication:aTargetApplicationOrNil.
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
    86
    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    87
    ^ builder
321c1729db5b initial checkin
penk
parents:
diff changeset
    88
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
    89
321c1729db5b initial checkin
penk
parents:
diff changeset
    90
!FindFileApplication class methodsFor:'defaults'!
321c1729db5b initial checkin
penk
parents:
diff changeset
    91
321c1729db5b initial checkin
penk
parents:
diff changeset
    92
tabStringFor:aApplicationType
7688
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
    93
    "the formatString shown in a tab (language translated)"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    94
7688
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
    95
    ^ 'Find in %1'
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
    96
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
    97
    "Modified: / 01-03-2007 / 21:47:54 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    98
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
    99
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   100
!FindFileApplication class methodsFor:'help specs'!
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   101
17894
58b0ce702eb0 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17856
diff changeset
   102
helpSpec
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   103
    "This resource specification was automatically generated
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   104
     by the UIHelpTool of ST/X."
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   105
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   106
    "Do not manually edit this!! If it is corrupted,
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   107
     the UIHelpTool may not be able to read the specification."
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   108
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   109
    "
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   110
     UIHelpTool openOnClass:FindFileApplication    
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   111
    "
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   112
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   113
    <resource: #help>
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   114
17894
58b0ce702eb0 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17856
diff changeset
   115
    ^ super helpSpec addPairsFrom:#(
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   116
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   117
#contentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   118
'Search for files containing this. Can be matchPatterns, separated by ";".\If search for binary contents is checked, this should be a sequence of hex bytes (i.e. xx xx xx...)'
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   119
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   120
#namePattern
17709
c5dcf0baef9a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17368
diff changeset
   121
'Filename(s) to search for. Can be matchPatterns, separated by ";".\(eg. "*.c ; *.h" searches for C and header files. So does "*.[ch]")'
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   122
11122
Claus Gittinger <cg@exept.de>
parents: 11117
diff changeset
   123
#excludedNamePattern
Claus Gittinger <cg@exept.de>
parents: 11117
diff changeset
   124
'Filename(s) to skip. Can be matchPatterns, separated by ";"'
Claus Gittinger <cg@exept.de>
parents: 11117
diff changeset
   125
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   126
#notContentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   127
'Search for files NOT containing this. Can be matchPatterns, separated by ";".\If search for binary contents is checked, this should be a sequence of hex bytes (i.e. xx xx xx...)'
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   128
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   129
#searchDirectory
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   130
'Folder, where the search starts'
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   131
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   132
#searchForBinaryContents
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   133
'Included/Not included patterns are given as a sequence of hex bytes instead of character sequences (eg. xx xx xx...)'
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   134
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   135
#searchRecursive
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   136
'Recursively search in sub-folders'
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   137
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   138
#ignoreCase
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   139
'Ignore upper/lowercase differences (be case-insensitive)'
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   140
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   141
#sameContents
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   142
'Search for files with same contents as the other file'
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   143
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   144
#fileSize
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
   145
'Search for files with a specific size constraint ("~" means: +/- 10%)'
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   146
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
   147
#modificationTime
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
   148
'Search for files which are newer or older'
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   149
)
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
   150
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   151
    "Modified: / 12-11-2017 / 17:53:35 / cg"
9408
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   152
! !
173aa5a55022 active help
Claus Gittinger <cg@exept.de>
parents: 9400
diff changeset
   153
8330
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   154
!FindFileApplication class methodsFor:'history'!
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   155
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   156
addToSearchStringHistory:aString
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   157
    self searchStringHistory 
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   158
        remove:aString ifAbsent:[];
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   159
        addFirst:aString.
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   160
    self searchStringHistory size > 25 ifTrue:[
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   161
        self searchStringHistory removeLast
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   162
    ].
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   163
!
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   164
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   165
searchStringHistory
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   166
    SearchStringHistory isNil ifTrue:[
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   167
        SearchStringHistory := OrderedCollection new 
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   168
    ].
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   169
    ^ SearchStringHistory
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   170
! !
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   171
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   172
!FindFileApplication class methodsFor:'interface specs'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   173
321c1729db5b initial checkin
penk
parents:
diff changeset
   174
windowSpec
321c1729db5b initial checkin
penk
parents:
diff changeset
   175
    "This resource specification was automatically generated
321c1729db5b initial checkin
penk
parents:
diff changeset
   176
     by the UIPainter of ST/X."
321c1729db5b initial checkin
penk
parents:
diff changeset
   177
321c1729db5b initial checkin
penk
parents:
diff changeset
   178
    "Do not manually edit this!! If it is corrupted,
321c1729db5b initial checkin
penk
parents:
diff changeset
   179
     the UIPainter may not be able to read the specification."
321c1729db5b initial checkin
penk
parents:
diff changeset
   180
321c1729db5b initial checkin
penk
parents:
diff changeset
   181
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   182
     UIPainter new openOnClass:FindFileApplication andSelector:#windowSpec
321c1729db5b initial checkin
penk
parents:
diff changeset
   183
     FindFileApplication new openInterface:#windowSpec
321c1729db5b initial checkin
penk
parents:
diff changeset
   184
     FindFileApplication open
321c1729db5b initial checkin
penk
parents:
diff changeset
   185
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   186
321c1729db5b initial checkin
penk
parents:
diff changeset
   187
    <resource: #canvas>
321c1729db5b initial checkin
penk
parents:
diff changeset
   188
321c1729db5b initial checkin
penk
parents:
diff changeset
   189
    ^ 
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   190
    #(FullSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   191
       name: windowSpec
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   192
       uuid: '79f42116-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   193
       window: 
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   194
      (WindowSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   195
         label: 'File Search'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   196
         name: 'File Search'
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   197
         uuid: '79f4341c-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   198
         min: (Point 377 131)
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   199
         bounds: (Rectangle 0 0 759 420)
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   200
       )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   201
       component: 
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   202
      (SpecCollection
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   203
         collection: (
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   204
          (MenuPanelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   205
             name: 'ToolBar1'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   206
             layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   207
             uuid: '79f4376e-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   208
             level: 0
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   209
             menu: searchMenu
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   210
             textDefault: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   211
           )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   212
          (ProgressIndicatorSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   213
             name: 'ProgressIndicator1'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   214
             layout: (LayoutFrame 125 0 11 0 231 0 21 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   215
             uuid: '79f43a48-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   216
             visibilityChannel: enableStop
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   217
             backgroundColor: (Color 0.0 67.0 67.0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   218
             showPercentage: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   219
             isActivityIndicator: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   220
           )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   221
          (ViewSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   222
             name: 'Box1'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   223
             layout: (LayoutFrame 0 0.0 32 0 0 1.0 231 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   224
             uuid: '79f43caa-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   225
             component: 
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   226
            (SpecCollection
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   227
               collection: (
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   228
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   229
                   label: 'Directory:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   230
                   name: 'DirectoryLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   231
                   layout: (LayoutFrame 2 0 7 0 180 0 24 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   232
                   activeHelpKey: searchDirectory
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   233
                   uuid: '79f43e3a-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   234
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   235
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   236
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   237
                (FilenameInputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   238
                   name: 'DirectoryEntryField'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   239
                   layout: (LayoutFrame 180 0 4 0 -350 1 24 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   240
                   activeHelpKey: searchDirectory
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   241
                   uuid: '79f44056-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   242
                   model: searchDirectoryHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   243
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   244
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   245
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   246
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   247
                   label: 'Search Files Named:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   248
                   name: 'FileNameLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   249
                   layout: (LayoutFrame 2 0 31 0 180 0 48 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   250
                   activeHelpKey: namePattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   251
                   uuid: '79f4433a-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   252
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   253
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   254
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   255
                (InputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   256
                   name: 'FileNameEntryField'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   257
                   layout: (LayoutFrame 180 0 28 0 -350 1 48 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   258
                   activeHelpKey: namePattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   259
                   uuid: '79f444b6-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   260
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   261
                   model: namePatternHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   262
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   263
                   acceptOnLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   264
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   265
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   266
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   267
                   label: 'But not Named:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   268
                   name: 'Label1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   269
                   layout: (LayoutFrame 2 0 55 0 180 0 72 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   270
                   activeHelpKey: excludedNamePattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   271
                   uuid: '79f44704-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   272
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   273
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   274
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   275
                (InputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   276
                   name: 'EntryField1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   277
                   layout: (LayoutFrame 180 0 52 0 -350 1 72 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   278
                   activeHelpKey: excludedNamePattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   279
                   uuid: '79f44880-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   280
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   281
                   model: excludedNamePatternHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   282
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   283
                   acceptOnLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   284
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   285
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   286
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   287
                   label: 'Containing:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   288
                   name: 'ContentsLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   289
                   layout: (LayoutFrame 2 0 79 0 180 0 96 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   290
                   activeHelpKey: contentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   291
                   uuid: '79f44a88-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   292
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   293
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   294
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   295
                (ComboBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   296
                   name: 'ComboBox1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   297
                   layout: (LayoutFrame 180 0 76 0 -350 1 96 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   298
                   activeHelpKey: contentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   299
                   uuid: '79f44bfa-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   300
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   301
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   302
                   model: contentsPatternHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   303
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   304
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   305
                   comboList: searchStringHistory
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   306
                   useIndex: false
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   307
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   308
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   309
                   label: 'Not Containing:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   310
                   name: 'NotContentsLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   311
                   layout: (LayoutFrame 2 0 103 0 180 0 120 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   312
                   activeHelpKey: notContentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   313
                   uuid: '79f44ea2-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   314
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   315
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   316
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   317
                (InputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   318
                   name: 'NotContentsEntryField'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   319
                   layout: (LayoutFrame 180 0 100 0 -350 1 120 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   320
                   activeHelpKey: notContentsPattern
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   321
                   uuid: '79f4500a-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   322
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   323
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   324
                   model: notContentsPatternHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   325
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   326
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   327
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   328
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   329
                   label: 'Same Contents As:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   330
                   name: 'SameContentsAsLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   331
                   layout: (LayoutFrame 2 0 127 0 180 0 144 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   332
                   activeHelpKey: sameContents
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   333
                   uuid: '79f45208-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   334
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   335
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   336
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   337
                (InputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   338
                   name: 'SameContentsAsEntryField'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   339
                   layout: (LayoutFrame 180 0 124 0 -367 1 144 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   340
                   activeHelpKey: sameContents
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   341
                   uuid: '79f45370-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   342
                   enableChannel: searchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   343
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   344
                   model: sameContentsAsHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   345
                   immediateAccept: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   346
                   acceptOnPointerLeave: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   347
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   348
                (CheckToggleSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   349
                   name: 'EnableSameContentsCheckToggle'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   350
                   layout: (LayoutOrigin -366 1 128 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   351
                   activeHelpKey: sameContents
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   352
                   uuid: '79f45582-c7c7-11e7-82f7-c42c033b4871'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   353
                   translateLabel: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   354
                   model: searchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   355
                   isTriggerOnDown: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   356
                   showLamp: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   357
                   lampColor: (Color 100.0 100.0 0.0)
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   358
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   359
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   360
                   label: 'File Size:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   361
                   name: 'FileSizeLabel'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   362
                   layout: (LayoutFrame 2 0 151 0 180 0 168 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   363
                   activeHelpKey: fileSize
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   364
                   uuid: '79f458c0-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   365
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   366
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   367
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   368
                (PopUpListSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   369
                   label: 'PopUp List'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   370
                   name: 'FileSizeOperatorPopUpList'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   371
                   layout: (LayoutFrame 180 0 148 0 260 0 168 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   372
                   activeHelpKey: fileSize
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   373
                   uuid: '79f45a64-c7c7-11e7-82f7-c42c033b4871'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   374
                   translateLabel: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   375
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   376
                   model: fileSizeOperatorHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   377
                   enableChannel: enableFileSizeFilterAndNotSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   378
                   menu: 
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   379
                  (Array
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   380
                     ' >' ' < '
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   381
                     ' !!= ' ' = '
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   382
                     ' ~ '
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   383
                   )
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   384
                 )
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   385
                (InputFieldSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   386
                   name: 'FileSizeEntryField'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   387
                   layout: (LayoutFrame 260 0 148 0 -367 1 168 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   388
                   activeHelpKey: fileSize
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   389
                   uuid: '79f45cda-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   390
                   enableChannel: enableFileSizeFilterAndNotSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   391
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   392
                   model: fileSizeHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   393
                   type: fileSize
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   394
                   immediateAccept: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   395
                   acceptOnLeave: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   396
                   acceptOnLostFocus: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   397
                   acceptOnPointerLeave: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   398
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   399
                (CheckToggleSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   400
                   name: 'EnableSizeCheckToggle'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   401
                   layout: (LayoutOrigin -366 1 151 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   402
                   activeHelpKey: fileSize
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   403
                   uuid: '79f45f0a-c7c7-11e7-82f7-c42c033b4871'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   404
                   translateLabel: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   405
                   model: enableFileSizeFilter
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   406
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   407
                   isTriggerOnDown: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   408
                   showLamp: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   409
                   lampColor: (Color 100.0 100.0 0.0)
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   410
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   411
                (LabelSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   412
                   label: 'Modified:'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   413
                   name: 'Label2'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   414
                   layout: (LayoutFrame 2 0 175 0 180 0 192 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   415
                   activeHelpKey: modificationTime
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   416
                   uuid: '79f46130-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   417
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   418
                   adjust: right
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   419
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   420
                (PopUpListSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   421
                   label: 'PopUp List'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   422
                   name: 'PopUpList1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   423
                   layout: (LayoutFrame 180 0 172 0 260 0 192 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   424
                   activeHelpKey: modificationTime
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   425
                   uuid: '79f462b6-c7c7-11e7-82f7-c42c033b4871'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   426
                   translateLabel: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   427
                   tabable: true
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   428
                   model: modificationTimeOperatorIndexHolder
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   429
                   enableChannel: enableModificationTimeFilter
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   430
                   menu: modificationTimeOperatorLabelList
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   431
                   useIndex: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   432
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   433
                (InputFieldSpec
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   434
                   name: 'ModifiedEntryField'
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   435
                   layout: (LayoutFrame 260 0 172 0 -367 1 192 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   436
                   activeHelpKey: modificationTime
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   437
                   uuid: '79f46478-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   438
                   enableChannel: enableModificationTimeFilter
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   439
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   440
                   model: modificationTimeHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   441
                   type: timestamp
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   442
                   immediateAccept: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   443
                   acceptOnLeave: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   444
                   acceptOnLostFocus: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   445
                   acceptOnPointerLeave: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   446
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   447
                (CheckToggleSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   448
                   name: 'CheckToggle1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   449
                   layout: (LayoutOrigin -366 1 175 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   450
                   activeHelpKey: modificationTime
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   451
                   uuid: '79f4668a-c7c7-11e7-82f7-c42c033b4871'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   452
                   translateLabel: true
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   453
                   model: enableModificationTimeFilter
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   454
                   isTriggerOnDown: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   455
                   showLamp: false
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   456
                   lampColor: (Color 100.0 100.0 0.0)
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   457
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   458
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   459
                   label: 'Use ''locate'' Cmd'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   460
                   name: 'UseLocateCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   461
                   layout: (LayoutFrame -350 1 5 0 -167 1 28 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   462
                   activeHelpKey: useLocate
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   463
                   uuid: '79f4689c-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   464
                   visibilityChannel: canUseLocate
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   465
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   466
                   model: useLocate
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   467
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   468
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   469
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   470
                   label: 'Recursive'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   471
                   name: 'RecursiveSearchCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   472
                   layout: (LayoutFrame -200 1 5 0 -4 1 28 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   473
                   activeHelpKey: recursiveSearch
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   474
                   uuid: '79f46aa4-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   475
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   476
                   model: searchRecursively
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   477
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   478
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   479
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   480
                   label: 'Directories'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   481
                   name: 'SearchDirectoriesCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   482
                   layout: (LayoutFrame -350 1 29 0 -167 1 52 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   483
                   uuid: '79f46c16-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   484
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   485
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   486
                   model: searchDirectories
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   487
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   488
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   489
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   490
                   label: 'Ignore Case'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   491
                   name: 'IgnoreCaseInNameCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   492
                   layout: (LayoutFrame -200 1 29 0 -4 1 52 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   493
                   activeHelpKey: ignoreCase
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   494
                   uuid: '79f46d7e-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   495
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   496
                   model: ignoreCaseInName
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   497
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   498
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   499
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   500
                   label: 'Ignore Case'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   501
                   name: 'CheckBox1'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   502
                   layout: (LayoutFrame -200 1 53 0 -4 1 76 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   503
                   activeHelpKey: ignoreCase
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   504
                   uuid: '79f46edc-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   505
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   506
                   model: ignoreCaseInExcludedName
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   507
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   508
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   509
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   510
                   label: 'Use ''grep'' Cmd'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   511
                   name: 'UseGrepCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   512
                   layout: (LayoutFrame -350 1 77 0 -167 1 100 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   513
                   uuid: '79f4703a-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   514
                   visibilityChannel: canUseGrep
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   515
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   516
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   517
                   model: useGrep
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   518
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   519
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   520
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   521
                   label: 'Ignore Case'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   522
                   name: 'IgnoreCaseInContentsCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   523
                   layout: (LayoutFrame -200 1 77 0 -4 1 100 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   524
                   activeHelpKey: ignoreCase
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   525
                   uuid: '79f47198-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   526
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   527
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   528
                   model: ignoreCaseInContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   529
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   530
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   531
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   532
                   label: 'Ignore Case'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   533
                   name: 'IgnoreCaseInNotContentsCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   534
                   layout: (LayoutFrame -200 1 101 0 -4 1 124 0)
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   535
                   activeHelpKey: ignoreCase
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   536
                   uuid: '79f472f6-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   537
                   enableChannel: notSearchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   538
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   539
                   model: ignoreCaseInNotContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   540
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   541
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   542
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   543
                   label: 'Cache Info'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   544
                   name: 'RememberInCacheCheckBox'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   545
                   layout: (LayoutFrame -350 1 125 0 -167 1 148 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   546
                   uuid: '79f47454-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   547
                   visibilityChannel: canUseGrep
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   548
                   enableChannel: searchForSameContents
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   549
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   550
                   model: rememberInCache
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   551
                   translateLabel: true
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   552
                   activeHelpKey: rememberInCache
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   553
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   554
                (ActionButtonSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   555
                   label: 'Clear Cache'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   556
                   name: 'ClearCacheButton'
16965
d39ebfdb101d #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16826
diff changeset
   557
                   layout: (LayoutFrame -169 1 125 0 -21 1 147 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   558
                   uuid: '79f475b2-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   559
                   translateLabel: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   560
                   model: clearCache
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   561
                   activeHelpKey: clearCache
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   562
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   563
                (CheckBoxSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   564
                   label: 'Show Unreadable Files and Folders'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   565
                   name: 'CheckBox2'
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   566
                   layout: (LayoutFrame -350 1 149 0 0 1 172 0)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   567
                   uuid: '79f477b0-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   568
                   tabable: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   569
                   model: showUnreadableFilesAndDirectoriesHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   570
                   translateLabel: true
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   571
                   activeHelpKey: showUnreadableFilesAndDirectories
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   572
                 )
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   573
                (CheckBoxSpec
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   574
                   label: 'Search for Binary Contents'
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   575
                   name: 'CheckBox3'
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   576
                   layout: (LayoutFrame -350 1 173 0 0 1 196 0)
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   577
                   uuid: '79f47918-c7c7-11e7-82f7-c42c033b4871'
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   578
                   tabable: true
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   579
                   model: searchForBinaryContentsHolder
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   580
                   translateLabel: true
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   581
                   activeHelpKey: searchForBinaryContents
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   582
                 )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   583
                )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   584
              
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   585
             )
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   586
           )
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   587
          (SequenceViewSpec
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   588
             name: 'List1'
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   589
             layout: (LayoutFrame 0 0.0 238 0 0 1.0 0 1)
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   590
             uuid: '79f47abc-c7c7-11e7-82f7-c42c033b4871'
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   591
             model: selectionHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   592
             menu: menu
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   593
             hasHorizontalScrollBar: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   594
             hasVerticalScrollBar: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   595
             isMultiSelect: true
18987
14868cd41569 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 18877
diff changeset
   596
             doubleClickSelector: fileListDoubleClick:
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   597
             valueChangeSelector: fileSelected:
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   598
             useIndex: true
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   599
             sequenceList: shownListHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   600
             properties: 
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   601
            (PropertyListDictionary
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   602
               dropObjectSelector: getDropObjects:
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   603
               displayObjectSelector: getDisplayObjects:
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   604
               startDragSelector: doStartDrag:in:
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   605
               dragArgument: findFileList
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   606
             )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   607
           )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   608
          )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   609
        
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   610
       )
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   611
     )
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
   612
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
   613
    "Modified: / 12-11-2017 / 17:37:30 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   614
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   615
321c1729db5b initial checkin
penk
parents:
diff changeset
   616
!FindFileApplication class methodsFor:'menu specs'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   617
321c1729db5b initial checkin
penk
parents:
diff changeset
   618
menu
321c1729db5b initial checkin
penk
parents:
diff changeset
   619
    "This resource specification was automatically generated
321c1729db5b initial checkin
penk
parents:
diff changeset
   620
     by the MenuEditor of ST/X."
321c1729db5b initial checkin
penk
parents:
diff changeset
   621
321c1729db5b initial checkin
penk
parents:
diff changeset
   622
    "Do not manually edit this!! If it is corrupted,
321c1729db5b initial checkin
penk
parents:
diff changeset
   623
     the MenuEditor may not be able to read the specification."
321c1729db5b initial checkin
penk
parents:
diff changeset
   624
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   625
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   626
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   627
     MenuEditor new openOnClass:FindFileApplication andSelector:#menu
321c1729db5b initial checkin
penk
parents:
diff changeset
   628
     (Menu new fromLiteralArrayEncoding:(FindFileApplication menu)) startUp
321c1729db5b initial checkin
penk
parents:
diff changeset
   629
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   630
321c1729db5b initial checkin
penk
parents:
diff changeset
   631
    <resource: #menu>
321c1729db5b initial checkin
penk
parents:
diff changeset
   632
321c1729db5b initial checkin
penk
parents:
diff changeset
   633
    ^ 
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   634
     #(Menu
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   635
        (
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   636
         (MenuItem
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   637
            enabled: hasOneFileSelected
7323
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
   638
            label: 'Open in New File Browser'
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
   639
            itemValue: openInNewBrowser
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
   640
          )
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
   641
         (MenuItem
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
   642
            enabled: hasOneFileSelected
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   643
            label: 'Select in Browser'
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   644
            itemValue: selectInBrowser
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   645
            isVisible: isEmbeddedApplication
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   646
          )
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   647
         (MenuItem
6158
823812e0c7ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6154
diff changeset
   648
            label: 'Autoselect in Browser'
823812e0c7ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6154
diff changeset
   649
            indication: autoSelectInBrowserHolder
823812e0c7ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6154
diff changeset
   650
          )
823812e0c7ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6154
diff changeset
   651
         (MenuItem
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   652
            label: '-'
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   653
          )
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   654
         (MenuItem
8613
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   655
            enabled: hasOneFileSelected
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   656
            label: 'FileIn'
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   657
            itemValue: fileInInBrowser
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   658
          )
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   659
         (MenuItem
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   660
            label: '-'
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   661
          )
6c82076a9cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8330
diff changeset
   662
         (MenuItem
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   663
            enabled: hasSelectionInResultList
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   664
            label: 'Copy Selected Filenames to Clipboard'
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   665
            itemValue: copySelectedFileNamesToClipboard
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   666
          )
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   667
         (MenuItem
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   668
            label: '-'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   669
          )
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   670
         (MenuItem
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   671
            enabled: hasSelection
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   672
            label: 'Delete Selected File(s)...'
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   673
            itemValue: deleteSelectedFiles
12494
dd5b8035d104 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12425
diff changeset
   674
          )
dd5b8035d104 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12425
diff changeset
   675
         (MenuItem
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   676
            enabled: hasListEntries
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   677
            label: 'Delete all Files...'
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   678
            itemValue: deleteAllFiles
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   679
            isVisible: false
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   680
          )
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   681
         (MenuItem
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   682
            label: '-'
16826
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   683
          )
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   684
         (MenuItem
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   685
            enabled: hasSelection
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   686
            label: 'Touch Selected File(s)...'
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   687
            itemValue: touchSelectedFiles
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   688
          )
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   689
         (MenuItem
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   690
            enabled: hasListEntries
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   691
            label: 'Touch all Files...'
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   692
            itemValue: touchAllFiles
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   693
            isVisible: false
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   694
          )
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   695
         (MenuItem
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
   696
            label: '-'
12778
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   697
            isVisible: cvsMenusAreShown
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   698
          )
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   699
         (MenuItem
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   700
            enabled: hasSelection
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   701
            label: 'Commit Selected File(s) to CVS...'
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   702
            itemValue: commitSelectedFilesToCVS
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   703
            isVisible: cvsMenusAreShown
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   704
          )
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   705
         (MenuItem
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   706
            enabled: hasSelection
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   707
            label: 'Delete Selected File(s) and CVS Container(s)...'
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   708
            itemValue: deleteSelectedFilesAndCVSContainers
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   709
            isVisible: cvsMenusAreShown
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   710
          )
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   711
         (MenuItem
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
   712
            label: '-'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   713
          )
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   714
         (MenuItem
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   715
            enabled: hasSelection
5767
2cc71e97ef70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5766
diff changeset
   716
            label: 'Remove Selected from Resultlist'
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   717
            itemValue: removeSelectedFilesFromResultList
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   718
          )
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   719
         (MenuItem
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   720
            enabled: hasListEntries
7691
6ff02cb42c55 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7688
diff changeset
   721
            label: 'Clear Resultlist'
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   722
            itemValue: clearResultList
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   723
          )
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   724
         (MenuItem
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   725
            label: '-'
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   726
          )
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   727
         (MenuItem
7691
6ff02cb42c55 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7688
diff changeset
   728
            label: 'Show Matched Files (After SameContents-Search)'
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   729
            itemValue: showMatchedFiles:
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   730
            isVisible: notShowingMatchedFiles
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   731
            argument: true
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   732
          )
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   733
         (MenuItem
7691
6ff02cb42c55 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7688
diff changeset
   734
            label: 'Show Matching Files (After SameContents-Search)'
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   735
            itemValue: showMatchedFiles:
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   736
            isVisible: showingMatchedFiles
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   737
            argument: false
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   738
          )
15214
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   739
         (MenuItem
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   740
            enabled: hasTwoFilesSelected
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   741
            label: 'Compare with Each Other'
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   742
            itemValue: doCompareTwoFiles
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   743
            argument: false
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   744
          )
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   745
         )
321c1729db5b initial checkin
penk
parents:
diff changeset
   746
        nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   747
        nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   748
      )
321c1729db5b initial checkin
penk
parents:
diff changeset
   749
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   750
321c1729db5b initial checkin
penk
parents:
diff changeset
   751
searchMenu
321c1729db5b initial checkin
penk
parents:
diff changeset
   752
    "This resource specification was automatically generated
321c1729db5b initial checkin
penk
parents:
diff changeset
   753
     by the MenuEditor of ST/X."
321c1729db5b initial checkin
penk
parents:
diff changeset
   754
321c1729db5b initial checkin
penk
parents:
diff changeset
   755
    "Do not manually edit this!! If it is corrupted,
321c1729db5b initial checkin
penk
parents:
diff changeset
   756
     the MenuEditor may not be able to read the specification."
321c1729db5b initial checkin
penk
parents:
diff changeset
   757
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   758
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   759
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   760
     MenuEditor new openOnClass:FindFileApplication andSelector:#searchMenu
321c1729db5b initial checkin
penk
parents:
diff changeset
   761
     (Menu new fromLiteralArrayEncoding:(FindFileApplication searchMenu)) startUp
321c1729db5b initial checkin
penk
parents:
diff changeset
   762
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   763
321c1729db5b initial checkin
penk
parents:
diff changeset
   764
    <resource: #menu>
321c1729db5b initial checkin
penk
parents:
diff changeset
   765
321c1729db5b initial checkin
penk
parents:
diff changeset
   766
    ^ 
7574
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   767
     #(Menu
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   768
        (
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   769
         (MenuItem
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   770
            label: 'Search'
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   771
            itemValue: doSearch
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   772
            translateLabel: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   773
            isButton: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   774
            labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   775
          )
7574
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   776
         (MenuItem
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   777
            enabled: enableStop
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   778
            label: 'Stop'
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   779
            itemValue: stop
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   780
            translateLabel: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   781
            isButton: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   782
            isVisible: enableStop
19417
2f5d4b7bc507 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19399
diff changeset
   783
            labelImage: (ResourceRetriever ToolbarIconLibrary stop22x22Icon)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   784
          )
7574
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   785
         (MenuItem
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   786
            label: 'Close'
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   787
            itemValue: doClose
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   788
            translateLabel: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   789
            isButton: true
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   790
            startGroup: right
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   791
            isVisible: false
7574
097a6513da1e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7323
diff changeset
   792
            labelImage: (ResourceRetriever ToolbarIconLibrary removeTabIcon)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   793
          )
321c1729db5b initial checkin
penk
parents:
diff changeset
   794
         )
321c1729db5b initial checkin
penk
parents:
diff changeset
   795
        nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   796
        nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   797
      )
321c1729db5b initial checkin
penk
parents:
diff changeset
   798
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   799
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   800
!FindFileApplication class methodsFor:'startup & release'!
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   801
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   802
releaseContentsInfoCache
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   803
    ContentsInfoCache := ContentsInfoCacheAccessLock := nil.
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   804
! !
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   805
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   806
!FindFileApplication class methodsFor:'tableColumns specs'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   807
321c1729db5b initial checkin
penk
parents:
diff changeset
   808
searchResultTable
321c1729db5b initial checkin
penk
parents:
diff changeset
   809
    "This resource specification was automatically generated
321c1729db5b initial checkin
penk
parents:
diff changeset
   810
     by the DataSetBuilder of ST/X."
321c1729db5b initial checkin
penk
parents:
diff changeset
   811
321c1729db5b initial checkin
penk
parents:
diff changeset
   812
    "Do not manually edit this!! If it is corrupted,
321c1729db5b initial checkin
penk
parents:
diff changeset
   813
     the DataSetBuilder may not be able to read the specification."
321c1729db5b initial checkin
penk
parents:
diff changeset
   814
321c1729db5b initial checkin
penk
parents:
diff changeset
   815
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   816
     DataSetBuilder new openOnClass:FindFileApplication andSelector:#searchResultTable
321c1729db5b initial checkin
penk
parents:
diff changeset
   817
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
   818
321c1729db5b initial checkin
penk
parents:
diff changeset
   819
    <resource: #tableColumns>
321c1729db5b initial checkin
penk
parents:
diff changeset
   820
321c1729db5b initial checkin
penk
parents:
diff changeset
   821
    ^#(
6583
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   822
      (DataSetColumnSpec
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   823
         label: 'Filename'
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   824
         id: 'FileName'
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   825
         labelButtonType: Button
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   826
         model: fileName
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   827
         showRowSeparator: false
2652ac4ca0ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
   828
         showColSeparator: false
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   829
       )
321c1729db5b initial checkin
penk
parents:
diff changeset
   830
      )
321c1729db5b initial checkin
penk
parents:
diff changeset
   831
    
321c1729db5b initial checkin
penk
parents:
diff changeset
   832
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   833
321c1729db5b initial checkin
penk
parents:
diff changeset
   834
!FindFileApplication methodsFor:'actions'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   835
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
   836
clearCache
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
   837
    contentsInfoCache := nil
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
   838
!
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
   839
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   840
clearResultList
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   841
    self resultList removeAll.
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   842
    self matchedFilesList removeAll.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   843
!
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
   844
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   845
deleteAllFiles
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   846
    |files|
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   847
5864
0338587f079e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5860
diff changeset
   848
    files := self shownList copy.
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   849
    self deleteFiles:files confirm:true.
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   850
    self removeFilesFromResultList:files
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   851
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   852
    "Modified: / 29-03-2012 / 10:06:09 / cg"
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   853
!
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   854
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   855
deleteFiles:colOfFiles confirm:confirm
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   856
    "delete current selected files/directories
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   857
    "
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   858
    |delete result|
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   859
6832
c69c570a3ec7 wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6822
diff changeset
   860
"/    self windowGroup withWaitCursorDo:[
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5866
diff changeset
   861
        delete := FileOperation deleteFiles:(colOfFiles asSet) confirm:confirm.
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   862
        result := delete result.
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   863
        result notNil ifTrue:[
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   864
            result ifFalse:[
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   865
                self notify:delete errorString.
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   866
            ] ifTrue:[
5769
c7f4f5fc96e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5768
diff changeset
   867
"/                masterApplication notNil ifTrue:[
c7f4f5fc96e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5768
diff changeset
   868
"/                    masterApplication updateListAfterDelete:colOfFiles.
c7f4f5fc96e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5768
diff changeset
   869
"/                ]
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   870
            ]
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   871
        ].
6832
c69c570a3ec7 wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6822
diff changeset
   872
"/    ].
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   873
    ^ result.
6832
c69c570a3ec7 wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6822
diff changeset
   874
c69c570a3ec7 wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6822
diff changeset
   875
    "Modified: / 25-07-2006 / 09:11:09 / cg"
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   876
!
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   877
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   878
deleteSelectedFiles
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
   879
    |sel files result|
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   880
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   881
    sel := self selectionHolder value.
6109
aed06872e73e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6107
diff changeset
   882
    sel isEmptyOrNil ifTrue:[^ self].
aed06872e73e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6107
diff changeset
   883
5864
0338587f079e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5860
diff changeset
   884
    files := sel collect:[:idx | self shownList at:idx].
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   885
    self deleteFiles:files confirm:true.
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
   886
    result == true ifTrue:[
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   887
        self removeFilesFromResultList:files
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
   888
    ].
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   889
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
   890
    "Modified: / 29-03-2012 / 10:05:39 / cg"
5766
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   891
!
97f7422b1ea6 +deleteFiles
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   892
15214
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   893
doCompareTwoFiles
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   894
    |sel entry1 entry2|
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   895
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   896
    sel := self selectionHolder value.
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   897
    sel size == 2 ifFalse:[^ self].
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   898
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   899
    entry1 := self shownList at:sel first.
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   900
    (entry1 := entry1 asFilename) exists ifFalse:[
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   901
        self warn:'Oops - file is gone: ',entry1 pathName
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   902
    ].
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   903
    entry2 := self shownList at:sel second.
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   904
    (entry2 := entry2 asFilename) exists ifFalse:[
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   905
        self warn:'Oops - file is gone: ',entry2 pathName
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   906
    ].
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   907
    masterApplication openDiffViewOn:entry1 and:entry2
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   908
!
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
   909
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   910
doSearch
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   911
    |namePatterns excludedNamePatterns contentsPattern notContentsPattern 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   912
     dir dirs fn fileToCompareAgainst ignoreCaseInName ignoreCaseInExcludedName 
11423
ba26e541c690 changed: #doSearch
Claus Gittinger <cg@exept.de>
parents: 11122
diff changeset
   913
     ignoreCaseInContents ignoreCaseInNotContents|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   914
321c1729db5b initial checkin
penk
parents:
diff changeset
   915
"/    self changeExtentToSeeSearchResult.
321c1729db5b initial checkin
penk
parents:
diff changeset
   916
321c1729db5b initial checkin
penk
parents:
diff changeset
   917
    dir := self searchDirectoryHolder value.
321c1729db5b initial checkin
penk
parents:
diff changeset
   918
    dir isNil ifTrue:[
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   919
        Dialog warn:(resources string:'Missing directory name').
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   920
        ^ self.
321c1729db5b initial checkin
penk
parents:
diff changeset
   921
    ].
16608
1edaaaaa88e1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16574
diff changeset
   922
    dir asString includesMatchCharacters ifTrue:[
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   923
        dirs := Filename filesMatchingGLOB:dir.
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   924
        dirs isEmpty ifTrue:[
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   925
            Dialog warn:(resources string:'No matching directory: ''%1''' with:dir allBold).
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   926
            ^ self.
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   927
        ].    
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   928
    ] ifFalse:[    
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   929
        dir asFilename exists ifFalse:[
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   930
            Dialog warn:(resources string:'No such directory: ''%1''' with:dir allBold).
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   931
            ^ self.
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   932
        ].
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   933
        dirs := { dir }
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   934
    ].
6442
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
   935
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
   936
    LastShowUnreadableFilesAndDirectories := showUnreadableFilesAndDirectoriesHolder value.
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   937
    LastSearchIgnoredCaseInFilename := ignoreCaseInName := self ignoreCaseInName value.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   938
    LastSearchIgnoredCaseInExcludedFilename := ignoreCaseInExcludedName := self ignoreCaseInExcludedName value.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   939
    LastSearchIgnoredCaseInContents := ignoreCaseInContents := self ignoreCaseInContents value.
11423
ba26e541c690 changed: #doSearch
Claus Gittinger <cg@exept.de>
parents: 11122
diff changeset
   940
    ignoreCaseInNotContents := self ignoreCaseInNotContents value.
6442
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
   941
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   942
    self stopSearchTaskOrAbort.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   943
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   944
    namePatterns := self namePatternsFor:(self namePatternHolder value) ignoringCase:ignoreCaseInName.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   945
    excludedNamePatterns := self namePatternsFor:(self excludedNamePatternHolder value) ignoringCase:ignoreCaseInExcludedName.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   946
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   947
    contentsPattern := self contentsPatternHolder value.
321c1729db5b initial checkin
penk
parents:
diff changeset
   948
    contentsPattern size == 0 ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   949
        contentsPattern := nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   950
    ] ifFalse:[
8330
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   951
        self class addToSearchStringHistory:contentsPattern.
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
   952
        ignoreCaseInContents ifTrue:[
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   953
            contentsPattern := contentsPattern asLowercase
8330
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
   954
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   955
    ].
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   956
    notContentsPattern := self notContentsPatternHolder value.
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   957
    notContentsPattern size == 0 ifTrue:[
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   958
        notContentsPattern := nil
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   959
    ] ifFalse:[
11423
ba26e541c690 changed: #doSearch
Claus Gittinger <cg@exept.de>
parents: 11122
diff changeset
   960
        ignoreCaseInNotContents ifTrue:[
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   961
            notContentsPattern := notContentsPattern asLowercase
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   962
        ]
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
   963
    ].
5787
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   964
    searchForSameContents value ifTrue:[
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   965
        fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators.
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   966
        fileToCompareAgainst isEmpty ifTrue:[
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   967
            fileToCompareAgainst := nil.
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   968
        ] ifFalse:[
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   969
            fileToCompareAgainst includesMatchCharacters ifFalse:[
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   970
                (fn := fileToCompareAgainst asFilename) exists ifFalse:[
18877
f8d374955b51 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18709
diff changeset
   971
                    Dialog warn:'No such file: %1' with:fileToCompareAgainst allBold.
5787
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   972
                    ^ self.
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   973
                ].
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   974
                fn isReadable ifFalse:[
18877
f8d374955b51 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18709
diff changeset
   975
                    Dialog warn:'Cannot read: %1' with:fileToCompareAgainst allBold.
5787
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   976
                    ^ self.
7afc10d73559 search fix
Claus Gittinger <cg@exept.de>
parents: 5786
diff changeset
   977
                ]
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
   978
            ].
5726
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
   979
        ].
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
   980
    ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
   981
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   982
    self 
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   983
        startSearchTask:[
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   984
            self changeInformationTo:'Find File ' , '- searching ' toTab:true.
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   985
            self 
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   986
                doFindFileNamed:namePatterns
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   987
                directories:(self searchDirectories value)
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   988
                ignoreCaseInName:ignoreCaseInName
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   989
                excludeFilesNamed:excludedNamePatterns
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   990
                ignoreCaseInExcludedName:ignoreCaseInExcludedName
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   991
                containingString:contentsPattern
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   992
                ignoreCaseInContents:ignoreCaseInContents
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   993
                notContainingString:notContentsPattern
11423
ba26e541c690 changed: #doSearch
Claus Gittinger <cg@exept.de>
parents: 11122
diff changeset
   994
                ignoreCaseInNotContents:ignoreCaseInNotContents
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   995
                sameContentsAsFile:fileToCompareAgainst  
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   996
                sameContentsAs:nil 
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
   997
                in:dirs.
5770
2b3f1705ed84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5769
diff changeset
   998
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
   999
        ]
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1000
        name:('FindFile[', dir asFilename baseName, ']')
5770
2b3f1705ed84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5769
diff changeset
  1001
11423
ba26e541c690 changed: #doSearch
Claus Gittinger <cg@exept.de>
parents: 11122
diff changeset
  1002
    "Modified: / 16-03-2012 / 09:37:13 / cg"
18877
f8d374955b51 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18709
diff changeset
  1003
    "Modified: / 10-07-2019 / 18:26:13 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1004
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1005
7323
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1006
fileInInBrowser
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1007
    |sel entry application|
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1008
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1009
    sel := self selectionHolder value.
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1010
    (sel notEmptyOrNil) ifTrue:[
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1011
        entry := self shownList at:sel first.
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1012
        entry asFilename exists ifFalse:[ ^ self].
15214
f00b3fcd0a60 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15105
diff changeset
  1013
7323
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1014
        application := targetApplication ? self masterApplication.
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1015
        application notNil ifTrue:[
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1016
            application fileIn:(entry asFilename).
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1017
        ].
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1018
    ].
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1019
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1020
    "Created: / 20-09-2006 / 14:30:37 / cg"
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1021
!
54d7a46631e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6832
diff changeset
  1022
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1023
namePatternsFor:namePatternArg ignoringCase:ignoringCase
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1024
    |namePattern|
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1025
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1026
    namePattern := namePatternArg.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1027
    namePattern size == 0 ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1028
        ^ nil
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1029
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1030
    ignoringCase ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1031
        namePattern := namePattern asLowercase
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1032
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1033
    ^ (namePattern asCollectionOfSubstringsSeparatedBy:$;)
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1034
        collect:[:each | each withoutSeparators].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1035
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1036
    "Created: / 03-08-2011 / 18:19:20 / cg"
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1037
!
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1038
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1039
removeFilesFromResultList:listOfFiles 
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1040
    |list|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1041
5864
0338587f079e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5860
diff changeset
  1042
    list := self shownList.
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1043
    (listOfFiles notEmptyOrNil) ifTrue:[
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1044
        listOfFiles reverseDo:[: key |
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1045
            list removeAtIndex:key
321c1729db5b initial checkin
penk
parents:
diff changeset
  1046
        ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  1047
    ].
11474
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1048
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1049
    "Created: / 29-03-2012 / 10:04:58 / cg"
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1050
!
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1051
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1052
removeSelectedFilesFromResultList
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1053
    self removeFilesFromResultList:(self selectionHolder value)
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1054
99b9dcfbcc4a added: #removeFilesFromResultList:
Claus Gittinger <cg@exept.de>
parents: 11473
diff changeset
  1055
    "Modified: / 29-03-2012 / 10:05:11 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1056
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1057
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1058
showMatchedFiles:aBoolean
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1059
    aBoolean ifTrue:[
5864
0338587f079e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5860
diff changeset
  1060
        self shownListHolder valueHolder:(self matchedFilesList)
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1061
    ] ifFalse:[
5864
0338587f079e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5860
diff changeset
  1062
        self shownListHolder valueHolder:(self resultList)
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1063
    ].
16826
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1064
!
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1065
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1066
touchAllFiles
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1067
    |files|
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1068
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1069
    files := self shownList copy.
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1070
    self touchFiles:files.
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1071
!
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1072
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1073
touchFiles:colOfFiles
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1074
    "touch current selected files/directories
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1075
    "
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1076
    colOfFiles asSet do:[:each |
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1077
        OperatingSystem executeCommand:('touch %1' bindWith:each asFilename pathName).
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1078
    ].
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1079
!
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1080
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1081
touchSelectedFiles
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1082
    |sel files|
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1083
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1084
    sel := self selectionHolder value.
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1085
    sel isEmptyOrNil ifTrue:[^ self].
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1086
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1087
    files := sel collect:[:idx | self shownList at:idx].
db04dc4aac2d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16810
diff changeset
  1088
    self touchFiles:files.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1089
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  1090
12778
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1091
!FindFileApplication methodsFor:'actions-CVS'!
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1092
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1093
commitSelectedFilesToCVS
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1094
    |sel files|
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1095
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1096
    sel := self selectionHolder value.
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1097
    files := sel collect:[:idx | (self shownList at:idx) asFilename ].
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1098
    masterApplication commitFilesToCVS:files
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1099
!
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1100
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1101
deleteSelectedFilesAndCVSContainers
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1102
    |sel files|
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1103
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1104
    sel := self selectionHolder value.
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1105
    files := sel collect:[:idx | (self shownList at:idx) asFilename ].
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1106
    masterApplication removeFilesAndCVSContainers:files
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1107
! !
b7c50fd7cd7a class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12739
diff changeset
  1108
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1109
!FindFileApplication methodsFor:'aspects'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1110
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1111
canUseGrep
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1112
    "grep command is much faster, but:
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1113
        - not under MSDOS
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1114
    "
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1115
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1116
    ^ OperatingSystem isUNIXlike and:[ OperatingSystem canExecuteCommand:'egrep' ]
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1117
!
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1118
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1119
canUseLocate
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1120
    "locate command is much faster, but:
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1121
        - only if searching recursively,
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1122
        - no case ignore
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1123
        - no contents matching
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1124
    "
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1125
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1126
    ^ OperatingSystem isUNIXlike and:[ OperatingSystem canExecuteCommand:'locate' ]
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1127
!
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1128
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1129
contentsPatternHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
  1130
321c1729db5b initial checkin
penk
parents:
diff changeset
  1131
    contentsPatternHolder isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  1132
        contentsPatternHolder := nil asValue.
18630
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1133
        self class searchStringHistory size ~~ 0 ifTrue:[
8330
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
  1134
            contentsPatternHolder value:(self class searchStringHistory first).    
f553e2e0442a search string history
Claus Gittinger <cg@exept.de>
parents: 7691
diff changeset
  1135
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1136
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1137
    ^ contentsPatternHolder.
18630
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1138
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1139
    "Modified: / 01-03-2019 / 15:43:39 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1140
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1141
6330
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1142
enableFileSizeFilter
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1143
    enableFileSizeFilter isNil ifTrue:[
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1144
        enableFileSizeFilter := false asValue.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1145
    ].
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1146
    ^ enableFileSizeFilter.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1147
!
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1148
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1149
enableFileSizeFilterAndNotSearchForSameContents
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1150
    ^ BlockValue forLogical:self notSearchForSameContents and:self enableFileSizeFilter
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1151
!
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1152
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1153
enableModificationTimeFilter
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1154
    enableModificationTimeFilter isNil ifTrue:[
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1155
        enableModificationTimeFilter := false asValue.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1156
    ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1157
    ^ enableModificationTimeFilter.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1158
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1159
    "Created: / 28-03-2012 / 23:11:58 / cg"
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1160
!
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1161
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1162
excludedNamePatternHolder
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1163
    excludedNamePatternHolder isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1164
        excludedNamePatternHolder := '' asValue.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1165
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1166
    ^ excludedNamePatternHolder.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1167
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1168
    "Created: / 03-08-2011 / 18:03:14 / cg"
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1169
!
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1170
6330
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1171
fileSizeHolder
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1172
    fileSizeHolder isNil ifTrue:[
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1173
        fileSizeHolder := 0 asValue.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1174
    ].
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1175
    ^ fileSizeHolder.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1176
!
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1177
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1178
fileSizeOperatorHolder
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1179
    fileSizeOperatorHolder isNil ifTrue:[
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1180
        fileSizeOperatorHolder := '>' asValue.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1181
    ].
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1182
    ^ fileSizeOperatorHolder.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1183
!
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1184
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1185
fileSizeUnitHolder
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1186
    fileSizeUnitHolder isNil ifTrue:[
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1187
        fileSizeUnitHolder := 'b' asValue.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1188
    ].
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1189
    ^ fileSizeUnitHolder.
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1190
!
24949170ff90 size-search filter added
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  1191
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1192
ignoreCaseInContents
321c1729db5b initial checkin
penk
parents:
diff changeset
  1193
    ignoreCaseInContents isNil ifTrue:[
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1194
        ignoreCaseInContents := (LastSearchIgnoredCaseInContents notNil
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1195
                                    ifTrue:[ LastSearchIgnoredCaseInContents ]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1196
                                    ifFalse:[ TextView lastSearchIgnoredCase ? true]) asValue.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1197
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1198
    ^ ignoreCaseInContents.
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1199
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1200
    "Modified: / 03-08-2011 / 18:05:02 / cg"
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1201
!
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1202
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1203
ignoreCaseInExcludedName
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1204
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1205
    ignoreCaseInExcludedName isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1206
        ignoreCaseInExcludedName := (LastSearchIgnoredCaseInExcludedFilename notNil 
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1207
                                        ifTrue:[ LastSearchIgnoredCaseInExcludedFilename ]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1208
                                        ifFalse:[ OperatingSystem caseSensitiveFilenames not]) asValue.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1209
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1210
    ^ ignoreCaseInExcludedName.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1211
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1212
    "Created: / 03-08-2011 / 18:03:38 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1213
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1214
321c1729db5b initial checkin
penk
parents:
diff changeset
  1215
ignoreCaseInName
321c1729db5b initial checkin
penk
parents:
diff changeset
  1216
    ignoreCaseInName isNil ifTrue:[
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1217
        ignoreCaseInName := (LastSearchIgnoredCaseInFilename notNil
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1218
                                ifTrue:[LastSearchIgnoredCaseInFilename]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1219
                                ifFalse:[ OperatingSystem caseSensitiveFilenames not ]) asValue.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1220
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1221
    ^ ignoreCaseInName.
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1222
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1223
    "Modified (format): / 03-08-2011 / 18:05:49 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1224
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1225
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1226
ignoreCaseInNotContents
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1227
    ignoreCaseInNotContents isNil ifTrue:[
6442
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
  1228
        ignoreCaseInNotContents := (LastSearchIgnoredCaseInContents 
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
  1229
                                    ? TextView lastSearchIgnoredCase 
840b9ab17b66 case defaults
Claus Gittinger <cg@exept.de>
parents: 6355
diff changeset
  1230
                                    ? true) asValue.
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1231
    ].
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1232
    ^ ignoreCaseInNotContents.
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1233
!
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1234
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1235
modificationTimeHolder
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1236
    modificationTimeHolder isNil ifTrue:[
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1237
        modificationTimeHolder := (Timestamp now subtractDays:1) asValue.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1238
    ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1239
    ^ modificationTimeHolder.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1240
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1241
    "Created: / 28-03-2012 / 23:08:25 / cg"
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1242
!
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1243
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1244
modificationTimeOperatorHolder
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1245
    modificationTimeOperatorHolder isNil ifTrue:[
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1246
        modificationTimeOperatorHolder := 'after' asValue.
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1247
        modificationTimeOperatorHolder onChangeSend:#modificationTimeOperatorChanged to:self.
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1248
    ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1249
    ^ modificationTimeOperatorHolder.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1250
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1251
    "Created: / 28-03-2012 / 23:04:44 / cg"
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1252
!
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1253
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1254
modificationTimeOperatorIndexHolder
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1255
    modificationTimeOperatorIndexHolder isNil ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1256
        modificationTimeOperatorIndexHolder := 1 asValue.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1257
        modificationTimeOperatorIndexHolder onChangeSend:#modificationTimeOperatorChanged to:self.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1258
    ].
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1259
    ^ modificationTimeOperatorIndexHolder.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1260
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1261
    "Created: / 28-03-2012 / 23:04:44 / cg"
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1262
!
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1263
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1264
modificationTimeOperatorLabelList
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1265
    ^ self modificationTimeOperatorSpecList collect:#first
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1266
!
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1267
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1268
modificationTimeOperatorSpecList
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1269
    ^ #(
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1270
        ('before'   #before)
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1271
        ('after'    #after)
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1272
        ('in day'   #inDay)
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1273
        ('in month' #inMonth)
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1274
        ('in year'  #inYear)
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1275
    )
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1276
!
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1277
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1278
modificationTimeOperatorValueList
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1279
    ^ self modificationTimeOperatorSpecList collect:#second
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1280
!
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1281
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1282
namePatternHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
  1283
321c1729db5b initial checkin
penk
parents:
diff changeset
  1284
    namePatternHolder isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  1285
        namePatternHolder := '*' asValue.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1286
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1287
    ^ namePatternHolder.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1288
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1289
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1290
notContentsPatternHolder
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1291
    notContentsPatternHolder isNil ifTrue:[
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1292
        notContentsPatternHolder := nil asValue.
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1293
    ].
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1294
    ^ notContentsPatternHolder.
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1295
!
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1296
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1297
notSearchForSameContents
5743
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1298
    ^ BlockValue forLogicalNot:self searchForSameContents
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1299
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1300
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1301
notShowingMatchedFiles
5865
24bc1718c04f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5864
diff changeset
  1302
    ^ self shownList == self resultList
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1303
!
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1304
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1305
rememberInCache
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1306
    rememberInCache isNil ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1307
        rememberInCache := (LastRememberInCache ? false) asValue.
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1308
    ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1309
    ^ rememberInCache.
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1310
!
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1311
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1312
sameContentsAsHolder
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1313
    |sel|
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1314
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1315
    sameContentsAsHolder isNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1316
        sameContentsAsHolder := ValueHolder new.
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1317
        masterApplication notNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1318
            sel := masterApplication currentSelectedFiles.
18630
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1319
            sel size ~~ 0 ifTrue:[
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1320
                sameContentsAsHolder value:(sel first asFilename pathName).
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1321
            ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1322
        ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1323
    ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1324
    ^ sameContentsAsHolder.
18630
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1325
4c8b4840e06b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18457
diff changeset
  1326
    "Modified: / 01-03-2019 / 15:43:43 / Claus Gittinger"
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1327
!
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1328
4518
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1329
searchDirectories
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1330
    searchDirectories isNil ifTrue:[
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1331
        searchDirectories := false asValue.
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1332
    ].
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1333
    ^ searchDirectories.
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1334
!
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  1335
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1336
searchDirectoryHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
  1337
321c1729db5b initial checkin
penk
parents:
diff changeset
  1338
    searchDirectoryHolder isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  1339
        searchDirectoryHolder := ValueHolder new.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1340
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1341
    ^ searchDirectoryHolder.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1342
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1343
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1344
searchForBinaryContentsHolder
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1345
    searchForBinaryContentsHolder isNil ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1346
        searchForBinaryContentsHolder := (LastSearchForBinaryContents ? false) asValue.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1347
    ].
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1348
    ^ searchForBinaryContentsHolder.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1349
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1350
    "Created: / 12-11-2017 / 17:35:56 / cg"
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1351
!
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1352
5743
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1353
searchForSameContents
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1354
    searchForSameContents isNil ifTrue:[
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1355
        searchForSameContents := false asValue.
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1356
    ].
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1357
    ^ searchForSameContents.
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1358
!
ab4c777f25f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5730
diff changeset
  1359
5726
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1360
searchOnlyInCache
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1361
    searchOnlyInCache isNil ifTrue:[
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1362
        searchOnlyInCache := false asValue.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1363
    ].
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1364
    ^ searchOnlyInCache.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1365
!
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1366
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1367
showUnreadableFilesAndDirectoriesHolder
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1368
    showUnreadableFilesAndDirectoriesHolder isNil ifTrue:[
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1369
        showUnreadableFilesAndDirectoriesHolder := (LastShowUnreadableFilesAndDirectories ? false) asValue.
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1370
    ].
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1371
    ^ showUnreadableFilesAndDirectoriesHolder.
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1372
!
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1373
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1374
showingMatchedFiles
5865
24bc1718c04f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5864
diff changeset
  1375
    ^ self shownList == self matchedFilesList
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1376
!
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1377
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1378
useGrep
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1379
    useGrep isNil ifTrue:[
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1380
        useGrep := false asValue.
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1381
    ].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1382
    ^ useGrep.
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1383
!
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1384
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1385
useLocate
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1386
    useLocate isNil ifTrue:[
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1387
        useLocate := false asValue.
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1388
    ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1389
    ^ useLocate.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1390
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  1391
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1392
!FindFileApplication methodsFor:'change & update'!
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1393
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1394
modificationTimeOperatorChanged
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1395
    |timeEditField converter realModel idx operator|
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1396
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1397
    timeEditField := (self componentAt:'ModifiedEntryField').
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1398
    converter := timeEditField model.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1399
    realModel := converter model.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1400
    self assert:(self modificationTimeHolder == realModel).
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1401
    idx := self modificationTimeOperatorIndexHolder value.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1402
    operator := self modificationTimeOperatorValueList at:idx.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1403
    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1404
    ((operator == #after) or:[operator = #before]) ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1405
        realModel setValue:(realModel value asTimestamp).    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1406
        converter timeOfClass:Timestamp withFormat:nil orDefault:Timestamp now    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1407
    ] ifFalse:[    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1408
        operator = #inDay ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1409
            realModel setValue:(realModel value asDate).    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1410
            converter timeOfClass:Date withFormat:'%y-%m-%d' orDefault:Date today    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1411
        ] ifFalse:[    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1412
            operator = #inMonth ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1413
                realModel setValue:(realModel value asDate).    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1414
                converter monthAndYear    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1415
            ] ifFalse:[    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1416
                operator = #inYear ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1417
                    realModel setValue:(realModel value asDate).    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1418
                    converter year    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1419
                ] ifFalse:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1420
                    self halt.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1421
                ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1422
            ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1423
        ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1424
    ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1425
    realModel changed.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1426
! !
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  1427
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1428
!FindFileApplication methodsFor:'private'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1429
321c1729db5b initial checkin
penk
parents:
diff changeset
  1430
changeExtentToSeeSearchResult
321c1729db5b initial checkin
penk
parents:
diff changeset
  1431
    
321c1729db5b initial checkin
penk
parents:
diff changeset
  1432
    | extent window|
321c1729db5b initial checkin
penk
parents:
diff changeset
  1433
321c1729db5b initial checkin
penk
parents:
diff changeset
  1434
    expanded isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  1435
        window := self builder window.
9536
ea60487ceeee changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents: 9475
diff changeset
  1436
        window notNil ifTrue:[
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1437
            window := window topView.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1438
            extent := window extent.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1439
            window extent:((extent x) @ (extent y + 300)).
321c1729db5b initial checkin
penk
parents:
diff changeset
  1440
            expanded := true.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1441
            window containerChangedSize.
321c1729db5b initial checkin
penk
parents:
diff changeset
  1442
        ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1443
    ].
9536
ea60487ceeee changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents: 9475
diff changeset
  1444
ea60487ceeee changed: #changeExtentToSeeSearchResult
Claus Gittinger <cg@exept.de>
parents: 9475
diff changeset
  1445
    "Modified: / 08-08-2010 / 14:42:40 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1446
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  1447
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1448
!FindFileApplication methodsFor:'private - searching'!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1449
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1450
cachedFileSizeOf:aFilenameString
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1451
    |cache cacheLine fileSize|
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1452
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1453
    cache := self contentsInfoCache.
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1454
    cache isNil ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1455
        fileSize := aFilenameString asFilename fileSize
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1456
    ] ifFalse:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1457
        ContentsInfoCacheAccessLock critical:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1458
            cacheLine := cache at:aFilenameString ifAbsent:nil.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1459
            cacheLine isNil ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1460
                cache at:aFilenameString put:(cacheLine := Array new:2).
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1461
            ] ifFalse:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1462
                fileSize := (cacheLine at:1).
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1463
            ].
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1464
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1465
            fileSize isNil ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1466
                fileSize := aFilenameString asFilename fileSize.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1467
                cacheLine at:1 put:fileSize.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1468
            ].
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1469
        ].
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1470
    ].
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1471
    ^ fileSize
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1472
!
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1473
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1474
cachedHashValueOfFile:aFilenameString
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1475
    |cache cacheLine hashValue|
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1476
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1477
    cache := self contentsInfoCache.
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1478
    cache isNil ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1479
        hashValue := MD5Stream hashValueOfFile:aFilenameString asFilename
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1480
    ] ifFalse:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1481
        ContentsInfoCacheAccessLock critical:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1482
            cacheLine := cache at:aFilenameString ifAbsent:nil.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1483
            cacheLine isNil ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1484
                cache at:aFilenameString put:(Array new:2).
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1485
            ] ifFalse:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1486
                hashValue := (cacheLine at:2).
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1487
            ].
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1488
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1489
            hashValue isNil ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1490
                hashValue := MD5Stream hashValueOfFile:aFilenameString asFilename.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1491
                cacheLine at:2 put:hashValue.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1492
            ].
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1493
        ].
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1494
    ].
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1495
    ^ hashValue
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1496
!
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1497
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1498
contentsInfoCache
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1499
    contentsInfoCache isNil ifTrue:[
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1500
        ContentsInfoCache isNil ifTrue:[
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1501
            ContentsInfoCache := Dictionary new.    
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1502
            ContentsInfoCacheAccessLock := Semaphore forMutualExclusion.
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1503
        ].
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1504
        contentsInfoCache := ContentsInfoCache
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1505
    ].
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  1506
    ^ contentsInfoCache
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1507
!
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1508
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1509
doFindFileNamed:namePatterns directories:searchDirectories ignoreCase:ignCaseInName 
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1510
    containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents 
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1511
    notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents 
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1512
    sameContentsAsFile:filenameToCompareContentsOrNil sameContentsAs:bytesToCompareContentsOrNil in:aDirectory
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1513
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1514
    "/ only for backward compatibility...
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1515
    ^ self
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1516
        doFindFileNamed:namePatterns directories:searchDirectories ignoreCaseInName:ignCaseInName
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1517
        excludeFilesNamed:'' ignoreCaseInExcludedName:false
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1518
        containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents 
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1519
        notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents 
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1520
        sameContentsAsFile:filenameToCompareContentsOrNil sameContentsAs:bytesToCompareContentsOrNil in:aDirectory
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1521
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1522
    "Modified: / 03-08-2011 / 18:16:42 / cg"
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1523
!
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1524
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1525
doFindFileNamed:namePatterns directories:searchDirectories ignoreCaseInName:ignCaseInName
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1526
    excludeFilesNamed:excludedNamePatterns ignoreCaseInExcludedName:ignoreCaseInExcludedName
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1527
    containingString:contentsStringArg ignoreCaseInContents:ignCaseInContents 
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1528
    notContainingString:notContentsStringArg ignoreCaseInNotContents:ignCaseInNotContents 
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1529
    sameContentsAsFile:filenameToCompareContentsOrNil 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1530
    sameContentsAs:bytesToCompareContentsOrNil 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1531
    in:aDirectoryOrCollectionOfDirectories
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1532
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1533
    "the main workhorse for searching files.
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1534
     Creates optimized search blocks, depending on how we search,
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1535
     and passes these to the recursive directory walker.
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1536
     (got too big, and may need some splitting/refactoring"
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1537
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1538
    |theSingleDirectory lines contentsToCompare resultList inStream
5601
08ab506e471d egrep search support
Claus Gittinger <cg@exept.de>
parents: 5600
diff changeset
  1539
     doesFileMatch contentsString notContentsString check checkNot 
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1540
     grepCommand nameMatch nameExcludedMatch realNameMatch 
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1541
     fileSizesToSearchFor filesToSearchFor fileMD5sToSearchFor 
18457
cd5d311f8b73 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18370
diff changeset
  1542
     setOfFilesToSearchFor remember cache fn easyCheck
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1543
     searchForBinaryContents|
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1544
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1545
    searchForBinaryContents := self searchForBinaryContentsHolder value.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1546
    
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1547
    (aDirectoryOrCollectionOfDirectories isFilename
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1548
    or:[aDirectoryOrCollectionOfDirectories isString]) ifTrue:[
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1549
        theSingleDirectory := aDirectoryOrCollectionOfDirectories asFilename
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1550
    ] ifFalse:[
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1551
        (aDirectoryOrCollectionOfDirectories size == 1) ifTrue:[
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1552
            theSingleDirectory := aDirectoryOrCollectionOfDirectories first asFilename
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1553
        ].
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1554
    ].
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1555
    
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1556
    "/ dir := aDirectory asFilename.
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1557
    contentsString := contentsStringArg.
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1558
    notContentsString := notContentsStringArg.
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1559
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1560
    searchForBinaryContents ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1561
        contentsString notEmptyOrNil ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1562
            contentsString := (contentsStringArg asCollectionOfWords 
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1563
                                    collect:[:s | Integer readFrom:s radix:16] as:ByteArray) asString.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1564
        ].
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1565
        notContentsString notEmptyOrNil ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1566
            notContentsString := (notContentsStringArg asCollectionOfWords 
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1567
                                    collect:[:s | Integer readFrom:s radix:16] as:ByteArray) asString.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1568
        ].
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1569
    ] ifFalse:[    
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1570
        (contentsString notEmptyOrNil and:[ ignCaseInContents ]) ifTrue:[ 
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1571
            contentsString := contentsString asLowercase
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1572
        ].
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1573
        (notContentsString notEmptyOrNil and:[ ignCaseInNotContents ]) ifTrue:[ 
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1574
            notContentsString := notContentsString asLowercase    
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1575
        ].
6183
e6d9cfbfb358 care for empty search-arguments
Michael Beyl <mb@exept.de>
parents: 6158
diff changeset
  1576
    ].
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1577
    filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1578
        fileSizesToSearchFor := OrderedCollection new.
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1579
        filesToSearchFor := OrderedCollection new.
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1580
        fileMD5sToSearchFor := OrderedCollection new.
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1581
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1582
        filenameToCompareContentsOrNil includesMatchCharacters ifTrue:[
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1583
            |dir|
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1584
            
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1585
            dir := filenameToCompareContentsOrNil asFilename.
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1586
            [dir pathName includesMatchCharacters] whileTrue:[
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1587
                dir := dir directory
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1588
            ].
18457
cd5d311f8b73 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18370
diff changeset
  1589
            dir recursiveDirectoryContentsAsFilenamesDo:[:fn |
5770
2b3f1705ed84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5769
diff changeset
  1590
                (filenameToCompareContentsOrNil match:fn name) ifTrue:[
18457
cd5d311f8b73 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18370
diff changeset
  1591
                    fn isRegularFile ifTrue:[
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1592
                        fileSizesToSearchFor add:(self cachedFileSizeOf:fn).
5847
6ff1fce17ac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5844
diff changeset
  1593
                        filesToSearchFor add:(fn name).
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1594
                        fileMD5sToSearchFor add:(self cachedHashValueOfFile:fn).
5847
6ff1fce17ac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5844
diff changeset
  1595
                    ]
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1596
                ]
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1597
            ].
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1598
        ] ifFalse:[
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1599
            fn := filenameToCompareContentsOrNil asFilename.
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1600
            fileSizesToSearchFor add:(self cachedFileSizeOf:fn).
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1601
            filesToSearchFor add:(fn pathName).
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1602
            fileMD5sToSearchFor add:(self cachedHashValueOfFile:fn).
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1603
        ].
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1604
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1605
        remember := LastRememberInCache := self rememberInCache value.
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1606
        remember ifTrue:[
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1607
            cache := self contentsInfoCache.
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1608
        ].
5866
d754a2b95e8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5865
diff changeset
  1609
        setOfFilesToSearchFor := filesToSearchFor asSet.
d754a2b95e8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5865
diff changeset
  1610
    ].    
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1611
    
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1612
"/    dirSearchedRelative := (dir name) copyFrom:(self searchDirectoryHolder value asString size + 1).
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1613
"/    dirSearchedRelative notEmpty ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1614
"/        self changeInformationTo:('Find File - searching %1' bindWith:dirSearchedRelative) toTab:false.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1615
"/    ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1616
        self changeInformationTo:'Find File - searching' toTab:false.
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1617
"/    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1618
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1619
    resultList := self resultList.
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1620
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1621
    filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1622
        doesFileMatch := 
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1623
            [:f |
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1624
                |contentsMatches mustValidateExistance 
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1625
                 fileMD5 fileName fileSize cacheLine idxInList matchedFile|
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1626
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1627
                "/ contents compare ...
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1628
                contentsMatches := false.
5771
ba11ead45024 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5770
diff changeset
  1629
                fileName := f name.
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1630
                (setOfFilesToSearchFor includes:fileName) ifFalse:[
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1631
                    mustValidateExistance := false.
5856
68274991f212 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5851
diff changeset
  1632
5727
2e272a545f8d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5726
diff changeset
  1633
                    cache notNil ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1634
                        ContentsInfoCacheAccessLock critical:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1635
                            cacheLine := cache at:fileName ifAbsent:nil.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1636
                            cacheLine notNil ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1637
                                fileSize := cacheLine at:1.    
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1638
                                fileMD5 := cacheLine at:2.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1639
                                mustValidateExistance := true.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1640
                            ].
5727
2e272a545f8d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5726
diff changeset
  1641
                        ].
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1642
                    ].
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1643
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1644
                    fileSize isNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1645
                        fileSize := f fileSize.
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1646
                    ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1647
                    remember ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1648
                        ContentsInfoCacheAccessLock critical:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1649
                            cacheLine := cache at:fileName ifAbsentPut:[Array new:2].
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1650
                            cacheLine at:1 put:fileSize.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1651
                        ]
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1652
                    ].
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1653
                    (idxInList := fileSizesToSearchFor indexOf:fileSize) ~~ 0 ifTrue:[
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1654
                        fileMD5 isNil ifTrue:[
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1655
                            OpenError handle:[:ex |
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1656
                                ObjectMemory garbageCollect.
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1657
                                fileMD5 := MD5Stream hashValueOfFile:f.
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1658
                            ] do:[
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1659
                                fileMD5 := MD5Stream hashValueOfFile:f.
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1660
                            ].
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1661
                            remember ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1662
                                cacheLine at:2 put:fileMD5
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1663
                            ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1664
                        ].
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1665
                        contentsMatches := (fileMD5 = (fileMD5sToSearchFor at:idxInList)).
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1666
                        contentsMatches ifTrue:[
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1667
                            mustValidateExistance ifTrue:[
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1668
                                fileName asFilename exists ifFalse:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1669
                                    ContentsInfoCacheAccessLock critical:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1670
                                        cache removeKey:fileName.
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1671
                                    ].
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1672
                                    contentsMatches := false.
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1673
                                ].
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1674
                            ].
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1675
                            contentsMatches ifTrue:[
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1676
                                matchedFile := filesToSearchFor at:idxInList.
11106
86ac37a9a382 changed: #doFindFileNamed:directories:ignoreCaseInName:excludeFilesNamed:ignoreCaseInExcludedName:containingString:ignoreCaseInContents:notContainingString:ignoreCaseInNotContents:sameContentsAsFile:sameContentsAs:in:
Claus Gittinger <cg@exept.de>
parents: 11103
diff changeset
  1677
                                self matchedFilesList add:matchedFile.
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1678
                            ].
5850
9f217d207505 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5848
diff changeset
  1679
                        ].
5723
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1680
"/                        contentsToCompare isNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1681
"/                            filenameToCompareContentsOrNil fileSize < (512*1024) ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1682
"/                                contentsToCompare := filenameToCompareContentsOrNil binaryContentsOfEntireFile
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1683
"/                            ]
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1684
"/                        ].
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1685
"/                        contentsToCompare isNil ifTrue:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1686
"/                            "/ too large - compare block-wise ...
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1687
"/                            contentsMatches := (filenameToCompareContentsOrNil sameContentsAs:f).
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1688
"/                        ] ifFalse:[
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1689
"/                            contentsMatches := contentsToCompare = (f binaryContentsOfEntireFile).
dadcb827b659 more search
Claus Gittinger <cg@exept.de>
parents: 5677
diff changeset
  1690
"/                        ]
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1691
                    ].
5773
6c5f260f3a5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5771
diff changeset
  1692
                ] ifTrue:[
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1693
                    f isSymbolicLink ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1694
                        resultList add: (f name , ' is a symbolic link to ' , f pathName).
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1695
                    ]
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1696
                ].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1697
                contentsMatches
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1698
            ].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1699
    ] ifFalse:[
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1700
        (contentsString isEmptyOrNil and:[notContentsString isEmptyOrNil]) ifTrue:[
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1701
            doesFileMatch := [:f | true].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1702
        ] ifFalse:[
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1703
            searchForBinaryContents ifFalse:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1704
                (self canUseGrep and:[self useGrep value]) ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1705
                    (ignCaseInContents not and:[ignCaseInNotContents not]) ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1706
                        contentsString notEmptyOrNil ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1707
                            notContentsString notEmptyOrNil ifTrue:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1708
                                grepCommand := '(grep "',contentsString,'" %1) && (grep -v "',notContentsString,'" %1)'.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1709
                            ] ifFalse:[
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1710
                                grepCommand := 'grep "' , contentsString , '" %1'.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1711
                            ].
5601
08ab506e471d egrep search support
Claus Gittinger <cg@exept.de>
parents: 5600
diff changeset
  1712
                        ] ifFalse:[
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1713
                            grepCommand := 'grep -v "' , notContentsString , '" %1'.
5601
08ab506e471d egrep search support
Claus Gittinger <cg@exept.de>
parents: 5600
diff changeset
  1714
                        ].
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1715
                        doesFileMatch := [:f | |cmd ret|
18370
04c5fa4abafc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17894
diff changeset
  1716
                                                bytesSearchedCount := bytesSearchedCount + f fileSize.
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1717
                                                cmd := grepCommand bindWith:f pathName.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1718
                                                ret := OperatingSystem executeCommand:cmd.
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1719
                                                ret
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1720
                                         ].
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1721
                    ]
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1722
                ].
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1723
            ].
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1724
            
5601
08ab506e471d egrep search support
Claus Gittinger <cg@exept.de>
parents: 5600
diff changeset
  1725
            doesFileMatch isNil ifTrue:[
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1726
                contentsString notEmptyOrNil ifTrue:[
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1727
                    (searchForBinaryContents not and:[ignCaseInContents]) ifTrue:[
12339
4fb3104f0334 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 11474
diff changeset
  1728
                        check := easyCheck := [:l | l includesString:contentsString caseSensitive:false]
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1729
                    ] ifFalse:[
12339
4fb3104f0334 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 11474
diff changeset
  1730
                        check := easyCheck := [:l | l includesString:contentsString]
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1731
                    ].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1732
                ].
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1733
                notContentsString notEmptyOrNil ifTrue:[
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1734
                    (searchForBinaryContents not and:[ignCaseInNotContents]) ifTrue:[
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1735
                        checkNot := [:l | (l includesString:notContentsString caseSensitive:false)]
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1736
                    ] ifFalse:[
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1737
                        checkNot := [:l | (l includesString:notContentsString)]
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1738
                    ].
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1739
                ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1740
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1741
                doesFileMatch := 
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1742
                    [:f |
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1743
                        |realFile contentsMatches contentsNotMatches sz hugeFile bigFile isBadFile|
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1744
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1745
                        "/ string search ...
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1746
                        contentsMatches := true.
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1747
                        (f exists and:[f isReadable]) ifFalse:[
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1748
                            showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1749
                                resultList add: (('*** "',f pathName,'" skipped - unreadable or bad symbolic link ***') withColor:(Color darkRed)).
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1750
                            ].
13773
b4eb885ea9f0 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12778
diff changeset
  1751
                            contentsMatches := false.
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1752
                        ] ifTrue:[
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1753
                            isBadFile := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1754
                            realFile := f.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1755
                            f isSymbolicLink ifTrue:[ 
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1756
                                realFile := f linkInfo linkTargetPath asFilename. 
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1757
                                (realFile exists and:[realFile isReadable]) ifFalse:[
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1758
                                    showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1759
                                        resultList add: (('*** "',f pathName,'"->"',realFile pathName,'" skipped - unreadable or bad symbolic link destination ***') withColor:(Color darkRed)).
13920
1929484021d8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13773
diff changeset
  1760
                                    ].
13773
b4eb885ea9f0 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12778
diff changeset
  1761
                                    contentsMatches := false.
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1762
                                    isBadFile := true.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1763
                                ].    
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1764
                            ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1765
                            isBadFile ifFalse:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1766
                                realFile isDirectory ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1767
                                    contentsMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1768
                                ] ifFalse:[    
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1769
                                    sz := realFile fileSize.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1770
                                    sz isNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1771
                                        contentsMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1772
                                    ] ifFalse:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1773
                                        hugeFile := (sz ? 0) > (4024*1024).
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1774
                                        bigFile := (sz ? 0) > (512*1024).
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1775
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1776
                                        hugeFile ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1777
                                            showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1778
                                                resultList add: (('*** ' , f pathName , ' skipped - too large ***') withColor:(Color darkRed)).
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1779
                                            ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1780
                                            contentsMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1781
                                        ] ifFalse:[
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1782
                                            Stream lineTooLongErrorSignal handle:[:ex |
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1783
                                                |cont|
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1784
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1785
            "/                                    "/ this typically happens, when a binary file is read linewise ...
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1786
                                                showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1787
                                                    resultList add: (('*** ' , f pathName , ' skipped - binary/long line ***') withColor:(Color darkRed)).
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1788
                                                ].
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1789
                                                contentsMatches := false.
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1790
                                            ] do:[
18370
04c5fa4abafc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17894
diff changeset
  1791
                                                bytesSearchedCount := bytesSearchedCount + sz.
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1792
                                                bigFile ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1793
                                                    Stream lineTooLongErrorSignal handle:[:ex |
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1794
                                                        showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1795
                                                            resultList add: (('*** ' , f pathName , ' skipped - too large ***') withColor:(Color darkRed)).
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1796
                                                        ].
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1797
                                                        contentsMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1798
                                                    ] do:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1799
                                                        contentsMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1800
                                                        (check == easyCheck 
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1801
                                                        and:[ realFile size < (128*1024) ]) ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1802
                                                            check notNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1803
                                                                contentsMatches := realFile contentsAsString includesString: contentsString caseSensitive:ignCaseInContents not.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1804
                                                                (contentsMatches and:[ checkNot notNil ]) ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1805
                                                                    contentsMatches := (realFile contentsAsString includesString: notContentsString caseSensitive:ignCaseInNotContents not) not.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1806
                                                                ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1807
                                                            ] ifFalse:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1808
                                                                checkNot notNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1809
                                                                    contentsMatches := (realFile contentsAsString includesString: notContentsString caseSensitive:ignCaseInNotContents not) not.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1810
                                                                ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1811
                                                            ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1812
                                                        ] ifFalse:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1813
                                                            contentsNotMatches := false.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1814
                                                            realFile readingFileDo:[:stream |
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1815
                                                                [contentsMatches or:[contentsNotMatches or:[stream atEnd]]] whileFalse:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1816
                                                                    |line|
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1817
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1818
                                                                    line := stream nextLine.
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1819
                                                                    check notNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1820
                                                                        contentsMatches := check value:line
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1821
                                                                    ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1822
                                                                    checkNot notNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1823
                                                                        contentsNotMatches := checkNot value:line
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1824
                                                                    ].
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1825
                                                                ]
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1826
                                                            ].
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1827
                                                        ].
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1828
                                                    ].
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1829
                                                ] ifFalse:[
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1830
                                                    lines := realFile contents ? #().
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1831
                                                    check notNil ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1832
                                                        contentsMatches := lines contains:check
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1833
                                                    ].
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1834
                                                    (contentsMatches and:[ checkNot notNil ]) ifTrue:[
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1835
                                                        contentsMatches := (lines contains:checkNot) not
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1836
                                                    ]
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1837
                                                ]
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1838
                                            ].
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1839
                                        ].    
15105
30559da8faf6 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15092
diff changeset
  1840
                                    ].
5231
d74730347ed8 added option to search for file NOT containing a string
Claus Gittinger <cg@exept.de>
parents: 5224
diff changeset
  1841
                                ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1842
                            ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1843
                        ].
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1844
                        contentsMatches
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1845
                    ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1846
            ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1847
        ].
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  1848
        doesFileMatch := self fileSizeWrapperFor:doesFileMatch.
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1849
    ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1850
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1851
    doesFileMatch := self modificationTimeWrapperFor:doesFileMatch.
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  1852
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1853
    namePatterns isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1854
        nameMatch := [:fn | true]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1855
    ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1856
        ignCaseInName ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1857
            nameMatch := [:fn | namePatterns contains:[:aPattern | aPattern match:(fn asLowercase)]].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1858
        ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1859
            nameMatch := [:fn | namePatterns contains:[:aPattern | aPattern match:fn]].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1860
        ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1861
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1862
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1863
    excludedNamePatterns isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1864
        nameExcludedMatch := [:fn | true]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1865
    ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1866
        ignoreCaseInExcludedName ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1867
            nameExcludedMatch := [:fn | excludedNamePatterns contains:[:aPattern | aPattern match:(fn asLowercase)]].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1868
        ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1869
            nameExcludedMatch := [:fn | excludedNamePatterns contains:[:aPattern | aPattern match:fn]].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1870
        ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1871
    ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1872
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1873
    "/ combine
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1874
    namePatterns isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1875
        excludedNamePatterns isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1876
            realNameMatch := [:fn | true]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1877
        ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1878
            realNameMatch := [:fn | (nameExcludedMatch value:fn) not]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1879
        ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1880
    ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1881
        excludedNamePatterns isNil ifTrue:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1882
            realNameMatch := nameMatch
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1883
        ] ifFalse:[
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1884
            realNameMatch := [:fn | (nameMatch value:fn) and:[ (nameExcludedMatch value:fn) not ]]
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1885
        ].
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1886
    ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1887
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1888
    (self canUseLocate 
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1889
    and:[self useLocate value
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1890
    and:[searchDirectories not
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1891
    and:[theSingleDirectory notNil]]])
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1892
    ifTrue:[
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1893
        [
16639
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1894
            |updateInfo cmd line f|
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1895
16639
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1896
            updateInfo :=
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1897
                [
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1898
                    self 
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1899
                        changeInformationTo:('%1 found' bindWith:resultList size) 
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1900
                        toTab:false.
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1901
                ].
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1902
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1903
            self window shown ifTrue:[
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1904
                updateInfo value.
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1905
            ].
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1906
            
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1907
            cmd := 'locate '.
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1908
            ignCaseInName ifTrue:[
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1909
                "/ cmd := cmd , '--ignore-case '
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1910
                cmd := cmd , '-i '
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1911
            ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1912
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1913
            cmd := cmd , ((namePatterns 
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1914
                            collect:[:nm | '"',nm,'"'])
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  1915
                                asStringCollection asStringWith:Character space).
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1916
            inStream := PipeStream readingFrom:cmd inDirectory:theSingleDirectory.
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1917
            [inStream atEnd] whileFalse:[
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1918
                line := inStream nextLine.
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1919
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1920
                f := line asFilename.
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1921
                (doesFileMatch value:f) ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1922
                    resultList add:line.
16639
629bf5cdd089 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16608
diff changeset
  1923
                    updateInfo value.
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1924
                ]
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1925
            ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1926
        ] ensure:[
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1927
            inStream notNil ifTrue:[inStream close].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1928
        ].
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1929
        ^ self.
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  1930
    ].
12339
4fb3104f0334 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 11474
diff changeset
  1931
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1932
    bytesToCompareContentsOrNil notNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  1933
        contentsToCompare := bytesToCompareContentsOrNil
321c1729db5b initial checkin
penk
parents:
diff changeset
  1934
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  1935
12385
d2206a9da1c9 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12339
diff changeset
  1936
    filenameToCompareContentsOrNil notEmptyOrNil ifTrue:[
5727
2e272a545f8d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5726
diff changeset
  1937
        self searchOnlyInCache value ifTrue:[
5726
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1938
            cache notEmptyOrNil ifTrue:[
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1939
                cache keysAndValuesDo:[:fn :info |
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1940
                    |filesSize filesMD5 idxInList|
12339
4fb3104f0334 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 11474
diff changeset
  1941
5726
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1942
                    filesSize := info at:1.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1943
                    filesSize isNil ifTrue:[
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1944
                        filesSize := fn asFilename fileSize.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1945
                        info at:1 put:filesSize.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1946
                    ].
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1947
                    (idxInList := fileSizesToSearchFor indexOf:filesSize) ~~ 0 ifTrue:[
6250
5b0673ccff1c refactored intention revealing code:
Claus Gittinger <cg@exept.de>
parents: 6183
diff changeset
  1948
                        (setOfFilesToSearchFor includes:fn) ifFalse:[
5729
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1949
                            fn asFilename exists ifFalse:[
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1950
                                info at:1 put:nil.    
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1951
                                info at:2 put:nil.    
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1952
                            ] ifTrue:[
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1953
                                filesMD5 := info at:2.
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1954
                                filesMD5 isNil ifTrue:[
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1955
                                    filesMD5 := MD5Stream hashValueOfFile:fn asFilename.
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1956
                                    info at:2 put:filesMD5.
752d89ffb83e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5728
diff changeset
  1957
                                ].
5768
18f6e4033412 multisearch
Claus Gittinger <cg@exept.de>
parents: 5767
diff changeset
  1958
                                filesMD5 = (fileMD5sToSearchFor at:idxInList) ifTrue:[
5859
c85f10082d25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5857
diff changeset
  1959
                                    resultList add:fn.
5728
93ac88c7f87d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5727
diff changeset
  1960
                                ]
5727
2e272a545f8d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5726
diff changeset
  1961
                            ]
5726
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1962
                        ]
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1963
                    ]
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1964
                ].
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1965
            ].
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1966
            ^ self.
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1967
        ].
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1968
    ].
464df1753187 fast cache search added
Claus Gittinger <cg@exept.de>
parents: 5723
diff changeset
  1969
18370
04c5fa4abafc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17894
diff changeset
  1970
    filesSearchedCount := bytesSearchedCount := 0.
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1971
16574
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1972
    aDirectoryOrCollectionOfDirectories do:[:eachDir |
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1973
        self 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1974
            doFindFileNamed:namePatterns 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1975
            directories:searchDirectories
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1976
            nameMatch:realNameMatch 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1977
            contentsMatch:doesFileMatch 
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1978
            in:eachDir.
635deee55b29 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16511
diff changeset
  1979
    ]
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1980
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  1981
    "Created: / 03-08-2011 / 18:16:02 / cg"
17751
79bd35bda2d9 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17709
diff changeset
  1982
    "Modified: / 12-11-2017 / 17:50:01 / cg"
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  1983
    "Modified: / 13-03-2019 / 21:20:12 / Claus Gittinger"
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1984
!
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1985
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1986
doFindFileNamed:namePatterns directories:searchDirectories nameMatch:nameMatch contentsMatch:doesFileMatch in:aDirectory
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1987
    "the recursive walker. Searches for files matching namematch-block,
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1988
     and contents matching doesFileMatch-block"
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1989
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1990
    |dir subDirs list directoryContents updateInfo|
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1991
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  1992
    dir := aDirectory asFilename.
5844
11812dd2d7d6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5811
diff changeset
  1993
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1994
    updateInfo :=
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1995
        [
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1996
            self 
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1997
                changeInformationTo:('%1 found - searching %2' 
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  1998
                                        bindWith:resultList size
18709
259745978ab4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18675
diff changeset
  1999
                                        with:(((dir name) copyFrom:(self searchDirectoryHolder value asString size + 1))
259745978ab4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18675
diff changeset
  2000
                                                    contractTo:80)) 
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2001
                toTab:false.
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2002
        ].
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2003
14748
e6132b5f9f68 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 14064
diff changeset
  2004
    self window shown ifTrue:[
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2005
        updateInfo value.
14748
e6132b5f9f68 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 14064
diff changeset
  2006
    ].
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2007
    list := self resultList.
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2008
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2009
    subDirs := OrderedCollection new.
321c1729db5b initial checkin
penk
parents:
diff changeset
  2010
4638
79734f7bdfc4 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4518
diff changeset
  2011
    [
79734f7bdfc4 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4518
diff changeset
  2012
        directoryContents := dir directoryContents.
19399
d9c84d98a5e4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19260
diff changeset
  2013
    ] on:OpenError do:[:ex|
15660
252c9daa66e0 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15217
diff changeset
  2014
        self showUnreadableFilesAndDirectoriesHolder value ifTrue:[
18675
f7d7084c61cc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18630
diff changeset
  2015
            list add:((ex pathName , ' -> ' , ex description) withColor:Color darkRed).
15660
252c9daa66e0 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15217
diff changeset
  2016
        ].
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2017
        "/        self warn:('Cannot access %1\(%2)'
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2018
        "/                        bindWith:ex parameter printString
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2019
        "/                        with:ex description) withCRs.
4638
79734f7bdfc4 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4518
diff changeset
  2020
        ^ self
79734f7bdfc4 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4518
diff changeset
  2021
    ].
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  2022
4638
79734f7bdfc4 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4518
diff changeset
  2023
    directoryContents sort do:[:fn |
4518
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  2024
        |f isDirectory|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2025
321c1729db5b initial checkin
penk
parents:
diff changeset
  2026
        f := dir construct:fn.
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  2027
4518
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  2028
        isDirectory := f isDirectory.
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  2029
        isDirectory ifTrue:[
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2030
            f isSymbolicLink ifFalse:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  2031
                subDirs add:f
321c1729db5b initial checkin
penk
parents:
diff changeset
  2032
            ]
4518
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  2033
        ].
85b13890d7b1 allow to search for directories
Claus Gittinger <cg@exept.de>
parents: 4336
diff changeset
  2034
        (searchDirectories or:[isDirectory not]) ifTrue:[
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2035
            (nameMatch value:fn) ifTrue:[
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2036
                filesSearchedCount := (filesSearchedCount ? 0) + 1.
18370
04c5fa4abafc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17894
diff changeset
  2037
                (isDirectory or:[ doesFileMatch value:f ]) ifTrue:[
15217
d815d45f3c53 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15214
diff changeset
  2038
                    updateInfo value.
5176
b76af7e92feb option to use locate for faster search
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  2039
                    list add:(f asString).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2040
                ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  2041
            ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  2042
        ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  2043
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  2044
321c1729db5b initial checkin
penk
parents:
diff changeset
  2045
    self searchRecursively value ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  2046
        subDirs do:[:dir |
321c1729db5b initial checkin
penk
parents:
diff changeset
  2047
            self
321c1729db5b initial checkin
penk
parents:
diff changeset
  2048
                doFindFileNamed:namePatterns 
5600
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2049
                directories:searchDirectories 
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2050
                nameMatch:nameMatch 
4e7bca968c09 findFile code cleanup (and speedup by factor of 2)
Claus Gittinger <cg@exept.de>
parents: 5557
diff changeset
  2051
                contentsMatch:doesFileMatch 
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2052
                in:dir
321c1729db5b initial checkin
penk
parents:
diff changeset
  2053
        ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  2054
    ]
10441
3238040023bb class definition
Claus Gittinger <cg@exept.de>
parents: 9536
diff changeset
  2055
15660
252c9daa66e0 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 15217
diff changeset
  2056
    "Modified: / 22-05-2015 / 11:42:17 / cg"
18709
259745978ab4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18675
diff changeset
  2057
    "Modified: / 23-03-2019 / 12:27:35 / Claus Gittinger"
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2058
!
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2059
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2060
fileSizeWrapperFor:aFileMatchBlock
17856
3cfbcdbab1ad #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17855
diff changeset
  2061
    "possibly wrap the search-match block into a file-size matcher block"
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2062
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2063
    |fileSizeToCompare sizeMatch op compare|
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2064
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2065
    self enableFileSizeFilter value ifFalse:[ ^ aFileMatchBlock ].
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2066
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2067
    fileSizeToCompare := self fileSizeHolder value.
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2068
    op := self fileSizeOperatorHolder value withoutSeparators.
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2069
    op = '~' ifTrue:[
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2070
        compare := [:sz | sz between:(fileSizeToCompare*0.9) and:(fileSizeToCompare*1.1) ].
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2071
    ] ifFalse:[
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2072
        op := op asSymbol.
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2073
        compare := [:sz | sz perform:op with:fileSizeToCompare ].
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2074
    ].
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2075
17855
9122cdf37cfd #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17751
diff changeset
  2076
    sizeMatch := [:f | compare value:(f fileSize ? 0) ].
11097
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2077
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2078
    ^ [:f | (sizeMatch value:f) and:[ aFileMatchBlock value:f ]]
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2079
0319362db871 refactored
Claus Gittinger <cg@exept.de>
parents: 11096
diff changeset
  2080
    "Created: / 11-01-2012 / 23:17:02 / cg"
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2081
!
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2082
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2083
modificationTimeWrapperFor:aFileMatchBlock
17856
3cfbcdbab1ad #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17855
diff changeset
  2084
    "possibly wrap the search-match block into a modification time matcher block"
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2085
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2086
    |timeToCompare timeMatch idx op compare|
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2087
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2088
    self enableModificationTimeFilter value ifFalse:[ ^ aFileMatchBlock ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2089
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2090
    timeToCompare := self modificationTimeHolder value.
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2091
    idx := self modificationTimeOperatorIndexHolder value.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2092
    op := self modificationTimeOperatorValueList at:idx.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2093
    op = #after ifTrue:[
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2094
        compare := [:t | t > timeToCompare ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2095
    ] ifFalse:[
16810
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2096
        op = #before ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2097
            compare := [:t | t < timeToCompare ].
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2098
        ] ifFalse:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2099
            op = #inDay ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2100
                timeToCompare := timeToCompare asDate.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2101
                compare := [:t | t asDate = timeToCompare ].
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2102
            ] ifFalse:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2103
                op = #inMonth ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2104
                    timeToCompare := timeToCompare asDate.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2105
                    compare := [:t | t month = timeToCompare month
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2106
                                     and:[t year = timeToCompare year] ].
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2107
                ] ifFalse:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2108
                    op = #inYear ifTrue:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2109
                        timeToCompare := timeToCompare asDate.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2110
                        compare := [:t | t year = timeToCompare year ].
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2111
                    ] ifFalse:[
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2112
                        self halt.
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2113
                    ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2114
                ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2115
            ].    
dee205471698 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16639
diff changeset
  2116
        ].
11473
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2117
    ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2118
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2119
    timeMatch := [:f | 
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2120
                    |t| 
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2121
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2122
                    t := f modificationTime. 
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2123
                    t notNil and:[ compare value:t ]
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2124
                 ].
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2125
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2126
    ^ [:f | (timeMatch value:f) and:[ aFileMatchBlock value:f ]]
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2127
2d838f1ab6e3 class definition
Claus Gittinger <cg@exept.de>
parents: 11423
diff changeset
  2128
    "Created: / 28-03-2012 / 23:18:32 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2129
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  2130
321c1729db5b initial checkin
penk
parents:
diff changeset
  2131
!FindFileApplication methodsFor:'queries'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2132
7688
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
  2133
getTabValueString
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
  2134
    "the item shown in a tab (not language translated)"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2135
7691
6ff02cb42c55 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7688
diff changeset
  2136
    ^ self fileName directory baseName
7688
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
  2137
9f592c9a86db code cleanup
Claus Gittinger <cg@exept.de>
parents: 7574
diff changeset
  2138
    "Created: / 01-03-2007 / 21:39:54 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2139
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  2140
321c1729db5b initial checkin
penk
parents:
diff changeset
  2141
!FindFileApplication methodsFor:'startup & release'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2142
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2143
initialize
17368
2065f601f1ea #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16965
diff changeset
  2144
    <modifier: #super> "must be called if redefined"
2065f601f1ea #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16965
diff changeset
  2145
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2146
    super initialize.
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2147
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2148
    self enableStop value:false.
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2149
    self enableSearch value:true.
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2150
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2151
    "Created: / 12-01-2012 / 01:38:29 / cg"
17368
2065f601f1ea #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16965
diff changeset
  2152
    "Modified: / 08-02-2017 / 00:27:53 / cg"
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2153
!
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2154
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4798
diff changeset
  2155
item:anItem
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2156
4797
6e16a84c6bb5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4638
diff changeset
  2157
    |file newPattern|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2158
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4798
diff changeset
  2159
    super item:anItem.
4797
6e16a84c6bb5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4638
diff changeset
  2160
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2161
    file := self fileName.
19260
d082352a8312 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19013
diff changeset
  2162
    file isNil ifTrue:[^ false].
d082352a8312 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19013
diff changeset
  2163
19013
b2d7615aebc4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18987
diff changeset
  2164
    self searchDirectoryHolder value:(AbstractFileBrowser getDirectoryOf:file).
4797
6e16a84c6bb5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4638
diff changeset
  2165
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2166
    file isDirectory ifTrue:[
4797
6e16a84c6bb5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4638
diff changeset
  2167
        newPattern := '*'.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2168
    ] ifFalse:[
12739
5dfe43fb5704 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12494
diff changeset
  2169
        anItem suffix isEmptyOrNil ifTrue:[
5dfe43fb5704 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12494
diff changeset
  2170
            newPattern := '*'.
5dfe43fb5704 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12494
diff changeset
  2171
        ] ifFalse:[
5dfe43fb5704 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12494
diff changeset
  2172
            newPattern := '*.', anItem suffix.
5dfe43fb5704 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 12494
diff changeset
  2173
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2174
    ].
4797
6e16a84c6bb5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4638
diff changeset
  2175
    self namePatternHolder value:newPattern.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2176
    ^ true.
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2177
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2178
    "Modified: / 12-01-2012 / 01:38:14 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2179
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2180
321c1729db5b initial checkin
penk
parents:
diff changeset
  2181
postOpenWith:aBuilder
321c1729db5b initial checkin
penk
parents:
diff changeset
  2182
    self masterApplication isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
  2183
        self masterApplication:nil.
321c1729db5b initial checkin
penk
parents:
diff changeset
  2184
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  2185
    findFileView := aBuilder window.
321c1729db5b initial checkin
penk
parents:
diff changeset
  2186
    self windowGroup addPreEventHook:self.
6633
6843fedf7516 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6583
diff changeset
  2187
    super postOpenWith:aBuilder.
11101
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2188
34affbf84319 refactored
Claus Gittinger <cg@exept.de>
parents: 11097
diff changeset
  2189
    "Modified (format): / 12-01-2012 / 01:40:44 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2190
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2191
321c1729db5b initial checkin
penk
parents:
diff changeset
  2192
release
321c1729db5b initial checkin
penk
parents:
diff changeset
  2193
    self stopSearchTask.
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  2194
    contentsInfoCache := nil.
14064
7aa0a1075ee8 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 13920
diff changeset
  2195
    super release
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2196
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  2197
321c1729db5b initial checkin
penk
parents:
diff changeset
  2198
!FindFileApplication class methodsFor:'documentation'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2199
321c1729db5b initial checkin
penk
parents:
diff changeset
  2200
version
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  2201
    ^ '$Header$'
9036
9242245f6689 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8613
diff changeset
  2202
!
9242245f6689 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8613
diff changeset
  2203
9242245f6689 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8613
diff changeset
  2204
version_CVS
16186
aa2cd75d6b8d #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15660
diff changeset
  2205
    ^ '$Header$'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2206
! !
12339
4fb3104f0334 class: FindFileApplication
Claus Gittinger <cg@exept.de>
parents: 11474
diff changeset
  2207