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