HierarchicalListEditor.st
author Claus Gittinger <cg@exept.de>
Mon, 10 Sep 2001 16:13:41 +0200
changeset 1487 846527ddac8b
parent 1065 fa70f4678a13
child 1499 0c57ab09156b
permissions -rw-r--r--
UserPreference access
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     1
"
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     4
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
     7
 inclusion of the above copyright notice. This software may not
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    11
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    12
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    13
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    14
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    15
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    16
ResourceSpecEditor subclass:#HierarchicalListEditor
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    17
	instanceVariableNames:'treeView'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    18
	classVariableNames:''
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    19
	poolDictionaries:''
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    20
	category:'Interface-UIPainter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    21
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    22
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    23
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    24
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    25
copyright
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    26
"
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    27
 COPYRIGHT (c) 1997 by eXept Software AG
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    28
              All Rights Reserved
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    29
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    30
 This software is furnished under a license and may be used
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    32
 inclusion of the above copyright notice. This software may not
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    35
 hereby transferred.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    36
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    37
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    38
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    39
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    40
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    41
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    42
documentation
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    43
"
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    44
    The HierarchicalListEditor allows you to create, modify or just inspect
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    45
    (statical) hierarchical lists for the SelectionInListView.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    46
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    47
    [start with:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    48
        HierarchicalListEditor open
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    49
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    50
    [see also:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    51
        UIPainter
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    52
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    53
    [author:]
546
aac3f3c9383f help menu item aligned to the right
tz
parents: 529
diff changeset
    54
        Claus Atzkern, eXept Software AG
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    55
        Thomas Zwick, eXept Software AG
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    56
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    57
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    58
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    59
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    60
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    61
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    62
!HierarchicalListEditor class methodsFor:'instance creation'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    63
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    64
openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    65
    "Open a HierarchicalListEditor modal on aTreeItem"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    66
    "self openModalOnTreeItem: (TreeItem name: 'Label' contents: #Contents)"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    67
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    68
    ^self new openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    69
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    70
! !
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    71
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    72
!HierarchicalListEditor class methodsFor:'accessing'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    73
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    74
resourceType
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    75
    "get the type of resource of the method generated by the HierarchicalListEditor"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    76
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    77
    ^#hierarchicalList
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    78
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    79
! !
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
    80
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    81
!HierarchicalListEditor class methodsFor:'help specs'!
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    82
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    83
helpSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    84
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    85
     by the UIHelpTool of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    86
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    87
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    88
     the UIHelpTool may not be able to read the specification."
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    89
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    90
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    91
     UIHelpTool openOnClass:HierarchicalListEditor    
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    92
    "
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    93
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    94
    <resource: #help>
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    95
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
    96
    ^super helpSpec addPairsFrom:#(
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    97
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    98
#addChild
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
    99
'Adds a new child item.'
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   100
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   101
#addSister
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   102
'Adds a new sister item.'
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   103
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   104
#contents
399646a86258 help texts added
tz
parents: 566
diff changeset
   105
'Contents of the tree item.'
399646a86258 help texts added
tz
parents: 566
diff changeset
   106
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   107
#fileLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   108
'Opens a dialog for selecting and loading a hierarchical list spec from a class.'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   109
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   110
#fileNew
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   111
'Creates a new hierarchical list. '
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   112
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   113
#fileSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   114
'Saves current hierarchical list spec.'
552
8597d3786b09 help texts added
tz
parents: 551
diff changeset
   115
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   116
#fileSaveAs
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   117
'Opens a dialog to save current hierarchical list spec.'
552
8597d3786b09 help texts added
tz
parents: 551
diff changeset
   118
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   119
#label
399646a86258 help texts added
tz
parents: 566
diff changeset
   120
'Label of the tree item.'
399646a86258 help texts added
tz
parents: 566
diff changeset
   121
551
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   122
)
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   123
! !
f0c726d56ee6 help texts added
tz
parents: 546
diff changeset
   124
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   125
!HierarchicalListEditor class methodsFor:'image specs'!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   126
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   127
createChildIcon
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   128
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   129
     by the ImageEditor of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   130
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   131
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   132
     the ImageEditor may not be able to read the specification."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   133
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   134
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   135
     ImageEditor openOnClass:self andSelector:#createChildIcon
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   136
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   137
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   138
    <resource: #image>
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   139
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   140
    ^Icon
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   141
        constantNamed:#'HierarchicalListEditor createChildIcon'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   142
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A<3L308@A33L33H@A30L33H@A33L33H@A<3L008@A?????8@C*****(@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8') ; yourself); yourself]!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   143
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   144
createSisterIcon
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   145
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   146
     by the ImageEditor of ST/X."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   147
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   148
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   149
     the ImageEditor may not be able to read the specification."
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   150
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   151
    "
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   152
     ImageEditor openOnClass:self andSelector:#createSisterIcon
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   153
    "
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   154
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   155
    <resource: #image>
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   156
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   157
    ^Icon
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   158
        constantNamed:#'HierarchicalListEditor createSisterIcon'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   159
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A<L<O?8@A3<3??8@A<<<<C8@A?L?O?8@A0<0??8@A?????8@A0LCC?8@A<<?L?8@A<<CC?8@A<<?L?8@A<<CL?8@A?????8@C*****(@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8') ; yourself); yourself]! !
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   160
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   161
!HierarchicalListEditor class methodsFor:'interface specs'!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   162
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   163
windowSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   164
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   165
     by the UIPainter of ST/X."
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   166
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   167
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   168
     the UIPainter may not be able to read the specification."
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   169
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   170
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   171
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   172
     HierarchicalListEditor new openInterface:#windowSpec
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   173
     HierarchicalListEditor open
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   174
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   175
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   176
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   177
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   178
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   179
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   180
       #(#FullSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   181
          #window: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   182
           #(#WindowSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   183
              #name: 'Hierarchical List Editor'
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   184
              #layout: #(#LayoutFrame 223 0 340 0 692 0 669 0)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   185
              #label: 'Hierarchical List Editor'
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   186
              #min: #(#Point 450 280)
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   187
              #max: #(#Point 1152 900)
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   188
              #bounds: #(#Rectangle 223 340 693 670)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   189
              #menu: #menu
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   190
              #usePreferredExtent: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   191
          )
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   192
          #component: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   193
           #(#SpecCollection
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   194
              #collection: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   195
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   196
                 #(#MenuPanelSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   197
                    #name: 'menuToolbarView'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   198
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 32 0)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   199
                    #menu: #menuToolbar
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   200
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   201
                 #(#VariableHorizontalPanelSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   202
                    #name: 'VariableHorizontalPanel'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   203
                    #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   204
                    #component: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   205
                     #(#SpecCollection
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   206
                        #collection: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   207
                         #(
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   208
                           #(#ArbitraryComponentSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   209
                              #name: 'TreeView'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   210
                              #menu: #menuEdit
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   211
                              #hasHorizontalScrollBar: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   212
                              #hasVerticalScrollBar: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   213
                              #miniScrollerHorizontal: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   214
                              #miniScrollerVertical: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   215
                              #component: #treeView
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   216
                              #hasBorder: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   217
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   218
                           #(#ViewSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   219
                              #name: 'SpecView'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   220
                              #component: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   221
                               #(#SpecCollection
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   222
                                  #collection: 
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   223
                                   #(
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   224
                                     #(#LabelSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   225
                                        #name: 'nameLabel'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   226
                                        #layout: #(#AlignmentOrigin 98 0 26 0 1 0.5)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   227
                                        #label: 'Label:'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   228
                                        #resizeForLabel: true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   229
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   230
                                     #(#InputFieldSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   231
                                        #name: 'labelInputField'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   232
                                        #layout: #(#LayoutFrame 100 0 15 0 -5 1.0 37 0)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   233
                                        #activeHelpKey: #label
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   234
                                        #tabable: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   235
                                        #model: #itemName
1065
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   236
                              #modifiedChannel: #modifiedChannel
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   237
                              #acceptChannel: #acceptChannel
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   238
                              #acceptOnLostFocus: true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   239
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   240
                                     #(#LabelSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   241
                                        #name: 'valueLabel'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   242
                                        #layout: #(#AlignmentOrigin 98 0 52 0 1 0.5)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   243
                                        #activeHelpKey: #contents
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   244
                                        #label: 'Contents:'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   245
                                        #resizeForLabel: true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   246
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   247
                                     #(#InputFieldSpec
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   248
                                        #name: 'valueInputField'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   249
                                        #layout: #(#LayoutFrame 100 0 41 0 -5 1.0 63 0)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   250
                                        #activeHelpKey: #contents
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   251
                                        #tabable: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   252
                                        #model: #itemValue
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   253
                                        #type: #symbolOrNil
1065
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   254
                              #modifiedChannel: #modifiedChannel
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   255
                              #acceptChannel: #acceptChannel
fa70f4678a13 new inputField accept/modified behavior
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   256
                              #acceptOnLostFocus: true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   257
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   258
                                     #(#UISubSpecification
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   259
                                        #name: 'SubSpecification'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   260
                                        #layout: #(#LayoutFrame 2 0.0 -26 1.0 -2 1.0 -2 1.0)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   261
                                        #majorKey: #ToolApplicationModel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   262
                                        #minorKey: #windowSpecForCommit
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   263
                                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   264
                                  )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   265
                              )
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   266
                              #level: -1
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   267
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   268
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   269
                    )
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   270
                    #handles: #(#Any 0.368421 1.0)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   271
                )
