HierarchicalFileList.st
author penk
Wed, 11 Sep 2002 14:54:54 +0200
changeset 2180 d01612ed451e
parent 2140 7dfe3b338437
child 2223 c34e7fd25e53
permissions -rw-r--r--
get the icons from the FileBrowser now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1431
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     1
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     2
 COPYRIGHT (c) 1999 by eXept Software AG
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     3
              All Rights Reserved
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     4
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     5
 This software is furnished under a license and may be used
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     6
 only in accordance with the terms of that license and with the
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     8
 be provided or otherwise made available to, or used by, any
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
     9
 other person.  No title to or ownership of the software is
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    10
 hereby transferred.
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    11
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    12
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    13
1780
867e59c91ff7 use icons derived from FileBrowser
ca
parents: 1582
diff changeset
    14
"{ Package: 'stx:libwidg2' }"
867e59c91ff7 use icons derived from FileBrowser
ca
parents: 1582
diff changeset
    15
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
HierarchicalList subclass:#HierarchicalFileList
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
    17
	instanceVariableNames:'matchBlock showCursor'
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    18
	classVariableNames:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    19
	poolDictionaries:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    20
	category:'Views-Support'
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
HierarchicalItem subclass:#File
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    24
	instanceVariableNames:'fileName icon'
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    25
	classVariableNames:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    26
	poolDictionaries:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    27
	privateIn:HierarchicalFileList
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
HierarchicalFileList::File subclass:#Directory
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    31
	instanceVariableNames:'modificationTime'
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    32
	classVariableNames:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    33
	poolDictionaries:''
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
    34
	privateIn:HierarchicalFileList::File
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
1431
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    37
!HierarchicalFileList class methodsFor:'documentation'!
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    38
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    39
copyright
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    40
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    41
 COPYRIGHT (c) 1999 by eXept Software AG
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    42
              All Rights Reserved
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    43
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    44
 This software is furnished under a license and may be used
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    45
 only in accordance with the terms of that license and with the
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    46
 inclusion of the above copyright notice.   This software may not
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    47
 be provided or otherwise made available to, or used by, any
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    48
 other person.  No title to or ownership of the software is
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    49
 hereby transferred.
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    50
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    51
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    52
! !
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
!HierarchicalFileList class methodsFor:'examples'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
    56
examples
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
    57
