ProjectBrowser.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Feb 1999 19:47:38 +0100
changeset 1025 33c3db52cdc8
child 1026 ee8a738cd35d
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1025
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
ApplicationModel subclass:#ProjectBrowser
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
	instanceVariableNames:'knownProjects'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	classVariableNames:''
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	poolDictionaries:''
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	category:'Interface-Smalltalk'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
TreeItem subclass:#ProjectTreeItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	instanceVariableNames:'action'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	classVariableNames:''
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	poolDictionaries:''
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
	privateIn:ProjectBrowser
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
!ProjectBrowser class methodsFor:'interface specs'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
emptyRightCanvasSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
    "This resource specification was automatically generated
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
     by the UIPainter of ST/X."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
    "Do not manually edit this!! If it is corrupted,
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
     the UIPainter may not be able to read the specification."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
     UIPainter new openOnClass:ProjectBrowser andSelector:#emptyRightCanvasSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
     ProjectBrowser new openInterface:#emptyRightCanvasSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
    <resource: #canvas>
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    ^
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
     
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
       #(#FullSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
          #window: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
           #(#WindowSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
              #name: 'NewApplication'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
              #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
              #label: 'NewApplication'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
              #min: #(#Point 10 10)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
              #max: #(#Point 1280 1024)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
              #bounds: #(#Rectangle 216 173 516 473)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
              #usePreferredExtent: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
          #component: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
           #(#SpecCollection
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
              #collection: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
               #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
                 #(#TextEditorSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
                    #name: 'TextEditor1'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
                    #model: #rightCanvasTextHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
                    #hasHorizontalScrollBar: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
                    #hasVerticalScrollBar: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
                    #miniScrollerHorizontal: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
                    #isReadOnly: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
                )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
              )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
windowSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    "This resource specification was automatically generated
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
     by the UIPainter of ST/X."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    "Do not manually edit this!! If it is corrupted,
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
     the UIPainter may not be able to read the specification."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     UIPainter new openOnClass:ProjectBrowser andSelector:#windowSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
     ProjectBrowser new openInterface:#windowSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
     ProjectBrowser open
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    <resource: #canvas>
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    ^
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
       #(#FullSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
          #window: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
           #(#WindowSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
              #name: 'ProjectBrowser'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
              #layout: #(#LayoutFrame 16 0 31 0 579 0 353 0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
              #label: 'ProjectBrowser'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
              #min: #(#Point 10 10)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
              #max: #(#Point 1024 768)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
              #bounds: #(#Rectangle 16 31 580 354)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
              #menu: #mainMenu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
              #usePreferredExtent: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
          #component: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
           #(#SpecCollection
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
              #collection: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
               #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
                 #(#MenuPanelSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
                    #name: 'ToolBar1'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
                    #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
                    #menu: #menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
                    #textDefault: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
                )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
                 #(#VariableHorizontalPanelSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
                    #name: 'VariableHorizontalPanel1'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
                    #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 0 1.0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
                    #component: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
                     #(#SpecCollection
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
                        #collection: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
                         #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
                           #(#SelectionInTreeViewSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
                              #name: 'TreeList1'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
                              #model: #selectedTreeNode
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
                              #hasHorizontalScrollBar: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
                              #hasVerticalScrollBar: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
                              #miniScrollerHorizontal: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
                              #showRoot: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
                              #showDirectoryIndicatorForRoot: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
                              #showDirectoryIndicator: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
                              #valueChangeSelector: #itemSelected:
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
                              #hierarchicalList: #projectTreeHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
                              #highlightMode: #label
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
                          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
                           #(#SubCanvasSpec
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
                              #name: 'SubCanvas1'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
                              #hasHorizontalScrollBar: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
                              #hasVerticalScrollBar: false
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
                              #specHolder: #currentCanvasHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
                          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
                        )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
                    )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
                    #handles: #(#Any 0.274823 1.0)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
                )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
              )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
          )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