484
ab3d54531432 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 469
diff changeset
   272
                 #(#UISubSpecification
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   273
                    #name: 'InfoBarSubSpec'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   274
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   275
                    #majorKey: #ToolApplicationModel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   276
                    #minorKey: #windowSpecForInfoBar
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   277
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   278
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   279
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   280
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   281
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   282
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   283
!HierarchicalListEditor class methodsFor:'menu specs'!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   284
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   285
menu
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   286
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   287
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   288
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   289
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   290
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   291
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   292
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   293
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   294
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menu)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   295
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   296
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   297
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   298
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   299
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   300
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   301
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   302
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   303
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   304
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   305
                #label: 'About'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   306
                #labelImage: #(#ResourceRetriever nil #menuIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   307
                #submenuChannel: #menuAbout
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   308
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   309
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   310
                #label: 'File'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   311
                #submenu: 
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   312
                 #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   313
                    
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   314
                     #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   315
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   316
                          #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   317
                          #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   318
                          #activeHelpKey: #fileNew
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   319
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   320
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   321
                          #label: '-'
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   322
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   323
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   324
                          #label: 'Load...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   325
                          #translateLabel: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   326
                          #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   327
                          #activeHelpKey: #fileLoad
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   328
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   329
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   330
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   331
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   332
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   333
                          #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   334
                          #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   335
                          #activeHelpKey: #fileSave
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   336
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   337
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   338
                          #label: 'Save As...'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   339
                          #value: #doSaveAs
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   340
                          #activeHelpKey: #fileSaveAs
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   341
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   342
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   343
                          #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   344
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   345
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   346
                          #label: 'Browse Class'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   347
                          #value: #doBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   348
                          #activeHelpKey: #fileBrowseClass
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   349
                          #enabled: #hasValidClass
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   350
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   351
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   352
                          #label: '-'
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   353
                      )