"
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
    58
                                                                    [exBegin]
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
    59
    |top sel list|
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    list := HierarchicalFileList new.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    list directory:(Filename homeDirectory).
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    list showRoot:false.
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
    64
    list matchBlock:[:fn :isDir| true ].
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    top := StandardSystemView new; extent:300@300.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    sel := ScrollableView for:HierarchicalListView miniScroller:true
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
                       origin:0.0@0.0 corner:1.0@1.0 in:top.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    sel list:list.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    list root expand.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    sel doubleClickAction:[:i| (list at:i) toggleExpand ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    sel   indicatorAction:[:i| (list at:i) toggleExpand ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    top open.
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
    77
                                                                    [exEnd]
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
    78
"
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
!HierarchicalFileList methodsFor:'accessing'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
directory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "returns the root directory or nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    ^ root notNil ifTrue:[root fileName] ifFalse:[nil]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
directory:aDirectory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    "set the root directory or nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    |directory|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
1960
2363303c1c8c monitoring must be enebled by user (no longer automatically)
ca
parents: 1867
diff changeset
    95
"/    must explicitly enabled by user: ca
2363303c1c8c monitoring must be enebled by user (no longer automatically)
ca
parents: 1867
diff changeset
    96
"/    monitoringTaskDelay := 1.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    (aDirectory notNil and:[(directory := aDirectory asFilename) exists]) ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
        directory isDirectory ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
            directory := directory directory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    ] ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
        directory := nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    directory = self directory ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
        directory notNil ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
            directory := File fileName:directory isDirectory:true
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
        ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
        self root:directory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
!HierarchicalFileList methodsFor:'actions'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
matchBlock
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    "set the matchBlock - if non-nil, it controls which files are visible.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    ^ matchBlock
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
        
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
matchBlock:aBlock
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    "set the matchBlock - if non-nil, it controls which files are visible.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    matchBlock := aBlock.
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   127
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   128
    root notNil ifTrue:[
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   129
        self recursionLock critical:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   130
            self stopMonitoringTask.
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   131
            root matchBlockChanged.
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   132
        ].
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   133
        self startMonitoringTask.
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   134
    ].
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   135
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
2104
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   138
!HierarchicalFileList methodsFor:'private monitoring task'!
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   139
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   140
monitoringCycle
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   141
    "the block evaluated by the monitoring task; test whether directory is expanded
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   142
     otherwise we have not to evaluate the directory contents.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   143
     think about remote file-systems
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   144
    "
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   145
    |index item|
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   146
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   147
    item  := root.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   148
    index := showRoot ifTrue:[1] ifFalse:[0].
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   149
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   150
    [item notNil] whileTrue:[
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   151
        (item isDirectory and:[item getChildren notNil]) ifTrue:[
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   152
            "/ children already initialized; thus we can update the contents
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   153
            item monitoringCycle
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   154
        ].
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   155
        Processor yield.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   156
        index := index + 1.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   157
        item  := self at:index ifAbsent:nil.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   158
    ].
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   159
! !
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   160
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
!HierarchicalFileList methodsFor:'protocol'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
childrenFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
    "returns all visible children derived from the physical
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
     directory contents.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    |contents list block|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   169
    anItem isDirectory ifFalse:[^ #()].
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   171
    contents := DirectoryContents directoryNamed:(anItem fileName).
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   172
    contents ifNil:[ ^ #() ].
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   175
    list  := SortedCollection sortBlock:[:a :b| |res|
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   176
        a isDirectory == b isDirectory ifTrue:[ res := a baseName <= b baseName ]
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   177
                                      ifFalse:[ res := a isDirectory ].
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   178
        res
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   179
    ].
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   180
    block := self matchBlockFor:anItem.
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   181
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   182
    block isNil ifTrue:[
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   183
        contents contentsDo:[:fn :isDir|
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   184
            list add:(File fileName:fn isDirectory:isDir)
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   185
        ]
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   186
    ] ifFalse:[
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   187
        contents contentsDo:[:fn :isDir|
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   188
            (block value:fn value:isDir) ifTrue:[
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   189
                list add:(File fileName:fn isDirectory:isDir)
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   190
            ]
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
    ].
2130
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   193
    list isEmpty ifTrue:[^ #()].
8b64928cd378 sort children: directories first
ca
parents: 2128
diff changeset
   194
  ^ list asOrderedCollection
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
hasChildrenFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    "returns true if the physical directory contains at least
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
     one visible item otherwise false.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    |block|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
    anItem isDirectory ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
        ^ false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
    (block := self matchBlockFor:anItem) isNil ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
        block := [:aFilename :isDirectory| true ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    ^ DirectoryContents directoryNamed:(anItem fileName) detect:block
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
iconFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
    "returns the icon for an item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
   217
    (anItem isExpanded and:[anItem hasChildren]) ifTrue:[
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
   218
        ^ FileBrowser iconForKeyMatching:#directoryOpen
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    ].
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
   220
    ^ FileBrowser iconForFile:(anItem fileName)
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
matchBlockFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
    "get the matchBlock - if non-nil, it controls which files are
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
     visible within the physical directory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
    ^ matchBlock        
2095
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   228
!
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   229
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   230
validateIcon:anIcon for:anItem
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   231
    ^ anIcon
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   234
!HierarchicalFileList methodsFor:'searching'!
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   235
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   236
detectItemFor:aPathOrFilename
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   237
    "make a filename visible
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   238
    "
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   239
    |file node p1 p2 sz|
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   240
1582
bed19387e545 bug fix
ca
parents: 1581
diff changeset
   241
    aPathOrFilename isNil ifTrue:[^ nil].
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   242
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   243
    file := aPathOrFilename asFilename.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   244
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   245
    file exists ifFalse:[
1582
bed19387e545 bug fix
ca
parents: 1581
diff changeset
   246
        ^ nil
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   247
    ].
1582
bed19387e545 bug fix
ca
parents: 1581
diff changeset
   248
    (node := root) isNil ifTrue:[^ nil].
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   249
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   250
    p1 := node pathName.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   251
    p2 := file pathName.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   252
1582
bed19387e545 bug fix
ca
parents: 1581
diff changeset
   253
    (p2 startsWith:p1) ifFalse:[^ nil].
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   254
    sz := 1 + p1 size.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   255
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   256
    (p1 last == Filename separator) ifFalse:[
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   257
        sz := sz + 1.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   258
    ].
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   259
1582
bed19387e545 bug fix
ca
parents: 1581
diff changeset
   260
    p2 size > sz ifFalse:[^ nil].
1581
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   261
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   262
    p2 :=  Filename components:(p2 copyFrom:sz).
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   263
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   264
    p2 do:[:bn|
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   265
        node := node detect:[:el| el baseName = bn] ifNone:nil.
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   266
        node isNil ifTrue:[^ nil ].
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   267
    ].
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   268
    ^ node
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   269
! !
5a8b7ce35090 detct item for a specific fileName
ca
parents: 1431
diff changeset
   270
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
!HierarchicalFileList::File class methodsFor:'instance creation'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
fileName:aFileName isDirectory:isDirectory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
    "instance creation
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
    |item|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    item := isDirectory ifTrue:[Directory new] ifFalse:[HierarchicalFileList::File new].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    item fileName:aFileName.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
  ^ item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
!HierarchicalFileList::File methodsFor:'accessing'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
baseName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    "returns the baseName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
    "
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
   289
    ^ fileName baseName.
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
   290
"/    ^ baseName
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
children
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    "always returns an empty list
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    ^ #()
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
fileName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
    "returns the fileName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    ^ fileName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
fileName:fname
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    "instance creation
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    fileName := fname.
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
   311
"/    baseName := fname baseName.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
icon
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
    "returns the icon key
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
    |model|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
2095
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   319
    model := self model.
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   320
    model ifNil:[^ nil].
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   321
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
    icon isNil ifTrue:[
2095
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   323
        icon := model iconFor:self
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
    ].
2095
46120b1fd644 can change icon
penk
parents: 1960
diff changeset
   325
    ^ model validateIcon:icon for:self
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
label
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
    "returns the printable name, the baseName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    "
2138
4175c127f9b8 removed baseName
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
   331
    ^ self baseName
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
pathName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
    "returns the pathName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
    ^ fileName pathName
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
!HierarchicalFileList::File methodsFor:'accessing hierarchy'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
recursiveExpand
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
    "redefined to expand
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
    self expand
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
!HierarchicalFileList::File methodsFor:'invalidate'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
invalidate
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
    "invalidate the contents
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
    self invalidateRepairNow:false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
invalidateRepairNow
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
    "invalidate the contents; repair now
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
    self invalidateRepairNow:true
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
invalidateRepairNow:doRepair
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
    "invalidate the contents; dependent on the boolean
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
     do repair immediately
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   372
!
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   373
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   374
matchBlockChanged
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   375
    "called if the matchBlock changed
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   376
    "
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   377
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
2127
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   380
!HierarchicalFileList::File methodsFor:'printing'!
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   381
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   382
printString
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   383
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   384
    ^ super printString, ' for: ', self fileName asString
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   385
! !
effea319e46b add printString method to see file for Item
penk
parents: 2104
diff changeset
   386
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
!HierarchicalFileList::File methodsFor:'queries'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
hasChildren
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
    "always returns false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
    ^ false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
isDirectory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
    "always returns false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
    ^ false
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
!HierarchicalFileList::File::Directory methodsFor:'accessing'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
children
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
    "returns the list of children
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
    |model list|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   409
    children notNil ifTrue:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   410
        ^ children
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   411
    ].
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   413
    (model := self model) isNil ifTrue:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   414
        "/ must reread later
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   415
        modificationTime := children := nil.
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   416
        ^ nil
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   417
    ].
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   419
    children := #().
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   420
    modificationTime := fileName modificationTime.
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   421
    list := model childrenFor:self.
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   422
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   423
    list size ~~ 0 ifTrue:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   424
        list do:[:aChild| aChild parent:self].
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   425
        children := list.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
    ^ children
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
icon
2140
7dfe3b338437 expanded icon comes from HierarchicalFileList now
penk
parents: 2138
diff changeset
   431
    "reset first and returns the new icon
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
    "
2140
7dfe3b338437 expanded icon comes from HierarchicalFileList now
penk
parents: 2138
diff changeset
   433
    icon := nil.    
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
    ^ super icon
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
2104
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   437
!HierarchicalFileList::File::Directory methodsFor:'accessing-hierarchy'!
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   438
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   439
expand
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   440
    "expand children; must redefine to raise a notification
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   441
     if children are not yet initialized and after initialization empty.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   442
    "
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   443
    |notInit|
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   444
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   445
    notInit := children isNil.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   446
    super expand.
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   447
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   448
    notInit ifTrue:[
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   449
        (children notNil and:[children isEmpty]) ifTrue:[
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   450
            "/ no children exists
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   451
            "/ indicator +/- has changed to unexistant
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   452
            self changed:#redraw
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   453
        ]
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   454
    ].
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   455
! !
327f2f77ec12 support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents: 2095
diff changeset
   456
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
!HierarchicalFileList::File::Directory methodsFor:'queries'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
hasChildren
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
    "returns true if children exists
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
    ^ children isNil or:[children notEmpty]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
isDirectory
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
    "always returns true
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
    ^ true
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
!HierarchicalFileList::File::Directory methodsFor:'validation'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
invalidateRepairNow:doRepair
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
    "invalidate contents
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
    modificationTime := nil.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
    doRepair ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
        self monitoringCycle
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
    ] ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
        (isExpanded or:[children size == 0]) ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
            children := nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   490
matchBlockChanged
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   491
    "called if the matchBlock changed
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   492
    "
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   493
    modificationTime := nil.
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   494
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   495
    isExpanded ifFalse:[
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   496
        children := nil.
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   497
    ] ifTrue:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   498
        self monitoringCycle.
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   499
1867
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   500
        children size ~~ 0 ifTrue:[
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   501
            children do:[:aChild| aChild matchBlockChanged ]
a50479cd3653 recompute list if matchBlock changed
ca
parents: 1866
diff changeset
   502
        ]
1866
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   503
    ].
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   504
!
2993c95f7f69 recompute list if matchBlock changed
ca
parents: 1780
diff changeset
   505
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
monitoringCycle
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
    "run monitoring cycle
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
    |list size name modifyTime isNotEmpty wasNotEmpty model|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
    modifyTime := fileName modificationTime.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
    (modificationTime notNil and:[modifyTime <= modificationTime]) ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
        ^ self
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
    model := self model.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    modificationTime := modifyTime.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
    isExpanded ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
     "/ CHECK WHETHER CHILDREN EXIST( INDICATOR )
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
     "/ =========================================
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
        isNotEmpty := model hasChildrenFor:self.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
     "/ check whether has changed durring evaluation
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
        (isExpanded or:[modificationTime ~= modifyTime]) ifFalse:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
            wasNotEmpty := children isNil.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
            children    := isNotEmpty ifTrue:[nil] ifFalse:[#()].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
            wasNotEmpty ~~ isNotEmpty ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
                self changed
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
            ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
        ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
        ^ self
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
 "/ START MERGING( CONTENTS IS VISIBLE )
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
 "/ ====================================
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    list := model childrenFor:self.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
    list size == 0 ifTrue:[                         "/ contents becomes empty
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
        ^ self removeAll                            "/ clear contents
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
    (size := children size) == 0 ifTrue:[           "/ old contents was empty 
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
        ^ self addAll:list.                         "/ take over new contents
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
    size to:1 by:-1 do:[:anIndex|                   "/ remove invisible items
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
        name := (children at:anIndex) baseName.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
        (list findFirst:[:i|i baseName = name]) == 0 ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
            self removeIndex:anIndex
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
    list keysAndValuesDo:[:anIndex :anItem|         "/ add new visible items
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
        name := anItem baseName.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
        (children findFirst:[:i|i baseName = name]) == 0 ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
            self add:anItem beforeIndex:anIndex
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
!HierarchicalFileList class methodsFor:'documentation'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
version
2180
d01612ed451e get the icons from the FileBrowser now
penk
parents: 2140
diff changeset
   571
    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalFileList.st,v 1.18 2002-09-11 12:54:54 penk Exp $'
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
! !