HierarchicalList.st
author Merge Script
Sat, 30 Apr 2016 06:46:08 +0200
branchjv
changeset 5037 a991ac280740
parent 4676 d793a43a8860
child 5216 50b4b75edc7b
permissions -rw-r--r--
Merge
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
"
1751
bcba7dd03cbd move isHierarchicalItem to Object
ca
parents: 1733
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
bcba7dd03cbd move isHierarchicalItem to Object
ca
parents: 1733
diff changeset
    13
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
List subclass:#HierarchicalList
1733
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
    15
	instanceVariableNames:'recursionLock root showRoot application monitoringTask
2223
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
    16
		monitoringTaskDelay additionalItemsToMonitorSemaphore'
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
1430
ae9e48cc7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
    19
	category:'Views-Support'
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!HierarchicalList class methodsFor:'documentation'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
1431
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    24
copyright
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    25
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    26
 COPYRIGHT (c) 1999 by eXept Software AG
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    27
              All Rights Reserved
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    28
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    29
 This software is furnished under a license and may be used
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    30
 only in accordance with the terms of that license and with the
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    32
 be provided or otherwise made available to, or used by, any
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    33
 other person.  No title to or ownership of the software is
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    34
 hereby transferred.
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    35
"
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    36
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    37
!
0cc20a8f2f7c docu & copyright
Claus Gittinger <cg@exept.de>
parents: 1430
diff changeset
    38
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    Hierarchical Lists are mostly like List, but adding and removing
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    elements are handled by the items itself.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    Special change notifications are emitted, whenever the list
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    changed.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    [Instance variables:]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
        root        <HierarchicalItem>  first item into list
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
        showRoot    <Boolean>           show or hide root item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        application <Application>       the user is able to set an application
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
                                        which can be accessed by an item.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    [author:]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
        Claus Atzkern
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    [see also:]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
        HierarchicalItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
        HierarchicalListView
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
"
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1751
diff changeset
    62
!HierarchicalList methodsFor:'accessing-look'!
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
showRoot
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    "show or hide root item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "
2430
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
    67
    showRoot isNil ifTrue:[
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
    68
        showRoot := true
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
    69
    ].
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
    70
    ^ showRoot
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
showRoot:aBoolean
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    "show or hide root item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    aBoolean ~~ self showRoot ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
        showRoot := aBoolean.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
        root notNil ifTrue:[
1869
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    80
            showRoot ifTrue:[
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    81
                super addFirst:root
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    82
            ] ifFalse:[
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    83
                super removeFirst.
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    84
                root expand
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
    85
            ]
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
        ]
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
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1751
diff changeset
    91