399646a86258 help texts added
tz
parents: 566
diff changeset
   354
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   355
                          #label: 'Exit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   356
                          #value: #closeRequest
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   357
                          #activeHelpKey: #fileExit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   358
                      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   359
                    ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   360
                    nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   361
                )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   362
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   363
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   364
                #label: 'Edit'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   365
                #submenuChannel: #menuEdit
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   366
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   367
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   368
                #label: 'Add'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   369
                #submenu: 
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   370
                 #(#Menu
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   371
                    
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   372
                     #(
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   373
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   374
                          #label: 'Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   375
                          #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   376
                          #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   377
                          #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   378
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createChildIcon 'Child')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   379
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   380
                       #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   381
                          #label: 'Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   382
                          #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   383
                          #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   384
                          #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   385
                          #labelImage: #(#ResourceRetriever #HierarchicalListEditor #createSisterIcon 'Sister')
522
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   386
                      )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   387
                    ) nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   388
                    nil
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   389
                )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   390
            )
06bef91cb861 menu rearranged
tz
parents: 506
diff changeset
   391
             #(#MenuItem
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   392
                #label: 'History'
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   393
                #submenuChannel: #menuHistory
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   394
            )
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   395
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   396
                #label: 'Help'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   397
                #startGroup: #right
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   398
                #submenuChannel: #menuHelp
