HierarchicalListEditor.st
author tz
Sat, 17 Jan 1998 22:33:10 +0100
changeset 426 b8110a424326
parent 423 ea6880a0e024
child 430 fa18d386b936
permissions -rw-r--r--
commit buttons replaced by subSpec in ToolApplicationModel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     1
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
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
2a35cb573365 intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
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
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    16
ToolApplicationModel subclass:#HierarchicalListEditor
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    17
	instanceVariableNames:'isModified didInstall treeView specClass specSelector'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    18
	classVariableNames:'CopyBuffer'
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
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    27
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
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
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
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
"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    44
    HierarchicalListEditor is used by the UIPainter to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    45
    create or maintain a hierarchical list.
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:]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    54
        Claus Atzkern
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    55
"
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
!HierarchicalListEditor class methodsFor:'interface specs'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    62
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    63
classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    64
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    65
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    66
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    67
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    68
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    69
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    70
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    71
     HierarchicalListEditor new openInterface:#classAndMethodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    72
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    73
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    74
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    75
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    76
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    77
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    78
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    79
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    80
           #(#WindowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    81
              #'name:' 'Painter'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    82
              #'layout:' #(#LayoutFrame 202 0 207 0 502 0 335 0)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    83
              #'label:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    84
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    85
              #'max:' #(#Point 1160 870)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    86
              #'bounds:' #(#Rectangle 202 207 503 336)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    87
              #'usePreferredExtent:' false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    88
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    89
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    90
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    91
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    92
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    93
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    94
                    #'name:' 'boxLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    95
                    #'layout:' #(#Point 5 10)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
    96
                    #'label:' 'Class and selector for code:'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    97
                    #'adjust:' #left
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    98
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
    99
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   100
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   101
                    #'name:' 'classLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   102
                    #'layout:' #(#AlignmentOrigin 45 0.11 51 0 1 0.5)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   103
                    #'label:' 'Class:'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   104
                    #'adjust:' #right
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   105
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   106
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   107
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   108
                    #'name:' 'classField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   109
                    #'layout:' #(#LayoutFrame 47 0.11 39 0 -2 1.0 61 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   110
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   111
                    #'model:' #specClassChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   112
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   113
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   114
                    #'name:' 'methodLabel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   115
                    #'layout:' #(#AlignmentOrigin 45 0.11 74 0 1 0.5)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   116
                    #'label:' 'Selector:'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   117
                    #'adjust:' #right
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   118
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   119
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   120
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   121
                    #'name:' 'methodField'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   122
                    #'layout:' #(#LayoutFrame 47 0.11 64 0 -2 1.0 86 0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   123
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   124
                    #'model:' #specSelectorChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   125
                    #'type:' #string
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   126
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   127
                 #(#HorizontalPanelViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   128
                    #'name:' 'commitPanel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   129
                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   130
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   131
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   132
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   133
                         #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   134
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   135
                              #'name:' 'cancel'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   136
                              #'label:' 'Cancel'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   137
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   138
                              #'model:' #cancel
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   139
                              #'extent:' #(#Point 146 24)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   140
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   141
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   142
                              #'name:' 'accept'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   143
                              #'label:' 'OK'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   144
                              #'tabable:' true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   145
                              #'model:' #accept
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   146
                              #'isDefault:' true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   147
                              #'extent:' #(#Point 146 24)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   148
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   149
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   150
                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   151
                    #'horizontalLayout:' #fitSpace
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   152
                    #'verticalLayout:' #fit
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   153
                    #'horizontalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   154
                    #'verticalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   155
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   156
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   157
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   158
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   159
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   160
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   161
menu
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   162
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   163
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   164
    "do not manually edit this - the builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   165
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   166
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   167
    "
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   168
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menu
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   169
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menu)) startUp
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   170
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   171
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   172
    <resource: #menu>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   173
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   174
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   175
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   176
       #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   177
          
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   178
           #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   179
             #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   180
                #'label:' 'About'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   181
                #'labelImage:' #(#ResourceRetriever #UIPainter #icon)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   182
                #'submenuChannel:' #menuAbout
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   183
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   184
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   185
                #'label:' 'File'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   186
                #'accessCharacterPosition:' 1
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   187
                #'submenu:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   188
                 #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   189
                    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   190
                     #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   191
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   192
                          #'label:' 'New'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   193
                          #'value:' #doNew
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   194
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   195
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   196
                          #'label:' 'Reload'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   197
                          #'value:' #doReload
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   198
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   199
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   200
                          #'label:' '-'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   201
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   202
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   203
                          #'label:' 'Save'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   204
                          #'value:' #doInstall
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   205
                          #'enabled:' #hasValidClass
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   206
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   207
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   208
                          #'label:' '-'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   209
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   210
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   211
                          #'label:' 'Define Selector'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   212
                          #'value:' #doDefineSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   213
                          #'enabled:' #hasValidClass
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   214
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   215
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   216
                          #'label:' 'Define Class'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   217
                          #'value:' #doDefineClass
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   218
                          #'enabled:' #canChangeClassName
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   219
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   220
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   221
                          #'label:' '-'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   222
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   223
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   224
                          #'label:' 'Exit'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   225
                          #'value:' #closeRequest
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   226
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   227
                    ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   228
                    nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   229
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   230
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   231
             #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   232
                #'label:' 'Edit'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   233
                #'accessCharacterPosition:' 1
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   234
                #'submenuChannel:' #menuEdit
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   235
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   236
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   237
                #'label:' 'Browse'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   238
                #'enabled:' #hasValidClass
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   239
                #'accessCharacterPosition:' 1
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   240
                #'submenu:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   241
                 #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   242
                    
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   243
                     #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   244
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   245
                          #'label:' 'Class'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   246
                          #'value:' #'doBrowse:'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   247
                          #'argument:' #class
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   248
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   249
                       #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   250
                          #'label:' 'Method'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   251
                          #'value:' #'doBrowse:'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   252
                          #'enabled:' #hasValidMethodSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   253
                          #'argument:' #method
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   254
                      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   255
                       #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   256
                          #'label:' 'Specification'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   257
                          #'value:' #'doBrowse:'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   258
                          #'enabled:' #hasValidSpecSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   259
                          #'argument:' #spec
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   260
                      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   261
                    ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   262
                    nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   263
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   264
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   265
          ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   266
          nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   267
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   268
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   269
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   270
menuEdit
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   271
    "this window spec was automatically generated by the ST/X MenuEditor"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   272
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   273
    "do not manually edit this - the builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   274
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   275
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   276
    "
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   277
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuEdit
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   278
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuEdit)) startUp
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   279
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   280
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   281
    <resource: #menu>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   282
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   283
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   284
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   285
       #(#Menu
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   286
          
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   287
           #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   288
             #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   289
                #'label:' 'Cut'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   290
                #'value:' #doCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   291
                #'enabled:' #canCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   292
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   293
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   294
                #'label:' 'Copy'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   295
                #'value:' #doCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   296
                #'enabled:' #canCopy
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   297
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   298
             #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   299
                #'label:' 'Paste'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   300
                #'value:' #doPaste
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   301
                #'enabled:' #canPaste
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   302
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   303
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   304
                #'label:' '-'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   305
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   306
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   307
                #'label:' 'Create Child'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   308
                #'value:' #doCreateChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   309
                #'enabled:' #canCreateChildChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   310
                #'labelImage:' #(#ResourceRetriever #HierarchicalListEditor #iconCreateChild)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   311
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   312
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   313
                #'label:' 'Create Sister'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   314
                #'value:' #doCreateSister
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   315
                #'enabled:' #canCreateSisterChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   316
                #'labelImage:' #(#ResourceRetriever #HierarchicalListEditor #iconCreateSister)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   317
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   318
          ) nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   319
          nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   320
      )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   321
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   322
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   323
menuToolbar
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   324
    "this window spec was automatically generated by the ST/X MenuEditor"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   325
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   326
    "do not manually edit this - the builder may not be able to
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   327
     handle the specification if its corrupted."
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   328
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   329
    "
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   330
     MenuEditor new openOnClass:HierarchicalListEditor andSelector:#menuToolbar
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   331
     (Menu new fromLiteralArrayEncoding:(HierarchicalListEditor menuToolbar)) startUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   332
    "
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   333
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   334
    <resource: #menu>
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   335
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   336
    ^
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   337
     
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   338
       #(#Menu
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   339
          
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   340
           #(
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   341
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   342
                #'label:' 'New'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   343
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   344
                #'value:' #doNew
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   345
                #'enabled:' #canCreateChildChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   346
                #'labelImage:' #(#ResourceRetriever nil #newIcon)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   347
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   348
             #(#MenuItem
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   349
                #'label:' 'Save'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   350
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   351
                #'value:' #doInstall
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   352
                #'enabled:' #canCreateChildChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   353
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   354
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   355
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   356
                #'label:' ''
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   357
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   358
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   359
                #'label:' 'Create Child'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   360
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   361
                #'value:' #doCreateChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   362
                #'enabled:' #canCreateChildChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   363
                #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   364
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   365
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   366
                #'label:' 'Create Sister'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   367
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   368
                #'value:' #doCreateSister
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   369
                #'enabled:' #canCreateSisterChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   370
                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   371
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   372
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   373
                #'label:' ''
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   374
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   375
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   376
                #'label:' 'Step Up'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   377
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   378
                #'value:' #doStepUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   379
                #'enabled:' #canStepOverChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   380
                #'labelImage:' #(#ResourceRetriever nil #upIcon)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   381
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   382
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   383
                #'label:' 'Step Down'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   384
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   385
                #'value:' #doStepDown
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   386
                #'enabled:' #canStepOverChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   387
                #'labelImage:' #(#ResourceRetriever nil #downIcon)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   388
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   389
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   390
                #'label:' 'Step In'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   391
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   392
                #'value:' #doStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   393
                #'enabled:' #canStepInChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   394
                #'labelImage:' #(#ResourceRetriever nil #downRightIcon)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   395
            )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   396
             #(#MenuItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   397
                #'label:' 'Step Out'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   398
                #'isButton:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   399
                #'value:' #doStepOut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   400
                #'enabled:' #canStepOutChannel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   401
                #'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   402
            )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   403
          ) nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   404
          nil
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   405
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   406
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   407
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   408
methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   409
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   410
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   411
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   412
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   413
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   414
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   415
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   416
     HierarchicalListEditor new openInterface:#methodSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   417
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   418
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   419
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   420
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   421
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   422
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   423
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   424
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   425
           #(#WindowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   426
              #'name:' 'Painter'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   427
              #'layout:' #(#LayoutFrame 153 0 206 0 433 0 284 0)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   428
              #'label:' 'Painter'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   429
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   430
              #'max:' #(#Point 1160 870)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   431
              #'bounds:' #(#Rectangle 153 206 434 285)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   432
              #'usePreferredExtent:' false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   433
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   434
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   435
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   436
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   437
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   438
                 #(#LabelSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   439
                    #'name:' 'boxLabel'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   440
                    #'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 20 0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   441
                    #'label:' 'Selector for code:'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   442
                    #'adjust:' #left
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   443
                    #'resizeForLabel:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   444
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   445
                 #(#InputFieldSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   446
                    #'name:' 'methodField'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   447
                    #'layout:' #(#LayoutFrame 0 0.0 22 0 0 1.0 44 0)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   448
                    #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   449
                    #'model:' #specSelectorChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   450
                    #'type:' #string
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   451
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   452
                 #(#HorizontalPanelViewSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   453
                    #'name:' 'commitPanel'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   454
                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   455
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   456
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   457
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   458
                         #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   459
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   460
                              #'name:' 'cancel'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   461
                              #'label:' 'Cancel'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   462
                              #'tabable:' true
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   463
                              #'model:' #cancel
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   464
                              #'extent:' #(#Point 136 24)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   465
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   466
                           #(#ActionButtonSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   467
                              #'name:' 'accept'
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   468
                              #'label:' 'OK'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   469
                              #'tabable:' true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   470
                              #'model:' #accept
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   471
                              #'isDefault:' true
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   472
                              #'extent:' #(#Point 136 24)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   473
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   474
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   475
                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   476
                    #'horizontalLayout:' #fitSpace
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   477
                    #'verticalLayout:' #fit
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   478
                    #'horizontalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   479
                    #'verticalSpace:' 3
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   480
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   481
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   482
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   483
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   484
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   485
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   486
windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   487
    "this window spec was automatically generated by the ST/X UIPainter"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   488
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   489
    "do not manually edit this - the painter/builder may not be able to
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   490
     handle the specification if its corrupted."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   491
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   492
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   493
     UIPainter new openOnClass:HierarchicalListEditor andSelector:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   494
     HierarchicalListEditor new openInterface:#windowSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   495
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   496
    "HierarchicalListEditor open"
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   497
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   498
    <resource: #canvas>
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   499
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   500
    ^
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   501
     
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   502
       #(#FullSpec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   503
          #'window:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   504
           #(#WindowSpec
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   505
              #'name:' 'Hierarchical List Editor'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   506
              #'layout:' #(#LayoutFrame 67 0 325 0 541 0 637 0)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   507
              #'label:' 'Hierarchical List Editor'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   508
              #'min:' #(#Point 10 10)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   509
              #'max:' #(#Point 1160 870)
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   510
              #'bounds:' #(#Rectangle 67 325 542 638)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   511
              #'menu:' #menu
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   512
              #'usePreferredExtent:' false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   513
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   514
          #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   515
           #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   516
              #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   517
               #(
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   518
                 #(#MenuPanelSpec
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   519
                    #'name:' 'menuToolbarView'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   520
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 32 0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   521
                    #'menu:' #menuToolbar
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   522
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   523
                 #(#VariableHorizontalPanelSpec
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   524
                    #'name:' 'variableHorizontalPanel'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   525
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   526
                    #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   527
                     #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   528
                        #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   529
                         #(
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   530
                           #(#ArbitraryComponentSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   531
                              #'name:' 'treeView'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   532
                              #'menu:' #menuEdit
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   533
                              #'hasHorizontalScrollBar:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   534
                              #'hasVerticalScrollBar:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   535
                              #'miniScrollerHorizontal:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   536
                              #'miniScrollerVertical:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   537
                              #'component:' #treeView
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   538
                              #'hasBorder:' false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   539
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   540
                           #(#ViewSpec
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   541
                              #'name:' 'specView'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   542
                              #'component:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   543
                               #(#SpecCollection
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   544
                                  #'collection:' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   545
                                   #(
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   546
                                     #(#LabelSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   547
                                        #'name:' 'nameLabel'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   548
                                        #'layout:' #(#AlignmentOrigin 107 0 25 0 1 0.5)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   549
                                        #'label:' 'Name:'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   550
                                        #'resizeForLabel:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   551
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   552
                                     #(#InputFieldSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   553
                                        #'name:' 'nameInputField'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   554
                                        #'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   555
                                        #'model:' #itemName
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   556
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   557
                                     #(#LabelSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   558
                                        #'name:' 'valueLabel'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   559
                                        #'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   560
                                        #'label:' 'Value:'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   561
                                        #'resizeForLabel:' true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   562
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   563
                                     #(#InputFieldSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   564
                                        #'name:' 'valueInputField'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   565
                                        #'layout:' #(#LayoutFrame 110 0 41 0 -5 1.0 63 0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   566
                                        #'model:' #itemValue
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   567
                                        #'type:' #symbolOrNil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   568
                                    )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   569
                                     #(#UISubSpecification
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   570
                                        #'name:' 'SubSpecification'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   571
                                        #'layout:' #(#LayoutFrame 2 0.0 -26 1.0 -2 1.0 -2 1.0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   572
                                        #'majorKey:' #ToolApplicationModel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   573
                                        #'minorKey:' #windowSpecForCommit
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   574
                                    )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   575
                                  )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   576
                              )
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   577
                              #'level:' -1
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   578
                          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   579
                        )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   580
                    )
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   581
                    #'handles:' #(#Any 0.368421 1.0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   582
                )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   583
                 #(#LabelSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   584
                    #'name:' 'infoLabel'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   585
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 -80 1.0 0 1.0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   586
                    #'labelChannel:' #valueOfInfoLabel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   587
                    #'level:' 1
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   588
                    #'adjust:' #left
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   589
                )
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   590
                 #(#LabelSpec
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   591
                    #'name:' 'timeLabel'
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   592
                    #'layout:' #(#LayoutFrame -80 1 -22 1 0 1.0 0 1.0)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   593
                    #'labelChannel:' #valueOfTimeLabel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   594
                    #'level:' 1
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   595
                    #'adjust:' #right
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   596
                )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   597
              )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   598
          )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   599
      )
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   600
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   601
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   602
!HierarchicalListEditor class methodsFor:'printing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   603
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   604
prettyPrintArray:anArray on:aStream indent:anIndent
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   605
    "print a literal array in a nice format
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   606
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   607
    |arg sol|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   608
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   609
    sol := aStream position.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   610
    aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   611
    aStream nextPutAll:'#('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   612
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   613
    anArray first isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   614
        arg := anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   615
        aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   616
        aStream nextPutAll:anArray first.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   617
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   618
        anArray size == 2 ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   619
            self prettyPrintArray:(anArray last)
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   620
                               on:aStream
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   621
                           indent:(anIndent + 4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   622
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   623
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   624
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   625
      ^ self  
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   626
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   627
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   628
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   629
    aStream nextPutAll:(anArray at:1).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   630
    aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   631
    arg := anArray at:2 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   632
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   633
    arg isString ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   634
        aStream spaces:((50 - (aStream position - sol)) max:4).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   635
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   636
        arg isSymbol ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   637
            aStream nextPut:$#.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   638
        ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   639
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   640
        aStream nextPutAll:arg.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   641
        aStream nextPut:$'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   642
        arg := anArray at:3 ifAbsent:nil.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   643
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   644
    arg isArray ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   645
        aStream nextPutAll:' #('.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   646
        aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   647
        arg do:[:e|self prettyPrintArray:e on:aStream indent:(anIndent + 4)].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   648
        aStream spaces:anIndent.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   649
        aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   650
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   651
    aStream nextPut:$).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   652
    aStream cr.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   653
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   654
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   655
!HierarchicalListEditor methodsFor:'accessing'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   656
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   657
didInstall
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   658
    "returns true if spec was installed by operator"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   659
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   660
    ^didInstall ? false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   661
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   662
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   663
selectorName
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   664
    "returns current spec. selector"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   665
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   666
    ^specSelector
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   667
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   668
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   669
!HierarchicalListEditor methodsFor:'aspects'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   670
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   671
canCreateChildChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   672
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   673
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   674
    ^builder booleanValueAspectFor:#canCreateChildChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   675
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   676
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   677
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   678
canCreateSisterChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   679
    "automatically generated by UIPainter ..."
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
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   687
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   688
    ^builder booleanValueAspectFor:#canStepInChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   689
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   690
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   691
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   692
canStepOutChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   693
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   694
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   695
    ^builder booleanValueAspectFor:#canStepOutChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   696
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   697
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   698
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   699
canStepOverChannel
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   700
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   701
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   702
    ^builder booleanValueAspectFor:#canStepOverChannel
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   703
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   704
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   705
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   706
itemName
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   707
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   708
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   709
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   710
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   711
    (holder := builder bindingAt:#itemName) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   712
        builder aspectAt:#itemName put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   713
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   714
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   715
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   716
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   717
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   718
itemValue
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   719
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   720
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   721
    |holder|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   722
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   723
    (holder := builder bindingAt:#itemValue) isNil ifTrue:[
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   724
        builder aspectAt:#itemValue put:(holder :=  ValueHolder new).
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   725
        holder addDependent:self.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   726
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   727
    ^ holder
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   728
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   729
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   730
treeView
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   731
    "automatically generated by UIPainter ..."
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   732
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   733
    ^treeView
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   734
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   735
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   736
!HierarchicalListEditor methodsFor:'change & update'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   737
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   738
update:something with:aParameter from:someObject
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   739
    "one of my models changed"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   740
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   741
    self valueOfEnablingCommitButtons value: true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   742
! !
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   743
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   744
!HierarchicalListEditor methodsFor:'private'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   745
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   746
checkMenuItemModified
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   747
    "check item modification"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   748
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   749
    self valueOfEnablingCommitButtons value
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   750
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   751
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   752
        ((YesNoBox title:'Item was modified!!\Save it?\' withCRs)        
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   753
            noText:'No';
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   754
            yesText:'Yes';
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   755
            showAtPointer;
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   756
            accepted) ifFalse: [self valueOfEnablingCommitButtons value: false. ^true].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   757
        self accept
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   758
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   759
    ^true
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   760
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   761
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   762
newItem
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   763
    "creates and returns a new default item"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   764
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   765
    ^TreeItem name: 'Undefined' contents: nil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   766
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   767
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   768
updateChannels
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   769
    "update channels"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   770
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   771
    |node parent chnStepIn chnStepOut chnStepOvr chnChild chnSister|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   772
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   773
    chnStepIn := chnStepOut := chnStepOvr := chnChild := chnSister := false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   774
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   775
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   776
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   777
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   778
        (builder componentAt: #specView) beVisible.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   779
        chnChild := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   780
        (parent := node parent) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   781
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   782
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   783
            chnSister  := true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   784
            chnStepOvr := parent numberOfChildren > 1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   785
            chnStepOut := parent parent notNil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   786
            chnStepIn  := node ~~ parent lastChild
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   787
        ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   788
    ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   789
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   790
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   791
        (builder componentAt: #specView) beInvisible
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   792
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   793
    self canCreateChildChannel  value:chnChild.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   794
    self canCreateSisterChannel value:chnSister.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   795
    self canStepOverChannel     value:chnStepOvr.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   796
    self canStepOutChannel      value:chnStepOut.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   797
    self canStepInChannel       value:chnStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   798
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   799
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   800
updateInputFields
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   801
    "reload item value into input fields"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   802
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   803
    |node|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   804
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   805
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   806
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   807
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   808
        self itemName  value:node name.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   809
        self itemValue value:node contents
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   810
    ] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   811
    ifFalse:
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
        self itemName  value:''.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   814
        self itemValue value:nil
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
    self valueOfEnablingCommitButtons value: false
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   817
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
   818
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   819
!HierarchicalListEditor methodsFor:'queries'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   820
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   821
canChangeClassName
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   822
    "returns true if current class could be changed which is dependent on
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   823
     the mode: standalone or started by UIPainter"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   824
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   825
    ^masterApplication isNil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   826
!
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
canCopy
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   829
    "returns true if any selection exists"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   830
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   831
    ^treeView selection notNil
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
canCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   835
    "returns true if any selection exists and not includes
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   836
     the anchor (first element into list)."
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
    treeView selection notNil ifTrue:[^(treeView isInSelection:1) not].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   839
    ^false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   840
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   841
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   842
canPaste
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   843
    "returns true if something to be paste exists and a
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   844
     single selection exists"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   845
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   846
    ^CopyBuffer notNil and:[treeView selectedNode notNil]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   847
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   848
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   849
hasValidClass
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   850
    "returns true if the class defined allready exists"
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
    ^specClass isBehavior
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   853
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   854
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   855
hasValidMethodSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   856
    "returns true if the class and the instance selector defined
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   857
     allready exists."
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   858
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   859
    (specSelector notNil and:[self hasValidClass]) 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   860
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   861
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   862
        ^(specClass compiledMethodAt:specSelector) notNil
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
    ^false
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
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   867
hasValidSpecSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   868
    "returns true if the class and the class selector defined
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   869
     allready exists."
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   870
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   871
    (specSelector notNil and:[self hasValidClass])
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   872
    ifTrue:
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
        ^(specClass class compiledMethodAt:specSelector) notNil
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   875
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   876
    ^false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   877
! !
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
!HierarchicalListEditor methodsFor:'startup / release'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   880
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   881
buildFrom:aClass andSelector:aSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   882
    "rebuild window from a class and selector"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   883
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   884
    |sel anchor|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   885
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   886
    specClass := self resolveName:aClass.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   887
    specSelector := nil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   888
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   889
    aSelector size ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   890
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   891
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   892
        sel := aSelector asString withoutSeparators.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   893
        sel size ~~ 0 ifTrue:[specSelector := sel asSymbol]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   894
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   895
    treeView selection:nil.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   896
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   897
    (specSelector notNil and:[specClass notNil]) 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   898
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   899
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   900
        (specClass respondsTo:specSelector) 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   901
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   902
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   903
            anchor := specClass perform:specSelector.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   904
            anchor isArray ifTrue:[anchor := anchor decodeAsLiteralArray]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   905
        ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   906
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   907
    anchor notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   908
        ifTrue: [anchor expand. treeView root:anchor] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   909
        ifFalse:[self doNew]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   910
!
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
initialize
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   913
    "setup default values"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   914
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   915
    super initialize.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   916
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   917
    treeView := SelectionInTreeView new.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   918
    treeView multipleSelectOk: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   919
    treeView showDirectoryIndicator: true.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   920
    treeView showDirectoryIndicatorForRoot: false.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   921
    treeView action:[:aNr| self updateChannels. self updateInputFields].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   922
    treeView selectConditionBlock: [:i|self checkMenuItemModified].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   923
    treeView validateDoubleClickBlock: [:node| node ~~ treeView model list first].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   924
    self doNew.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   925
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   926
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   927
openModalOnClass:aClass andSelector:aSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   928
    "open modal on class and selector"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   929
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   930
    specClass := Association key:aClass value:aSelector.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   931
    super openInterfaceModal.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   932
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   933
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   934
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   935
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   936
openOnClass:aClass andSelector:aSelector
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   937
    "open on class and selector"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   938
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   939
    specClass := Association key:aClass value:aSelector.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   940
    super openInterface.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   941
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   942
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   943
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   944
postBuildWith:builder
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   945
    "setup view"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   946
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   947
    |cls sel|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   948
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   949
    specClass isAssociation ifTrue:[
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   950
        cls := specClass key.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   951
        sel := specClass value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   952
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   953
    self buildFrom:cls andSelector:sel.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   954
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   955
! !
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   956
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   957
!HierarchicalListEditor methodsFor:'user actions'!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   958
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   959
accept
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   960
    "invoked by button 'OK'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   961
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   962
    |node index|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   963
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   964
    (index := treeView selectedIndex) ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   965
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   966
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   967
        node := treeView nodeAtIndex:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   968
        node name: self itemName value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   969
        node contents: self itemValue value.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   970
        treeView redrawLine:index.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   971
    ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   972
    self valueOfEnablingCommitButtons value: false
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
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   975
cancel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   976
    "invoked by button 'Cancel'"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   977
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   978
    self updateInputFields.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   979
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   980
    self valueOfEnablingCommitButtons value: false
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   981
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   982
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   983
doBrowse:what
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   984
    "open a system browser"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   985
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   986
    |cls sel|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   987
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   988
    (cls := specClass) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   989
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   990
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   991
        what == #class 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   992
        ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   993
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   994
            (sel := specSelector) isNil ifTrue:[^self].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   995
            what == #spec ifTrue:[cls := cls class]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   996
        ].
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   997
        SystemBrowser openInClass:cls selector:sel
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   998
    ]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
   999
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1000
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1001
doCopy
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1002
    "copy current selected nodes into copy buffer"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1003
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1004
    CopyBuffer := OrderedCollection new.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1005
    treeView selectedNodesDo:[:aNode| CopyBuffer add: aNode copy]
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1006
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1007
!
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1008
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1009
doCreateChild
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1010
    "create a child within selected parent"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1011
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1012
    |node|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1013
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1014
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1015
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1016
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1017
        treeView model add: self newItem beforeIndex:1 below:node.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1018
        treeView selectedNodeExpand:true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1019
        self updateChannels.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1020
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1021
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1022
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1023
doCreateSister
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1024
    "create a sister next to selected item
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1025
    "
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1026
    |node|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1027
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1028
    (node := treeView selectedNode) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1029
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1030
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1031
        node parent notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1032
            ifTrue: [treeView model add: self newItem after:node] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1033
            ifFalse:[treeView model add: self newItem beforeIndex:1 below:node].
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1034
        self updateChannels
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1035
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1036
!
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
doCut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1039
    "cut current selected nodes"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1040
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1041
    |selection|
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1042
    treeView hasSelection 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1043
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1044
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1045
        self doCopy.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1046
        selection := treeView selection asSortedCollection.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1047
        treeView selectedNodesRemove.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1048
        treeView selection: selection first - 1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1049
        self updateChannels
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1050
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1051
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1052
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1053
doDefineClass
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1054
    "define class and selector"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1055
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1056
    |sel cls bindings accepted|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1057
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1058
    masterApplication notNil ifTrue:[^self information:'Only selector can be changed.'].
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1059
    accepted := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1060
    bindings := IdentityDictionary new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1061
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1062
    specClass    notNil ifTrue:[cls := specClass name asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1063
                       ifFalse:[cls := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1064
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1065
    specSelector notNil ifTrue:[sel := specSelector asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1066
                       ifFalse:[sel := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1067
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1068
    bindings at:#specSelectorChannel put: sel asValue.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1069
    bindings at:#specClassChannel    put: cls asValue.
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1070
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1071
    [accepted] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1072
    whileTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1073
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1074
        (accepted := self openDialogInterface:#classAndMethodSpec withBindings:bindings)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1075
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1076
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1077
            (cls := self resolveName:(bindings at:#specClassChannel) value) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1078
            ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1079
            [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1080
                (sel := (bindings at:#specSelectorChannel) value withoutSeparators) size ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1081
                ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1082
                [
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1083
                    specClass    := cls.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1084
                    specSelector := sel asSymbol.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1085
                    ^self
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1086
                ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1087
            ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1088
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1089
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1090
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1091
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1092
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1093
doDefineSelector
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1094
    "define selector only"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1095
327
0040d47658c6 check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
  1096
    |sel bindings accepted|
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1097
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1098
    accepted := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1099
    bindings := IdentityDictionary new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1100
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1101
    specSelector notNil ifTrue:[sel := specSelector asString]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1102
                       ifFalse:[sel := ''].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1103
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1104
    bindings at:#specSelectorChannel put:(sel asValue).
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
    [accepted] 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1107
    whileTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1108
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1109
        (accepted := self openDialogInterface:#methodSpec withBindings:bindings)
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1110
        ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1111
        [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1112
            (sel := (bindings at:#specSelectorChannel) value withoutSeparators) size ~~ 0 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1113
            ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1114
            [
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1115
                specSelector := sel asSymbol.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1116
                ^self
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1117
            ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1118
        ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1119
    ]
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1120
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1121
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1122
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1123
doInstall
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1124
    "install code"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1125
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1126
    |code spec category mthd stream|
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1127
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1128
    (specClass notNil and:[specSelector notNil])
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1129
    ifFalse:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1130
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1131
        ^self information:'No valid class and method defined!!'
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1132
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1133
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1134
    spec   := (treeView nodeAtIndex:1) literalArrayEncoding.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1135
    stream := WriteStream on:String new.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1136
    self class prettyPrintArray:spec on:stream indent:4.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1137
    spec       := stream contents.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1138
    category   := 'interface specs'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1139
    didInstall := true.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1140
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1141
    (mthd := specClass class compiledMethodAt:specSelector) notNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1142
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1143
    [
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1144
        category := mthd category
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1145
    ].
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1146
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1147
    code := Character excla asString 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1148
            , specClass name , ' class methodsFor:' , category storeString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1149
            , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1150
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1151
            , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1152
            , '    "this window spec was automatically generated by the ST/X HierarchicalListEditor"\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1153
            , '    "do not manually edit this - the builder may not be able to\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1154
            , '     handle the specification if its corrupted."\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1155
            , '    "\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1156
            , '     HierarchicalListEditor new openOnClass:' , specClass name , ' andSelector:#' , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1157
            , '    "\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1158
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1159
    code := code 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1160
            , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1161
            , '    <resource: #hierarchicalList>\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1162
            , '    ^\' 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1163
            , spec
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1164
            , ' decodeAsLiteralArray\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1165
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1166
            , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1167
            , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1168
            , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1169
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1170
    code := code withCRs.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1171
    (ReadStream on:code) fileIn.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1172
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1173
    (specClass compiledMethodAt:specSelector) isNil 
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1174
    ifTrue:
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1175
    [
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1176
        category := 'aspects'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1177
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1178
        code := Character excla asString 
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1179
                , specClass name , ' methodsFor:' , category storeString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1180
                , Character excla asString , '\\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1181
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1182
                , specSelector , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1183
                , '    "this window spec was automatically generated by the ST/X HierarchicalListEditor"\\'
306
e5e33576c3ad change install routine;
ca
parents: 300
diff changeset
  1184
                , '    ^ self class ', specSelector
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1185
                , '\'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1186
                , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1187
                , ' '
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1188
                , Character excla asString
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1189
                , '\\'.
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1190
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1191
        code := code withCRs.
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1192
        (ReadStream on:code) fileIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1193
    ]
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1194
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1195
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1196
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1197
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1198
doNew
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1199
    "remove all items; restart"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1200
306
e5e33576c3ad change install routine;
ca
parents: 300
diff changeset
  1201
    treeView root:(TreeItem name:'Anchor' contents:#anchor).
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1202
    treeView selection:0
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1203
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1204
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1205
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1206
doPaste
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1207
    "paste after current selected item"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1208
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1209
    treeView selectedNodeAdd:CopyBuffer.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1210
    self updateChannels
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1211
!
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1212
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1213
doReload
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1214
    "reload spec from current class and selector"
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1215
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1216
    self buildFrom:specClass andSelector:specSelector
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1217
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1218
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1219
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1220
doStepDown
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1221
    "move selected item after next item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1222
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1223
    treeView selectedNodeChangeSequenceOrder:1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1224
    self updateChannels
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1225
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1226
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1227
doStepIn
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1228
    "lets become the selected item a child of its next sister"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1229
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1230
    treeView selectedNodeBecomeChildOfNext.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1231
    self updateChannels
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1232
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1233
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1234
doStepOut
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1235
    "let selected node become a sister of its current parent"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1236
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1237
    treeView selectedNodeBecomeSisterOfParent.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1238
    self updateChannels
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1239
!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1240
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1241
doStepUp
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1242
    "move selected item before previous item"
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1243
423
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1244
    treeView selectedNodeChangeSequenceOrder:-1.
ea6880a0e024 totally revised version; create icons will be changed next days
tz
parents: 372
diff changeset
  1245
    self updateChannels
300
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1246
! !
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1247
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1248
!HierarchicalListEditor class methodsFor:'documentation'!
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1249
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1250
version
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1251
    ^ '$Header$'
2a35cb573365 intitial checkin
ca
parents:
diff changeset
  1252
! !