added: #doOpenExplorer
authorClaus Gittinger <cg@exept.de>
Wed, 21 Oct 2009 01:16:05 +0200
changeset 2649 e851fc141ff1
parent 2648 23b690dfd69a
child 2650 4bbfe68e7a88
added: #doOpenExplorer changed: #page7_deploySpec #selectedApplicationChanged #updateListOfApplicationsInProject
Tools__ProjectBuilderAssistantApplication.st
--- a/Tools__ProjectBuilderAssistantApplication.st	Wed Oct 21 00:23:16 2009 +0200
+++ b/Tools__ProjectBuilderAssistantApplication.st	Wed Oct 21 01:16:05 2009 +0200
@@ -665,7 +665,7 @@
        (SpecCollection
           collection: (
            (FramedBoxSpec
-              label: 'Deploy Installation File'
+              label: 'Files for Deployment'
               name: 'FramedBox3'
               layout: (LayoutFrame 0 0.0 5 0 4 1.0 0 1)
               labelPosition: topLeft
@@ -675,13 +675,35 @@
                 collection: (
                  (SubCanvasSpec
                     name: 'SubCanvas1'
-                    layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+                    layout: (LayoutFrame 0 0 0 0 0 1 -30 1)
                     hasHorizontalScrollBar: false
                     hasVerticalScrollBar: false
                     clientHolder: fileBrowserInstance
                     createNewApplication: true
                     createNewBuilder: true
                   )
+                 (HorizontalPanelViewSpec
+                    name: 'HorizontalPanel1'
+                    layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+                    horizontalLayout: center
+                    verticalLayout: center
+                    horizontalSpace: 3
+                    verticalSpace: 3
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (ActionButtonSpec
+                          label: 'Open Windows Explorer'
+                          name: 'Button1'
+                          translateLabel: true
+                          resizeForLabel: true
+                          model: doOpenExplorer
+                          extent: (Point 172 22)
+                        )
+                       )
+                     
+                    )
+                  )
                  )
                
               )
@@ -791,6 +813,11 @@
     self generatePackageContentsMethods
 !
 
+doOpenExplorer
+    OperatingSystem
+        openApplicationForDocument:(projectBuilder packageBuildDirectory) operation:#explore.
+!
+
 doStartMake
     <resource: #uiCallback>
 
@@ -883,6 +910,13 @@
     ] ifFalse:[
         selectedApplication := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value).
     ].
+    selectedApplication notNil ifTrue:[
+        "/ generate startupClass code
+        CodeGeneratorTool
+            compile:(selectedProjectDefinition startupClassName_codeFor:(selectedApplication name))
+            forClass:selectedProjectDefinition theMetaclass
+            inCategory:'description - startup'.
+    ].
     self updateApplicationComment.
     self updateButtonEnableState.
 !
@@ -1260,9 +1294,11 @@
 !
 
 updateListOfApplicationsInProject
-    |applicationClasses package|
+    |applicationClasses package startUpClassName startUpClass appClassIndex|
 
+    appClassIndex := nil.
     self selectedApplicationIndexHolder value:nil.
+
     selectedProjectDefinition isNil ifTrue:[
         applicationClasses := #()
     ] ifFalse:[
@@ -1275,8 +1311,19 @@
                                     ].
         applicationClasses := applicationClasses asOrderedCollection.
         applicationClasses sort:[:a :b | a name < b name].
+
+        startUpClassName := selectedProjectDefinition startupClassName.
+        startUpClassName notNil ifTrue:[
+            startUpClass := Smalltalk classNamed:startUpClassName.
+            startUpClass notNil ifTrue:[
+                appClassIndex := applicationClasses indexOf:startUpClass.
+                appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
+            ].
+        ].
     ].
-    self listOfApplicationsInProject value:applicationClasses
+    self listOfApplicationsInProject value:applicationClasses.
+
+    self selectedApplicationIndexHolder value:appClassIndex.
 !
 
 updateListOfClassesInProject