546
aac3f3c9383f help menu item aligned to the right
tz
parents: 529
diff changeset
   399
            )
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   400
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   401
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   402
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   403
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   404
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   405
menuEdit
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   406
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   407
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   408
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   409
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   410
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   411
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   412
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   413
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuEdit
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   414
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuEdit)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   415
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   416
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   417
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   418
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   419
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   420
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   421
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   422
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   423
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   424
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   425
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   426
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   427
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   428
                #enabled: #valueOfCanCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   429
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   430
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   431
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   432
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   433
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   434
                #enabled: #valueOfCanCopy
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   435
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   436
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   437
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   438
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   439
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   440
                #enabled: #valueOfCanPaste
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   441
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   442
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   443
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   444
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   445
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   446
                #enabled: #valueOfCanCut
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   447
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   448
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   449
                #label: '-'
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   450
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   451
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   452
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   453
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   454
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   455
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   456
                #labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   457
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   458
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   459
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   460
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   461
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   462
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   463
                #labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   464
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   465
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   466
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   467
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   468
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   469
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   470
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   471
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   472
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   473
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   474
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   475
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   476
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   477
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out')
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   478
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   479
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   480
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   481
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   482
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   483
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   484
menuToolbar
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   485
    "This resource specification was automatically generated
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   486
     by the MenuEditor of ST/X."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   487
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   488
    "Do not manually edit this!! If it is corrupted,
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   489
     the MenuEditor may not be able to read the specification."
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   490
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   491
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   492
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuToolbar
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   493
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuToolbar)) startUp
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   494
    "
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   495
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   496
    <resource: #menu>
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   497
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   498
    ^
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   499
     
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   500
       #(#Menu
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   501
          
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   502
           #(
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   503
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   504
                #label: 'New'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   505
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   506
                #value: #doNew
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   507
                #activeHelpKey: #fileNew
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   508
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   509
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   510
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   511
                #label: 'Load'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   512
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   513
                #value: #doLoad
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   514
                #activeHelpKey: #fileLoad
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   515
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   516
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   517
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   518
                #label: 'Save'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   519
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   520
                #value: #doSave
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   521
                #activeHelpKey: #fileSave
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   522
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   523
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   524
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   525
                #label: ''
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   526
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   527
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   528
                #label: 'Cut'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   529
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   530
                #value: #doCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   531
                #activeHelpKey: #editCut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   532
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   533
                #labelImage: #(#ResourceRetriever #Icon #cutIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   534
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   535
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   536
                #label: 'Copy'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   537
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   538
                #value: #doCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   539
                #activeHelpKey: #editCopy
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   540
                #enabled: #valueOfCanCopy
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   541
                #labelImage: #(#ResourceRetriever #Icon #copyIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   542
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   543
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   544
                #label: 'Paste'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   545
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   546
                #value: #doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   547
                #activeHelpKey: #editPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   548
                #enabled: #valueOfCanPaste
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   549
                #labelImage: #(#ResourceRetriever #Icon #pasteIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   550
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   551
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   552
                #label: 'Delete'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   553
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   554
                #value: #doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   555
                #activeHelpKey: #editDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   556
                #enabled: #valueOfCanCut
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   557
                #labelImage: #(#ResourceRetriever #Icon #deleteIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   558
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   559
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   560
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   561
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   562
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   563
                #label: 'Add Child'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   564
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   565
                #value: #doCreateChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   566
                #activeHelpKey: #addChild
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   567
                #enabled: #canCreateChildChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   568
                #labelImage: #(#ResourceRetriever nil #createChildIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   569
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   570
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   571
                #label: 'Add Sister'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   572
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   573
                #value: #doCreateSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   574
                #activeHelpKey: #addSister
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   575
                #enabled: #canCreateSisterChannel
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   576
                #labelImage: #(#ResourceRetriever nil #createSisterIcon)
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   577
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   578
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   579
                #label: ''
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   580
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   581
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   582
                #label: 'Move Up'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   583
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   584
                #value: #doStepUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   585
                #activeHelpKey: #editMoveUp
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   586
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   587
                #labelImage: #(#ResourceRetriever #Icon #upIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   588
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   589
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   590
                #label: 'Move Down'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   591
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   592
                #value: #doStepDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   593
                #activeHelpKey: #editMoveDown
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   594
                #enabled: #canStepOverChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   595
                #labelImage: #(#ResourceRetriever #Icon #downIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   596
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   597
             #(#MenuItem
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   598
                #label: 'Move In'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   599
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   600
                #value: #doStepIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   601
                #activeHelpKey: #editMoveIn
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   602
                #enabled: #canStepInChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   603
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon)
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   604
            )
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   605
             #(#MenuItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   606
                #label: 'Move Out'
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   607
                #isButton: true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   608
                #value: #doStepOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   609
                #activeHelpKey: #editMoveOut
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   610
                #enabled: #canStepOutChannel