!ProjectBrowser class methodsFor:'menu specs'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
mainMenu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    "This resource specification was automatically generated
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
     by the MenuEditor of ST/X."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    "Do not manually edit this!! If it is corrupted,
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
     the MenuEditor may not be able to read the specification."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
     MenuEditor new openOnClass:ProjectBrowser andSelector:#mainMenu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser mainMenu)) startUp
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
    <resource: #menu>
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    ^
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
     
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
       #(#Menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
          
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
           #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
             #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                #label: 'File'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                #submenu: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                 #(#Menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                    
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
                     #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
                          #label: 'New'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
                          #value: #newProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
                          #label: '-'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
                          #label: 'Open...'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                          #value: #openProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                          #label: '-'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                          #label: 'Save'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                          #value: #saveProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                          #label: 'Save As...'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                          #value: #saveProjectAs
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                          #label: '-'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
                          #label: 'Exit'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
                          #value: #closeRequest
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
                    ) nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
                    nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
                )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
            )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
             #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
                #label: 'Help'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
                #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
                #startGroup: #right
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
                #submenu: 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                 #(#Menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                    
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
                     #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
                          #label: 'Documentation'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
                          #value: #openDocumentation
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
                          #label: '-'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
                       #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
                          #label: 'About this Application'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
                          #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
                          #value: #openAboutThisApplication
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
                      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
                    ) nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
                    nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
                )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
            )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
          ) nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
          nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "This resource specification was automatically generated
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
     by the MenuEditor of ST/X."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    "Do not manually edit this!! If it is corrupted,
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
     the MenuEditor may not be able to read the specification."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
     MenuEditor new openOnClass:ProjectBrowser andSelector:#menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
     (Menu new fromLiteralArrayEncoding:(ProjectBrowser menu)) startUp
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    "
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    <resource: #menu>
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
    ^
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
     
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
       #(#Menu
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
          
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
           #(
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
             #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                #label: 'New...'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                #isButton: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
                #value: #newProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
            )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
             #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                #label: 'Open...'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                #isButton: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                #value: #openProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
            )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
             #(#MenuItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
                #label: 'SaveAs...'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
                #translateLabel: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
                #isButton: true
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
                #value: #saveProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
            )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
          ) nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
          nil
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
      )
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
!ProjectBrowser methodsFor:'aspects'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
currentCanvasHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
    "automatically generated by UIPainter ..."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
    "*** the code below creates a default model when invoked."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
    "*** (which may not be the one you wanted)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
    "*** Please change as required and accept in the browser."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    |holder|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
    (holder := builder bindingAt:#currentCanvasHolder) isNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
        builder aspectAt:#currentCanvasHolder put:(holder :=  ValueHolder new).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
    ^ holder.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
projectTreeHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    "automatically generated by UIPainter ..."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
    "*** the code below creates a default model when invoked."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
    "*** (which may not be the one you wanted)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
    "*** Please change as required and accept in the browser."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    |holder|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    (holder := builder bindingAt:#projectTree) isNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
        builder aspectAt:#projectTree put:(holder :=  SelectionInTree new).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
        holder root:self projectTree.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    ^ holder.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
rightCanvasTextHolder
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    "automatically generated by UIPainter ..."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
    "*** the code below creates a default model when invoked."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
    "*** (which may not be the one you wanted)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
    "*** Please change as required and accept in the browser."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
    |holder|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    (holder := builder bindingAt:#rightCanvasTextHolder) isNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
        builder aspectAt:#rightCanvasTextHolder put:(holder :=  ValueHolder new).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    ^ holder.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
selectedTreeNode
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
    "automatically generated by UIPainter ..."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
    "*** the code below creates a default model when invoked."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    "*** (which may not be the one you wanted)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
    "*** Please change as required and accept in the browser."
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
    |holder|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
    (holder := builder bindingAt:#selectedTreeNode) isNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
        builder aspectAt:#selectedTreeNode put:(holder :=  ValueHolder new).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
    ^ holder.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
!ProjectBrowser methodsFor:'initialization'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
postBuildWith:aBuiler
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
    self setupCanvasForNoSelection
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
setupCanvasForNoSelection
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
    self currentCanvasHolder value:(self class emptyRightCanvasSpec).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
    self rightCanvasTextHolder value:'Please select an existing,
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
or create a new project.'.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
!ProjectBrowser methodsFor:'private'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
nodeFor:aProject
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
    |projectName pNode 
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
     propertiesNode docNode classesNode subprojectsNode filesNode
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
     commentNode|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
    projectName := aProject name.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
    pNode := ProjectTreeItem name:projectName.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
    pNode contents:aProject.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
    pNode add:(commentNode := ProjectTreeItem name:'Comment').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
    pNode add:(docNode := ProjectTreeItem name:'Documentation').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
    pNode add:(propertiesNode := ProjectTreeItem name:'Properties').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
    pNode add:(classesNode := ProjectTreeItem name:'Classes').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
    pNode add:(subprojectsNode := ProjectTreeItem name:'SubProjects').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    pNode add:(filesNode := ProjectTreeItem name:'Files').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
    aProject subProjects do:[:aSubProject |
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
        subprojectsNode add:(self nodeFor:aSubProject)
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
    commentNode action:[:item | self showCommentOf:item].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
    docNode contents:nil.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
    propertiesNode contents:nil.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
    classesNode contents:nil.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
    subprojectsNode contents:nil.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
    filesNode contents:nil.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
    ^ pNode
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
projectTree
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
    |tree root|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
    tree := SelectionInTree new.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
    tree root:(root := TreeItem name:'invisibleRoot').
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
    Project knownProjects do:[:aProject |
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
        root add:(self nodeFor:aProject).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
    ^ root
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
updateRightCanvas
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
    |selectedNode nodeContents|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
    selectedNode := self selectedTreeNode value.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
    selectedNode isNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
        self setupCanvasForNoSelection.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
        ^ self
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
    nodeContents := selectedNode contents.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
    (nodeContents isMemberOf:Project) ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
        self currentCanvasHolder value:(self class emptyRightCanvasSpec).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
        self rightCanvasTextHolder value:nodeContents comment.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
        ^ self.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
    self currentCanvasHolder value:(self class emptyRightCanvasSpec).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
    self rightCanvasTextHolder value:''.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
!ProjectBrowser methodsFor:'user actions'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
itemSelected:index
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
    |item action|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
    self updateRightCanvas.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
    item := self projectTreeHolder value at:index.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
    action := item action.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
    action notNil ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
        action value:item.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
showCommentOf:anItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
    |project|
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
    project := anItem parent contents.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
    self currentCanvasHolder value:(self class emptyRightCanvasSpec).
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
    self rightCanvasTextHolder value:project comment.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
showTreeItem:anItem
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
    anItem contents == #comment ifTrue:[
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
        self showCommentOf:anItem.
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
        ^ self
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
    ].
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
!ProjectBrowser::ProjectTreeItem methodsFor:'accessing'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
action
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
    "return the value of the instance variable 'action' (automatically generated)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
    ^ action!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
action:something
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
    "set the value of the instance variable 'action' (automatically generated)"
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
    action := something.! !
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
!ProjectBrowser class methodsFor:'documentation'!
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
version
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
    ^ '$Header$'
33c3db52cdc8 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
! !