ProjectBrowser.st
changeset 1085 a35169ceb247
parent 1081 b8f1b9924f40
child 1088 60edf3482db2
equal deleted inserted replaced
1084:5b46f277b3e1 1085:a35169ceb247
   248      
   248      
   249        #(#FullSpec
   249        #(#FullSpec
   250           #name: #rightCanvasSpecForDeployment
   250           #name: #rightCanvasSpecForDeployment
   251           #window: 
   251           #window: 
   252            #(#WindowSpec
   252            #(#WindowSpec
       
   253               #label: 'NewApplication'
   253               #name: 'NewApplication'
   254               #name: 'NewApplication'
   254               #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
   255               #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
   255               #level: 0
   256               #level: 0
   256               #label: 'NewApplication'
       
   257               #min: #(#Point 10 10)
   257               #min: #(#Point 10 10)
   258               #max: #(#Point 1280 1024)
   258               #max: #(#Point 1280 1024)
   259               #bounds: #(#Rectangle 216 173 516 473)
   259               #bounds: #(#Rectangle 216 173 516 473)
   260               #usePreferredExtent: false
   260               #usePreferredExtent: false
   261               #returnIsOKInDialog: true
   261               #returnIsOKInDialog: true
   262               #escapeIsCancelInDialog: true
   262               #escapeIsCancelInDialog: true
   263           )
   263             )
   264           #component: 
   264           #component: 
   265            #(#SpecCollection
   265            #(#SpecCollection
   266               #collection: 
   266               #collection: 
   267                #(
   267                #(
   268                  #(#HorizontalPanelViewSpec
   268                  #(#HorizontalPanelViewSpec
   269                     #name: 'HorizontalPanel1'
   269                     #name: 'HorizontalPanel1'
   270                     #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1)
   270                     #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1)
       
   271                     #horizontalLayout: #fitSpace
       
   272                     #verticalLayout: #center
       
   273                     #horizontalSpace: 3
       
   274                     #verticalSpace: 3
   271                     #component: 
   275                     #component: 
   272                      #(#SpecCollection
   276                      #(#SpecCollection
   273                         #collection: 
   277                         #collection: 
   274                          #(
   278                          #(
   275                            #(#ActionButtonSpec
   279                            #(#ActionButtonSpec
       
   280                               #label: 'Cancel'
   276                               #name: 'Button1'
   281                               #name: 'Button1'
   277                               #label: 'Cancel'
       
   278                               #translateLabel: true
   282                               #translateLabel: true
   279                               #model: #cancel
   283                               #model: #cancel
   280                               #enableChannel: #modifiedChannel
   284                               #enableChannel: #modifiedChannel
   281                               #extent: #(#Point 145 22)
   285                               #extent: #(#Point 145 22)
   282                           )
   286                             )
   283                            #(#ActionButtonSpec
   287                            #(#ActionButtonSpec
       
   288                               #label: 'OK'
   284                               #name: 'Button2'
   289                               #name: 'Button2'
   285                               #label: 'OK'
       
   286                               #translateLabel: true
   290                               #translateLabel: true
   287                               #model: #accept
   291                               #model: #accept
   288                               #enableChannel: #modifiedChannel
   292                               #enableChannel: #modifiedChannel
   289                               #extent: #(#Point 146 22)
   293                               #extent: #(#Point 146 22)
       
   294                             )
   290                           )
   295                           )
   291                         )
   296                       )
   292                     )
   297                   )
   293                     #horizontalLayout: #fitSpace
       
   294                     #verticalLayout: #center
       
   295                     #horizontalSpace: 3
       
   296                     #verticalSpace: 3
       
   297                 )
       
   298                  #(#FramedBoxSpec
   298                  #(#FramedBoxSpec
       
   299                     #label: 'Delivery'
   299                     #name: 'FramedBox1'
   300                     #name: 'FramedBox1'
   300                     #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 124 0)
   301                     #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 124 0)
       
   302                     #labelPosition: #topLeft
       
   303                     #translateLabel: true
   301                     #component: 
   304                     #component: 
   302                      #(#SpecCollection
   305                      #(#SpecCollection
   303                         #collection: 
   306                         #collection: 
   304                          #(
   307                          #(
   305                            #(#CheckBoxSpec
   308                            #(#CheckBoxSpec
       
   309                               #label: 'Compiled Binary'
   306                               #name: 'CheckBox1'
   310                               #name: 'CheckBox1'
   307                               #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0)
   311                               #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0)
   308                               #model: #deliverCompiledBinary
   312                               #model: #deliverCompiledBinary
   309                               #label: 'Compiled Binary'
       
   310                               #translateLabel: true
   313                               #translateLabel: true
   311                           )
   314                             )
   312                            #(#CheckBoxSpec
   315                            #(#CheckBoxSpec
       
   316                               #label: 'Zip Archive'
   313                               #name: 'CheckBox2'
   317                               #name: 'CheckBox2'
   314                               #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
   318                               #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
   315                               #model: #deliverZipArchive
   319                               #model: #deliverZipArchive
   316                               #label: 'Zip Archive'
       
   317                               #translateLabel: true
   320                               #translateLabel: true
   318                           )
   321                             )
   319                            #(#CheckBoxSpec
   322                            #(#CheckBoxSpec
       
   323                               #label: 'Sources'
   320                               #name: 'CheckBox3'
   324                               #name: 'CheckBox3'
   321                               #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
   325                               #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
   322                               #model: #deliverSources
   326                               #model: #deliverSources
   323                               #label: 'Sources'
       
   324                               #translateLabel: true
   327                               #translateLabel: true
       
   328                             )
   325                           )
   329                           )
   326                         )
   330                       )
   327                     )
   331                   )
   328                     #label: 'Delivery'
   332                  #(#FramedBoxSpec
       
   333                     #label: 'Install Directory'
       
   334                     #name: 'FramedBox2'
       
   335                     #layout: #(#LayoutFrame 0 0.0 125 0 0 1.0 190 0)
   329                     #labelPosition: #topLeft
   336                     #labelPosition: #topLeft
   330                     #translateLabel: true
   337                     #translateLabel: true
   331                 )
       
   332                  #(#FramedBoxSpec
       
   333                     #name: 'FramedBox2'
       
   334                     #layout: #(#LayoutFrame 0 0.0 125 0 0 1.0 190 0)
       
   335                     #component: 
   338                     #component: 
   336                      #(#SpecCollection
   339                      #(#SpecCollection
   337                         #collection: 
   340                         #collection: 
   338                          #(
   341                          #(
   339                            #(#InputFieldSpec
   342                            #(#InputFieldSpec
   340                               #name: 'EntryField1'
   343                               #name: 'EntryField1'
   341                               #layout: #(#LayoutFrame 0 0.0 5 0 0 1.0 27 0)
   344                               #layout: #(#LayoutFrame 0 0.0 5 0 0 1.0 27 0)
   342                               #model: #installDirectory
   345                               #model: #installDirectory
   343                               #modifiedChannel: #modifiedChannel
   346                               #modifiedChannel: #modifiedChannel
       
   347                             )
   344                           )
   348                           )
   345                         )
   349                       )
   346                     )
   350                   )
   347                     #label: 'Install Directory'
       
   348                     #labelPosition: #topLeft
       
   349                     #translateLabel: true
       
   350                 )
   351                 )
   351               )
   352             )
   352           )
   353         )
   353       )
       
   354 !
   354 !
   355 
   355 
   356 rightCanvasSpecForEditableText
   356 rightCanvasSpecForEditableText
   357     "This resource specification was automatically generated
   357     "This resource specification was automatically generated
   358      by the UIPainter of ST/X."
   358      by the UIPainter of ST/X."
   685               #bounds: #(#Rectangle 216 173 780 496)
   685               #bounds: #(#Rectangle 216 173 780 496)
   686               #menu: #mainMenu
   686               #menu: #mainMenu
   687               #usePreferredExtent: false
   687               #usePreferredExtent: false
   688               #returnIsOKInDialog: true
   688               #returnIsOKInDialog: true
   689               #escapeIsCancelInDialog: true
   689               #escapeIsCancelInDialog: true
   690           )
   690             )
   691           #component: 
   691           #component: 
   692            #(#SpecCollection
   692            #(#SpecCollection
   693               #collection: 
   693               #collection: 
   694                #(
   694                #(
   695                  #(#MenuPanelSpec
   695                  #(#MenuPanelSpec
   696                     #name: 'ToolBar1'
   696                     #name: 'ToolBar1'
   697                     #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
   697                     #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
   698                     #menu: #menu
   698                     #menu: #menu
   699                     #textDefault: true
   699                     #textDefault: true
   700                 )
   700                   )
   701                  #(#VariableHorizontalPanelSpec
   701                  #(#VariableHorizontalPanelSpec
   702                     #name: 'VariableHorizontalPanel1'
   702                     #name: 'VariableHorizontalPanel1'
   703                     #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -24 1.0)
   703                     #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -24 1.0)
   704                     #component: 
   704                     #component: 
   705                      #(#SpecCollection
   705                      #(#SpecCollection
   718                               #showDirectoryIndicator: true
   718                               #showDirectoryIndicator: true
   719                               #valueChangeSelector: #itemSelected:
   719                               #valueChangeSelector: #itemSelected:
   720                               #hierarchicalList: #projectTreeHolder
   720                               #hierarchicalList: #projectTreeHolder
   721                               #selectConditionSelector: #selectionChangeAllowed
   721                               #selectConditionSelector: #selectionChangeAllowed
   722                               #highlightMode: #label
   722                               #highlightMode: #label
   723                           )
   723                             )
   724                            #(#SubCanvasSpec
   724                            #(#SubCanvasSpec
   725                               #name: 'SubCanvas1'
   725                               #name: 'SubCanvas1'
   726                               #hasHorizontalScrollBar: false
   726                               #hasHorizontalScrollBar: false
   727                               #hasVerticalScrollBar: false
   727                               #hasVerticalScrollBar: false
   728                               #specHolder: #currentCanvasHolder
   728                               #specHolder: #currentCanvasHolder
       
   729                             )
   729                           )
   730                           )
   730                         )
   731                       )
   731                     )
       
   732                     #handles: #(#Any 0.379433 1.0)
   732                     #handles: #(#Any 0.379433 1.0)
   733                 )
   733                   )
   734                  #(#UISubSpecification
   734                  #(#UISubSpecification
   735                     #name: 'infoBarSubSpec'
   735                     #name: 'infoBarSubSpec'
   736                     #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   736                     #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   737                     #majorKey: #ToolApplicationModel
   737                     #majorKey: #ToolApplicationModel
   738                     #minorKey: #windowSpecForInfoBar
   738                     #minorKey: #windowSpecForInfoBar
       
   739                   )
   739                 )
   740                 )
   740               )
   741             )
   741           )
   742         )
   742       )
       
   743 ! !
   743 ! !
   744 
   744 
   745 !ProjectBrowser class methodsFor:'menu specs'!
   745 !ProjectBrowser class methodsFor:'menu specs'!
   746 
   746 
   747 classesItemMenu
   747 classesItemMenu
   795      (Menu new fromLiteralArrayEncoding:(ProjectBrowser mainMenu)) startUp
   795      (Menu new fromLiteralArrayEncoding:(ProjectBrowser mainMenu)) startUp
   796     "
   796     "
   797 
   797 
   798     <resource: #menu>
   798     <resource: #menu>
   799 
   799 
   800     ^
   800     ^ 
   801      
   801      #(#Menu
   802        #(#Menu
   802         #(
   803           
   803          #(#MenuItem
   804            #(
   804             #label: 'File'
   805              #(#MenuItem
   805             #translateLabel: true
   806                 #label: 'File'
   806             #submenu: 
   807                 #translateLabel: true
   807            #(#Menu
   808                 #submenu: 
   808               #(
   809                  #(#Menu
   809                #(#MenuItem
   810                     
   810                   #label: 'Load From...'
   811                      #(
   811                   #translateLabel: true
   812                        #(#MenuItem
   812                   #value: #openProject
   813                           #label: 'Load From...'
       
   814                           #translateLabel: true
       
   815                           #value: #openProject
       
   816                       )
       
   817                        #(#MenuItem
       
   818                           #label: '-'
       
   819                       )
       
   820                        #(#MenuItem
       
   821                           #label: 'Save'
       
   822                           #translateLabel: true
       
   823                           #value: #saveProject
       
   824                           #enabled: #hasProjectSelectedHolder
       
   825                       )
       
   826                        #(#MenuItem
       
   827                           #label: 'Save As...'
       
   828                           #translateLabel: true
       
   829                           #value: #saveProjectAs
       
   830                           #enabled: #hasProjectSelectedHolder
       
   831                       )
       
   832                        #(#MenuItem
       
   833                           #label: '-'
       
   834                       )
       
   835                        #(#MenuItem
       
   836                           #label: 'Exit'
       
   837                           #translateLabel: true
       
   838                           #value: #closeRequest
       
   839                       )
       
   840                     ) nil
       
   841                     nil
       
   842                 )
   813                 )
   843             )
   814                #(#MenuItem
   844              #(#MenuItem
   815                   #label: '-'
   845                 #label: 'Project'
       
   846                 #translateLabel: true
       
   847                 #submenuChannel: #projectItemMenu
       
   848             )
       
   849              #(#MenuItem
       
   850                 #label: 'Help'
       
   851                 #translateLabel: true
       
   852                 #startGroup: #right
       
   853                 #submenu: 
       
   854                  #(#Menu
       
   855                     
       
   856                      #(
       
   857                        #(#MenuItem
       
   858                           #label: 'Documentation'
       
   859                           #translateLabel: true
       
   860                           #value: #openDocumentation
       
   861                       )
       
   862                        #(#MenuItem
       
   863                           #label: '-'
       
   864                       )
       
   865                        #(#MenuItem
       
   866                           #label: 'About this Application'
       
   867                           #translateLabel: true
       
   868                           #value: #openAboutThisApplication
       
   869                       )
       
   870                     ) nil
       
   871                     nil
       
   872                 )
   816                 )
   873             )
   817                #(#MenuItem
   874           ) nil
   818                   #label: 'Save'
   875           nil
   819                   #translateLabel: true
       
   820                   #value: #saveProject
       
   821                   #enabled: #hasProjectSelectedHolder
       
   822                 )
       
   823                #(#MenuItem
       
   824                   #label: 'Save As...'
       
   825                   #translateLabel: true
       
   826                   #value: #saveProjectAs
       
   827                   #enabled: #hasProjectSelectedHolder
       
   828                 )
       
   829                #(#MenuItem
       
   830                   #label: '-'
       
   831                 )
       
   832                #(#MenuItem
       
   833                   #label: 'Exit'
       
   834                   #translateLabel: true
       
   835                   #value: #closeRequest
       
   836                 )
       
   837                )
       
   838               nil
       
   839               nil
       
   840             )
       
   841           )
       
   842          #(#MenuItem
       
   843             #label: 'Project'
       
   844             #translateLabel: true
       
   845             #submenuChannel: #projectItemMenu
       
   846           )
       
   847          #(#MenuItem
       
   848             #label: 'Help'
       
   849             #translateLabel: true
       
   850             #startGroup: #right
       
   851             #submenu: 
       
   852            #(#Menu
       
   853               #(
       
   854                #(#MenuItem
       
   855                   #label: 'Documentation'
       
   856                   #translateLabel: true
       
   857                   #value: #openDocumentation
       
   858                 )
       
   859                #(#MenuItem
       
   860                   #label: '-'
       
   861                 )
       
   862                #(#MenuItem
       
   863                   #label: 'About this Application'
       
   864                   #translateLabel: true
       
   865                   #value: #openAboutThisApplication
       
   866                 )
       
   867                )
       
   868               nil
       
   869               nil
       
   870             )
       
   871           )
       
   872          )
       
   873         nil
       
   874         nil
   876       )
   875       )
   877 !
   876 !
   878 
   877 
   879 menu
   878 menu
   880     "This resource specification was automatically generated
   879     "This resource specification was automatically generated
  1380 ! !
  1379 ! !
  1381 
  1380 
  1382 !ProjectBrowser methodsFor:'change & update'!
  1381 !ProjectBrowser methodsFor:'change & update'!
  1383 
  1382 
  1384 update:something with:aParameter from:changedObject
  1383 update:something with:aParameter from:changedObject
       
  1384     something == #name ifTrue:[
       
  1385         "/ a project was renamed - update my tree
       
  1386         self projectTree children do:[:pNode |
       
  1387             pNode contents == changedObject ifTrue:[
       
  1388                 pNode name:changedObject name.
       
  1389                 pNode changed.
       
  1390             ]
       
  1391         ].
       
  1392         ^ self.
       
  1393     ].
       
  1394 
  1385     changedObject == self currentProject ifTrue:[
  1395     changedObject == self currentProject ifTrue:[
  1386         self halt
  1396         self halt
  1387     ].
  1397     ].
  1388 ! !
  1398 ! !
  1389 
  1399 
  1787                 request:'Rename to:'
  1797                 request:'Rename to:'
  1788                 initialAnswer:selectedProject name.
  1798                 initialAnswer:selectedProject name.
  1789 
  1799 
  1790         nm size > 0 ifTrue:[
  1800         nm size > 0 ifTrue:[
  1791             selectedProject name:nm.
  1801             selectedProject name:nm.
  1792             selectedNode name:nm.
  1802 "/            selectedNode name:nm.
  1793             selectedNode changed.
  1803 "/            selectedNode changed.
  1794         ]
  1804         ]
  1795     ]
  1805     ]
  1796 !
  1806 !
  1797 
  1807 
  1798 saveProject
  1808 saveProject