882
d06b7fd56f47 images moved to class Icon
tz
parents: 747
diff changeset
   611
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon)
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   612
            )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   613
          ) nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   614
          nil
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   615
      )
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   616
! !
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   617
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   618
!HierarchicalListEditor class methodsFor:'printing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   619
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   620
prettyPrintArray:anArray on:aStream indent:anIndent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   621
    "print a literal array in a nice format
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   622
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   623
    |arg sol|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   624
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   625
    sol := aStream position.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   626
    aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   627
    aStream nextPutAll:'#('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   628
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   629
    anArray first isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   630
        arg := anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   631
        aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   632
        aStream nextPutAll:anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   633
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   634
        anArray size == 2 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   635
            self prettyPrintArray:(anArray last)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   636
                               on:aStream
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   637
                           indent:(anIndent + 4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   638
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   639
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   640
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   641
      ^ self  
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   642
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   643
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   644
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   645
    aStream nextPutAll:(anArray at:1).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   646
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   647
    arg := anArray at:2 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   648
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   649
    arg isString ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   650
        aStream spaces:((50 - (aStream position - sol)) max:4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   651
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   652
        arg isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   653
            aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   654
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   655
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   656
        aStream nextPutAll:arg.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   657
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   658
        arg := anArray at:3 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   659
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   660
    arg isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   661
        aStream nextPutAll:' #('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   662
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   663
        arg do:[:e|self prettyPrintArray:e on:aStream indent:(anIndent + 4)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   664
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   665
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   666
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   667
    aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   668
    aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   669
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   670
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   671
!HierarchicalListEditor methodsFor:'aspects'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   672
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   673
canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   674
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   675
    ^builder booleanValueAspectFor:#canCreateChildChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   676
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   677
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   678
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   679
canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   680
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   681
    ^builder booleanValueAspectFor:#canCreateSisterChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   682
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   683
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   684
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   685
canStepInChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   686
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   687
    ^builder booleanValueAspectFor:#canStepInChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   688
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   689
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   690
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   691
canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   692
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   693
    ^builder booleanValueAspectFor:#canStepOutChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   694
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   695
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   696
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   697
canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   698
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   699
    ^builder booleanValueAspectFor:#canStepOverChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   700
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   701
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   702
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   703
itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   704
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   705
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   706
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   707
    (holder := builder bindingAt:#itemName) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   708
        builder aspectAt:#itemName put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   709
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   710
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   711
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   712
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   713
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   714
itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   715
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   716
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   717
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   718
    (holder := builder bindingAt:#itemValue) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   719
        builder aspectAt:#itemValue put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   720
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   721
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   722
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   723
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   724
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   725
treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   726
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   727
    ^treeView
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   728
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   729
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   730
!HierarchicalListEditor methodsFor:'building'!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   732
buildFromClass:aClass andSelector:aSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   733
    "rebuild window from a class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   734
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   735
    |cls sel anchor|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   736
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   737
    cls := self resolveName:aClass.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   738
    specSelector := nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   739
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   740
    aSelector size ~~ 0 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   741
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   742
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   743
        sel := aSelector asString withoutSeparators.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   744
        sel size ~~ 0 ifTrue:[specSelector := sel asSymbol]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   745
    ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   746
    treeView selection:nil.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   747
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   748
    (specSelector notNil and:[cls notNil]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   749
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   750
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   751
        (cls respondsTo:specSelector) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   752
        ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   753
        [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   754
            anchor := cls perform:specSelector.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   755
            anchor isArray ifTrue:[anchor := anchor decodeAsLiteralArray]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   756
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   757
    ].              
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   758
    anchor notNil     
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   759
        ifTrue:  [anchor expand. treeView root:anchor] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   760
        ifFalse: [treeView root isNil ifTrue: [self buildRoot]].
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   761
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   762
    treeView selection: 1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   763
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   764
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   765
    self updateInfoLabel.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   766
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   767
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   768
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   769
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   770
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   771
buildFromResourceSpec: aListSpec
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   772
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   773
    treeView root: aListSpec
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   774
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   775
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   776
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   777
buildRoot
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   778
    "build just a root"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   779
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   780
    treeView root:(TreeItem name:'Root' contents:#Anchor).
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   781
    treeView selection:1.
581
399646a86258 help texts added
tz
parents: 566
diff changeset
   782
! !
399646a86258 help texts added
tz
parents: 566
diff changeset
   783
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   784
!HierarchicalListEditor methodsFor:'private'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   785
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   786
getDepthAndSistersNumberOfNode: aNode onParentNode: aParentNode
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   787
    "return depth of selected node"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   788
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   789
    |parent childNode depthAndSistersNumbers str|
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   790
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   791
    depthAndSistersNumbers := OrderedCollection new.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   792
    childNode := aNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   793
    parent := aParentNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   794
    [parent notNil] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   795
    whileTrue: 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   796
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   797
        depthAndSistersNumbers add: (parent children indexOf: childNode). 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   798
        childNode := parent. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   799
        parent := parent parent. 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   800
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   801
    depthAndSistersNumbers removeFirst; addFirst: aParentNode children size.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   802
    str := ''.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   803
    depthAndSistersNumbers reverseDo: [:n| str := str, n printString, '.'].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   804
    ^str copyFrom: 1 to: str size - 1
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   805
!
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   806
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   807
newItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   808
    "creates and returns a new default item"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   809
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   810
    ^TreeItem name: 'Item' contents: nil
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   811
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   812
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   813
updateChannels
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   814
    "update channels"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   815
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   816
    |node parent chnStepIn chnStepOut chnStepOvr chnChild chnSister|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   817
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   818
    chnStepIn := chnStepOut := chnStepOvr := chnChild := chnSister := false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   819
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   820
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   821
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   822
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   823
        (builder componentAt: #SpecView) beVisible.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   824
        chnChild := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   825
        (parent := node parent) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   826
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   827
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   828
            chnSister  := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   829
            chnStepOvr := parent numberOfChildren > 1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   830
            chnStepOut := parent parent notNil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   831
            chnStepIn  := node ~~ parent lastChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   832
        ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   833
    ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   834
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   835
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   836
        (builder componentAt: #SpecView) beInvisible
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   837
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   838
    self canCreateChildChannel  value:chnChild.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   839
    self canCreateSisterChannel value:chnSister.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   840
    self canStepOverChannel     value:chnStepOvr.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   841
    self canStepOutChannel      value:chnStepOut.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   842
    self canStepInChannel       value:chnStepIn.
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   843
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   844
    self valueOfCanCut value: (treeView selection notNil      
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   845
        ifTrue:[(treeView isInSelection:1) not] 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   846
        ifFalse: [false]).
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   847
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   848
    self valueOfCanCopy value: self valueOfCanCut value.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   849
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   850
    self valueOfCanPaste value: treeView selectedNode notNil & self valueOfCanPaste value.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   851
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   852
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   853
updateInputFields
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   854
    "reload item value into input fields"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   855
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   856
    |node|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   857
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   858
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   859
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   860
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   861
        self itemName  value:node name.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   862
        self itemValue value:node contents
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   863
    ] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   864
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   865
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   866
        self itemName  value:''.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   867
        self itemValue value:nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   868
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   869
    self valueOfEnablingCommitButtons value: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   870
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   871
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   872
!HierarchicalListEditor methodsFor:'startup / release'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   873
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   874
initialize
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   875
    "setup default values"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   876
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   877
    super initialize.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   878
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   879
    treeView := SelectionInTreeView new.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   880
    treeView multipleSelectOk: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   881
    treeView showDirectoryIndicator: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   882
    treeView showDirectoryIndicatorForRoot: false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   883
    treeView action:[:aNr| self updateChannels. self updateInputFields].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   884
    treeView selectConditionBlock: [:i|self askForItemModification].
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   885
    treeView validateDoubleClickBlock: [:node| node ~~ treeView model list first].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   886
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   887
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   888
openModalOnTreeItem: aTreeItem
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   889
    "build a tree from aTreeItem and open it modal"
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   890
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   891
    super openModalOnResourceSpec: aTreeItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   892
! !
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   893
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   894
!HierarchicalListEditor methodsFor:'user actions'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   895
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   896
accept
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   897
    "invoked by button 'OK'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   898
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   899
    |node index|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   900
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   901
    (index := treeView selectedIndex) ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   902
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   903
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   904
        node := treeView nodeAtIndex:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   905
        node name: self itemName value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   906
        node contents: self itemValue value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   907
        treeView redrawLine:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   908
    ].
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   909
    modified := true.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   910
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   911
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   912
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   913
cancel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   914
    "invoked by button 'Cancel'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   915
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   916
    self updateInputFields.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   917
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   918
    modified := false.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   919
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   920
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   921
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   922
doCopy
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   923
    "copy current selected nodes into copy buffer"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   924
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   925
    self class clipboard: OrderedCollection new.
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   926
    treeView selectedNodesDo:[:aNode| self class clipboard add: aNode copy].
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   927
    self updateAllToolInstances
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   928
!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   929
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   930
doCreateChild
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   931
    "create a child within selected parent"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   932
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   933
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   934
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   935
    ((node := treeView selectedNode) notNil and: [self askForItemModification])
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   936
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   937
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   938
        treeView model add: (newItem := self newItem) afterIndex: node children size below:node.
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   939
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node).
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   940
        treeView selectedNodeExpand:true.
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   941
        treeView selectNode: newItem.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   942
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   943
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   944
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   945
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   946
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   947
doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   948
    "create a sister next to selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   949
    "
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   950
    |node newItem|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   951
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   952
    ((node := treeView selectedNode) notNil and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   953
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   954
    [
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   955
        newItem := self newItem.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   956
        node parent notNil 
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   957
            ifTrue: [treeView model add: newItem after:node] 
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   958
            ifFalse:[treeView model add: newItem beforeIndex:1 below:node].
562
f16b2ca2be5b numeration error fixed
tz
parents: 559
diff changeset
   959
558
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   960
        newItem name: 'Child ', (self getDepthAndSistersNumberOfNode: newItem onParentNode: node parent).
5b5d08815af4 some revisions
tz
parents: 552
diff changeset
   961
        treeView selectNode: newItem.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
   962
        self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   963
        modified := true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   964
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   965
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   966
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   967
doCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   968
    "cut current selected nodes"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   969
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   970
    |selection|
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   971
    (treeView hasSelection and: [self askForItemModification]) 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   972
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   973
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   974
        self doCopy.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   975
        selection := treeView selection asSortedCollection.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   976
        treeView selectedNodesRemove.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   977
        treeView selection: selection first - 1.
747
c76003b74d7b update other instances if clipboarding
tz
parents: 736
diff changeset
   978
        self updateAllToolInstances.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   979
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   980
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   981
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   982
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   983
doDelete
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   984
    "delete current selected nodes"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   985
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   986
    |selection|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   987
    (treeView hasSelection and: [self askForItemModification]) 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   988
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   989
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   990
        selection := treeView selection asSortedCollection.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   991
        treeView selectedNodesRemove.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   992
        treeView selection: selection first - 1.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   993
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   994
        modified := true
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   995
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   996
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   997
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
   998
doNew
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
   999
    "first do super new; then make a build 
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1000
     of a resource spec containing a root"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1001
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1002
    super doNew ifTrue: [self buildRoot]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1003
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1004
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1005
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1006
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1007
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1008
doPaste
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1009
    "paste after current selected item"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1010
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1011
    (self askForItemModification and: [self class clipboard notNil])
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1012
    ifTrue:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1013
    [
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1014
        |copiedNode|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1015
        self class clipboard do:
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1016
        [:node|
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1017
            copiedNode := node copy.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1018
            treeView selectedNodeAdd: copiedNode. 
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1019
            treeView selectNode: copiedNode.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1020
        ].
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1021
        self updateChannels.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1022
        modified := true
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1023
    ]
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1024
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1025
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1026
doReload
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1027
    "reload spec from current class and selector"
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1028
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1029
    self buildFrom:specClass andSelector:specSelector
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1030
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1031
!
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1032
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1033
doSave
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1034
    "install code"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1035
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1036
    |cls code spec category mthd stream|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1037
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1038
    (specClass notNil and:[specSelector notNil])
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1039
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1040
    [
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1041
        ^self doSaveAs
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1042
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1043
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1044
    cls := self resolveName: specClass.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1045
    spec   := (treeView nodeAtIndex:1) literalArrayEncoding.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1046
    stream := WriteStream on:String new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1047
    self class prettyPrintArray:spec on:stream indent:4.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1048
    spec       := stream contents.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1049
    category   := 'list specs'.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1050
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1051
    (mthd := cls class compiledMethodAt:specSelector) notNil 
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1052
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1053
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1054
        category := mthd category
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1055
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1056
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1057
    code := Character excla asString 
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1058
            , cls name , ' class methodsFor:' , category storeString
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1059
            , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1060
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1061
            , specSelector , '\'
736
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1062
            , (self class codeGenerationComment replChar:$!! withString:'!!!!')
6db5efc5df90 some bugs fixed
tz
parents: 731
diff changeset
  1063
            , '\\    "\'
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1064
            , '     HierarchicalListEditor openOnClass:' , cls name , ' andSelector:#' , specSelector , '\'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1065
            , '    "\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1066
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1067
    code := code 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1068
            , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1069
            , '    <resource: #hierarchicalList>\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1070
            , '    ^\' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1071
            , spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1072
            , ' decodeAsLiteralArray\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1073
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1074
            , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1075
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1076
            , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1077
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1078
    code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1079
    (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1080
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1081
    self updateHistory.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1082
    hasSaved := true.
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1083
    modified := false.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1084
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1085
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1086
doStepDown
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1087
    "move selected item after next item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1088
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1089
    treeView selectedNodeChangeSequenceOrder:1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1090
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1091
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1092
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1093
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1094
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1095
doStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1096
    "lets become the selected item a child of its next sister"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1097
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1098
    treeView selectedNodeBecomeChildOfNext.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1099
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1100
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1101
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1102
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1103
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1104
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1105
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1106
doStepOut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1107
    "let selected node become a sister of its current parent"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1108
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1109
    treeView selectedNodeBecomeSisterOfParent.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1110
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1111
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1112
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1113
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1114
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1115
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1116
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1117
doStepUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1118
    "move selected item before previous item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1119
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1120
    treeView selectedNodeChangeSequenceOrder:-1.
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1121
    self updateChannels.
731
cd36a0c9ba62 new abstract superclass ListSpecEditor
tz
parents: 602
diff changeset
  1122
    modified := true
506
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1123
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1124
249e94fdeb94 looks for modified
tz
parents: 489
diff changeset
  1125
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1126
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1127
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1128
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1129
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1130
version
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1131
    ^ '$Header$'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1132
! !