!HierarchicalList methodsFor:'accessing-monitoring task'!
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
monitoringTaskDelay
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    "get the delay time of the monitoring task measured  in seconds
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
     or nil( monitoring disabled ). The task runs through all items 
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     of the list performing #monitoringCycle and than at end of the
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
     list the task is suspended for monitoringTaskDelay seconds.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    ^ monitoringTaskDelay
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
monitoringTaskDelay:inSecondsOrNil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
    "set the delay time of the monitoring task measured  in seconds
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
     or nil( monitoring disabled ). The task runs through all items 
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
     of the list performing #monitoringCycle and than at end of the
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
     list the task is suspended for monitoringTaskDelay seconds.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    inSecondsOrNil isNil ifTrue:[
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   109
        self stopMonitoringTask.
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   110
        monitoringTaskDelay := nil.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    ] ifFalse:[
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   112
        monitoringTaskDelay := inSecondsOrNil.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
        self startMonitoringTask
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1751
diff changeset
   117
!HierarchicalList methodsFor:'accessing-mvc'!
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   119
addDependent:anObject
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   120
    "restart the monitoringTask if neccessary
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   121
    "
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   122
    super addDependent:anObject.
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   123
    self  startMonitoringTask.
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   124
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   125
!
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   126
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
application
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    "returns the responsible application; if no application is defined,
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
     nil is returned
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    ^ application
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
application:anApplication
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    "set the responsible application
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    "
1733
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   137
    application := anApplication.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
applicationsDo:aOneArgBlock
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
    "evaluate the block on each dependent application
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    |appl|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    dependents notNil ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
        dependents do:[:aDep|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
            appl := aDep perform:#application ifNotUnderstood:nil.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
            appl notNil ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
                aOneArgBlock value:appl
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
            ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    ]
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   154
!
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   155
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   156
removeDependent:anObject
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   157
    "stop the monitoringTask if no more dependencies exists
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   158
    "
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   159
    super removeDependent:anObject.
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   160
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   161
    dependents size == 0 ifTrue:[
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   162
        self stopMonitoringTask
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   163
    ].
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   164
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1751
diff changeset
   167
!HierarchicalList methodsFor:'accessing-root'!
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
root
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    "get the root item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    ^ root
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
root:aRoot
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    "set the root item
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    "
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   179
    |children|
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    self stopMonitoringTask.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    root notNil ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
        root parent:nil.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
        root := nil.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   188
    (root := aRoot) isEmptyOrNil ifTrue:[
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   189
        self removeAll.
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   190
    ] ifFalse:[
1869
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
   191
        self showRoot ifFalse:[root expand].
2d7fbc8d5429 expand root if not visible
ca
parents: 1818
diff changeset
   192
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
        root parent:self.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
        children := OrderedCollection new.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
        self showRoot ifTrue:[children add:root].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
        root addVisibleChildrenTo:children.
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   197
        "/ self removeAll.
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   198
        "/ self addAll:children beforeIndex:1.
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   199
        self contents:children.    
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    self startMonitoringTask.
3070
c08536fb052f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2902
diff changeset
   202
c08536fb052f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2902
diff changeset
   203
    "Modified: / 12-09-2006 / 18:22:42 / cg"
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
!HierarchicalList methodsFor:'private'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
2258
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   208
criticalDo:aBlock
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   209
    "evaluate the block in a critical region
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   210
    "
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   211
    ^ recursionLock critical:aBlock
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   212
!
a3e78fb530eb add criticalDo:
ca
parents: 2231
diff changeset
   213
1733
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   214
initContents:aSize
2430
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   215
    "setup defaults
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   216
    "
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   217
    showRoot      isNil ifTrue:[ showRoot      := true ].
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   218
    recursionLock isNil ifTrue:[ recursionLock := RecursionLock new ].
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   219
1733
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   220
    ^ super initContents:aSize.
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   221
!
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   222
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
itemAddAll:aListOfItems beforeIndex:anIndex
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
    "insert all items before an index
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
    super addAll:aListOfItems beforeIndex:anIndex
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
itemChanged:what with:aPara from:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    "catch notification from item; throw changeNotifications
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
     to dependencies;
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
     **** don't know what to do with a parameter and argument what
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
     **** list protocol ****
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
    |index arrIdx "{ Class: SmallInteger }"|
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    (index := super identityIndexOf:anItem) ~~ 0 ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
        arrIdx := index + firstIndex - 1.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
        contentsArray basicAt:arrIdx put:anItem.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
        dependents size ~~ 0 ifTrue:[
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
            what isNil ifTrue:[self changed:#at: with:index]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
                      ifFalse:[self changed:#at: with:(Array with:index with:what)]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
        ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    ]
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
itemRemoveFromIndex:start toIndex:stop
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
    "remove the items stored under startIndex up to and including
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
     the items under stopIndex.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    ^ super removeFromIndex:start toIndex:stop
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
parentOrModel
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    "always returns nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    ^ nil
1733
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   259
!
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   260
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   261
recursionLock
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   262
    ^ recursionLock
67c144581e63 add critical semaphore (RecursionLock)
ca
parents: 1616
diff changeset
   263
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
2493
8b70a26f1694 method category rename
Claus Gittinger <cg@exept.de>
parents: 2456
diff changeset
   266
!HierarchicalList methodsFor:'private-monitoring task'!
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
1437
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   268
monitoringCycle
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   269
    "the block evaluated
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   270
    "
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   271
    |index item|
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   272
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   273
    item  := root.
2430
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   274
    index := 1.                 "/ on default discard first entry the root
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   275
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   276
    root isNil ifTrue:[
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   277
        item := self at:index ifAbsent:nil.
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   278
    ] ifFalse:[
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   279
        self showRoot ifFalse:[
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   280
            index := 0          "/ read list from begin
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   281
        ]
e50f234bf3fe access showRoot by method
ca
parents: 2412
diff changeset
   282
    ].
1437
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   283
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   284
    [item notNil] whileTrue:[
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   285
        item monitoringCycle.
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   286
        Processor yield.
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   287
        index := index + 1.
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   288
        item  := self at:index ifAbsent:nil.
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   289
    ]
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   290
!
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   291
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
startMonitoringTask
2223
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   293
    "start the monitoring task; backgrund process finishes, when no (more) dependencies exist,
2743
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   294
     and the additionalItemsToMonitorSemaphore is not signalled 
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   295
     (aka: no more background children to read)"
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   296
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   297
    |name|
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   298
2744
21b90562122b Fix monitoring task starting (bug introduced in last version)
Stefan Vogel <sv@exept.de>
parents: 2743
diff changeset
   299
    (monitoringTask isNil
21b90562122b Fix monitoring task starting (bug introduced in last version)
Stefan Vogel <sv@exept.de>
parents: 2743
diff changeset
   300
        and:[self monitoringTaskDelay notNil
2743
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   301
        and:[(dependents size ~~ 0) or:[additionalItemsToMonitorSemaphore notNil]]]
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    ) ifTrue:[
3832
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   303
        monitoringTask := 
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   304
            [
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   305
                [(dependents size ~~ 0) or:[additionalItemsToMonitorSemaphore notNil]] whileTrue:[
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   306
                    self monitoringCycle.
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   307
                    additionalItemsToMonitorSemaphore isNil ifTrue:[
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   308
                        Delay waitForSeconds:self monitoringTaskDelay
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   309
                    ] ifFalse:[
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   310
                        additionalItemsToMonitorSemaphore waitWithTimeout:self monitoringTaskDelay.
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   311
                    ]
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   312
                ].
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   313
            ] newProcess.
2273
1a7a91282d3f priority range for monitoring task
penk
parents: 2258
diff changeset
   314
1a7a91282d3f priority range for monitoring task
penk
parents: 2258
diff changeset
   315
        monitoringTask priorityRange:(Processor userBackgroundPriority to:Processor activePriority).
2412
8c3d2548998e restart process after restart from image
penk
parents: 2273
diff changeset
   316
        monitoringTask restartable:true.
2273
1a7a91282d3f priority range for monitoring task
penk
parents: 2258
diff changeset
   317
        monitoringTask resume.
1437
3ff0d67ec0af separate monitoringCycle from startMonitoringCycle
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   318
1439
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   319
        name := application notNil ifTrue:[application class name] ifFalse:['???'].
ddcd6e87e406 wait for termination monitoringTask before continue
Claus Gittinger <cg@exept.de>
parents: 1437
diff changeset
   320
        monitoringTask name:'HierarchicalList: ', name.
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
    ].
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
    ^ true.
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
stopMonitoringTask
2743
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   326
    "stop the monitoring task"
0ddd4c24c02d Remove unused variables
Stefan Vogel <sv@exept.de>
parents: 2493
diff changeset
   327
1616
be5eb8527f82 make stopMonitoring save
ca
parents: 1439
diff changeset
   328
    |task|
be5eb8527f82 make stopMonitoring save
ca
parents: 1439
diff changeset
   329
be5eb8527f82 make stopMonitoring save
ca
parents: 1439
diff changeset
   330
    (task := monitoringTask) notNil ifTrue:[
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
        monitoringTask := nil.
1616
be5eb8527f82 make stopMonitoring save
ca
parents: 1439
diff changeset
   332
3832
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   333
        Error 
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   334
            handle:[:ex| ] 
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   335
            do:[
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   336
                task terminateWithAllSubprocessesInGroup.
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   337
                task waitUntilTerminated.
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   338
            ]
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
    ]
2223
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   340
!
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   341
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   342
triggerUpdateCycle
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   343
    additionalItemsToMonitorSemaphore isNil ifTrue:[
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   344
        [
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   345
            additionalItemsToMonitorSemaphore isNil ifTrue:[
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   346
                additionalItemsToMonitorSemaphore := Semaphore new.
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   347
            ].
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   348
        ] valueUninterruptably
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   349
    ].
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   350
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   351
    monitoringTaskDelay isNil ifTrue:[
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   352
        monitoringTaskDelay := 10
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   353
    ].
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   354
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   355
    additionalItemsToMonitorSemaphore signalOnce.
c34e7fd25e53 monitoring; delayed for directories; never for remoteDirectories
penk
parents: 1961
diff changeset
   356
    self startMonitoringTask.
1390
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
!HierarchicalList methodsFor:'protocol'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
childrenFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
    "returns the children for an item or an empty list
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
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
iconFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
    "returns the icon for an item or nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
    ^ nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
labelFor:anItem
3848
cf7b2e22806d changed: #labelFor:
Claus Gittinger <cg@exept.de>
parents: 3832
diff changeset
   374
    "returns the label for an item or nil"
cf7b2e22806d changed: #labelFor:
Claus Gittinger <cg@exept.de>
parents: 3832
diff changeset
   375
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
    ^ nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
middleButtonMenuFor:anItem
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
    "returns the middleButton menu for an item or nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
    "
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
    ^ nil
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
! !
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
!HierarchicalList class methodsFor:'documentation'!
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
version
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   390
    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.26 2014-11-19 21:46:22 cg Exp $'
3832
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   391
!
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   392
602c293b4300 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   393
version_CVS
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   394
    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.26 2014-11-19 21:46:22 cg Exp $'
1390
62dc950b9140 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
! !
4676
d793a43a8860 class: HierarchicalList
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
   396