checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 25 Mar 1999 18:34:16 +0100
changeset 1091 515166c6a8c8
parent 1090 4b7c3e6fc5f1
child 1092 60e029255679
checkin from browser
ProjectBrowser.st
--- a/ProjectBrowser.st	Thu Mar 25 17:30:01 1999 +0100
+++ b/ProjectBrowser.st	Thu Mar 25 18:34:16 1999 +0100
@@ -251,11 +251,11 @@
        #(#WindowSpec
           #label: 'NewApplication'
           #name: 'NewApplication'
-          #layout: #(#LayoutFrame 908 0 40 0 1207 0 339 0)
+          #layout: #(#LayoutFrame 140 0 81 0 439 0 380 0)
           #level: 0
           #min: #(#Point 10 10)
           #max: #(#Point 1280 1024)
-          #bounds: #(#Rectangle 908 40 1208 340)
+          #bounds: #(#Rectangle 140 81 440 381)
           #usePreferredExtent: false
           #returnIsOKInDialog: true
           #escapeIsCancelInDialog: true
@@ -263,6 +263,79 @@
         #component: 
        #(#SpecCollection
           #collection: #(
+           #(#FramedBoxSpec
+              #label: 'Delivery'
+              #name: 'FramedBox1'
+              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 173 0)
+              #labelPosition: #topLeft
+              #translateLabel: true
+              #component: 
+             #(#SpecCollection
+                #collection: #(
+                 #(#CheckBoxSpec
+                    #label: 'Compiled Binary'
+                    #name: 'CheckBox1'
+                    #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0)
+                    #tabable: true
+                    #model: #deliverCompiledBinary
+                    #translateLabel: true
+                  )
+                 #(#CheckBoxSpec
+                    #label: 'Zip Archive'
+                    #name: 'CheckBox2'
+                    #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
+                    #tabable: true
+                    #model: #deliverZipArchive
+                    #translateLabel: true
+                  )
+                 #(#CheckBoxSpec
+                    #label: 'GZip Archive (self extracting)'
+                    #name: 'CheckBox3'
+                    #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
+                    #tabable: true
+                    #model: #deliverSources
+                    #translateLabel: true
+                  )
+                 #(#CheckBoxSpec
+                    #label: 'Sources'
+                    #name: 'CheckBox4'
+                    #layout: #(#LayoutFrame 0 0.0 94 0 0 1.0 116 0)
+                    #tabable: true
+                    #model: #deliverGZipArchive
+                    #translateLabel: true
+                  )
+                 #(#CheckBoxSpec
+                    #label: 'loadAll-File'
+                    #name: 'CheckBox5'
+                    #layout: #(#LayoutFrame 0 0.0 122 0 0 1.0 144 0)
+                    #tabable: true
+                    #model: #deliverLoadAllFile
+                    #translateLabel: true
+                  )
+                 )
+               
+              )
+            )
+           #(#FramedBoxSpec
+              #label: 'Install Directory'
+              #name: 'FramedBox2'
+              #layout: #(#LayoutFrame 0 0.0 178 0 0 1.0 243 0)
+              #labelPosition: #topLeft
+              #translateLabel: true
+              #component: 
+             #(#SpecCollection
+                #collection: #(
+                 #(#InputFieldSpec
+                    #name: 'EntryField1'
+                    #layout: #(#LayoutFrame 0 0.0 6 0 0 1.0 28 0)
+                    #tabable: true
+                    #model: #installDirectory
+                    #modifiedChannel: #modifiedChannel
+                  )
+                 )
+               
+              )
+            )
            #(#HorizontalPanelViewSpec
               #name: 'HorizontalPanel1'
               #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1)
@@ -277,77 +350,21 @@
                     #label: 'Cancel'
                     #name: 'Button1'
                     #translateLabel: true
+                    #tabable: true
                     #model: #cancel
                     #enableChannel: #modifiedChannel
-                    #extent: #(#Point 145 22)
+                    #actionValue: ''
+                    #useDefaultExtent: true
                   )
                  #(#ActionButtonSpec
                     #label: 'OK'
                     #name: 'Button2'
                     #translateLabel: true
+                    #tabable: true
                     #model: #accept
                     #enableChannel: #modifiedChannel
-                    #extent: #(#Point 146 22)
-                  )
-                 )
-               
-              )
-            )
-           #(#FramedBoxSpec
-              #label: 'Delivery'
-              #name: 'FramedBox1'
-              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 150 0)
-              #labelPosition: #topLeft
-              #translateLabel: true
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#CheckBoxSpec
-                    #label: 'Compiled Binary'
-                    #name: 'CheckBox1'
-                    #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0)
-                    #model: #deliverCompiledBinary
-                    #translateLabel: true
-                  )
-                 #(#CheckBoxSpec
-                    #label: 'Zip Archive'
-                    #name: 'CheckBox2'
-                    #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0)
-                    #model: #deliverZipArchive
-                    #translateLabel: true
-                  )
-                 #(#CheckBoxSpec
-                    #label: 'GZip Archive (self extracting)'
-                    #name: 'CheckBox3'
-                    #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0)
-                    #model: #deliverSources
-                    #translateLabel: true
-                  )
-                 #(#CheckBoxSpec
-                    #label: 'Sources'
-                    #name: 'CheckBox4'
-                    #layout: #(#LayoutFrame 0 0.0 94 0 0 1.0 116 0)
-                    #model: #deliverGZipArchive
-                    #translateLabel: true
-                  )
-                 )
-               
-              )
-            )
-           #(#FramedBoxSpec
-              #label: 'Install Directory'
-              #name: 'FramedBox2'
-              #layout: #(#LayoutFrame 0 0.0 153 0 0 1.0 218 0)
-              #labelPosition: #topLeft
-              #translateLabel: true
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#InputFieldSpec
-                    #name: 'EntryField1'
-                    #layout: #(#LayoutFrame 0 0.0 5 0 0 1.0 27 0)
-                    #model: #installDirectory
-                    #modifiedChannel: #modifiedChannel
+                    #actionValue: ''
+                    #useDefaultExtent: true
                   )
                  )
                
@@ -516,11 +533,11 @@
        #(#WindowSpec
           #label: 'NewApplication'
           #name: 'NewApplication'
-          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
+          #layout: #(#LayoutFrame 208 0 222 0 507 0 521 0)
           #level: 0
           #min: #(#Point 10 10)
           #max: #(#Point 1280 1024)
-          #bounds: #(#Rectangle 216 173 516 473)
+          #bounds: #(#Rectangle 208 222 508 522)
           #usePreferredExtent: false
           #returnIsOKInDialog: true
           #escapeIsCancelInDialog: true
@@ -529,7 +546,7 @@
        #(#SpecCollection
           #collection: #(
            #(#LabelSpec
-              #label: 'Projects'
+              #label: 'Known Projects'
               #name: 'Label1'
               #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0)
               #translateLabel: true
@@ -657,11 +674,11 @@
        #(#WindowSpec
           #label: 'NewApplication'
           #name: 'NewApplication'
-          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
+          #layout: #(#LayoutFrame 21 0 21 0 320 0 364 0)
           #level: 0
           #min: #(#Point 10 10)
           #max: #(#Point 1280 1024)
-          #bounds: #(#Rectangle 216 173 516 473)
+          #bounds: #(#Rectangle 21 21 321 365)
           #usePreferredExtent: false
           #returnIsOKInDialog: true
           #escapeIsCancelInDialog: true
@@ -685,7 +702,8 @@
                     #translateLabel: true
                     #model: #cancel
                     #enableChannel: #modifiedChannel
-                    #extent: #(#Point 145 22)
+                    #actionValue: ''
+                    #useDefaultExtent: true
                   )
                  #(#ActionButtonSpec
                     #label: 'OK'
@@ -693,7 +711,7 @@
                     #translateLabel: true
                     #model: #accept
                     #enableChannel: #modifiedChannel
-                    #extent: #(#Point 146 22)
+                    #useDefaultExtent: true
                   )
                  )
                
@@ -702,7 +720,7 @@
            #(#FramedBoxSpec
               #label: 'Project Type'
               #name: 'FramedBox1'
-              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 93 0)
+              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 89 0)
               #labelPosition: #topLeft
               #translateLabel: true
               #component: 
@@ -733,7 +751,7 @@
            #(#FramedBoxSpec
               #label: 'Directory'
               #name: 'FramedBox2'
-              #layout: #(#LayoutFrame 0 0.0 94 0.0 0 1.0 159 0)
+              #layout: #(#LayoutFrame 0 0.0 89 0.0 0 1.0 149 0)
               #labelPosition: #topLeft
               #translateLabel: true
               #component: 
@@ -753,7 +771,7 @@
            #(#FramedBoxSpec
               #label: 'Repository'
               #name: 'FramedBox3'
-              #layout: #(#LayoutFrame 0 0.0 160 0.0 0 1.0 243 0)
+              #layout: #(#LayoutFrame 0 0.0 152 0.0 0 1.0 235 0)
               #labelPosition: #topLeft
               #translateLabel: true
               #component: 
@@ -789,6 +807,25 @@
                
               )
             )
+           #(#FramedBoxSpec
+              #label: 'Default Namespace'
+              #name: 'FramedBox4'
+              #layout: #(#LayoutFrame 0 0.0 236 0 0 1.0 294 0)
+              #labelPosition: #topLeft
+              #translateLabel: true
+              #component: 
+             #(#SpecCollection
+                #collection: #(
+                 #(#InputFieldSpec
+                    #name: 'EntryField4'
+                    #layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0)
+                    #model: #projectNamespace
+                    #modifiedChannel: #modifiedChannel
+                  )
+                 )
+               
+              )
+            )
            )
          
         )
@@ -1290,7 +1327,9 @@
     |holder|
 
     (holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[
-        holder := BlockValue with:[:m | m notNil] argument:(self selectedProjectInPrerequisites).
+        holder := BlockValue 
+                        with:[:m | self canAddToPrerequisites:m] 
+                        argument:(self selectedProjectInPrerequisites).
         builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder.
     ].
     ^ holder.
@@ -1401,6 +1440,24 @@
     "Created: / 23.3.1999 / 14:18:05 / cg"
 !
 
+deliverLoadAllFile
+    "automatically generated by UIPainter ..."
+
+    "*** the code below creates a default model when invoked."
+    "*** (which may not be the one you wanted)"
+    "*** Please change as required and accept in the browser."
+
+    |holder|
+
+    (holder := builder bindingAt:#deliverLoadAllFile) isNil ifTrue:[
+        builder aspectAt:#deliverLoadAllFile put:(holder :=  ValueHolder new).
+        holder onChangeSend:#value to:[modifiedChannel value:true].
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 deliverSources
     "automatically generated by UIPainter ..."
 
@@ -1489,13 +1546,19 @@
     "*** (which may not be the one you wanted)"
     "*** Please change as required and accept in the browser."
 
-    |holder projects|
+    |holder projects currentProject|
 
     (holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[
         builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := List new).
+
+        currentProject := self currentProject.
+
         projects := Set new.
         Project allInstancesDo:[:p |
-            projects add:p name
+            (p ~~ currentProject 
+            and:[p ~~ Project defaultProject]) ifTrue:[
+                projects add:p name.
+            ]
         ].
         projects := projects asOrderedCollection sort.
         holder addAll:projects.
@@ -1569,6 +1632,24 @@
     "Created: / 23.3.1999 / 14:18:05 / cg"
 !
 
+projectNamespace
+    "automatically generated by UIPainter ..."
+
+    "*** the code below creates a default model when invoked."
+    "*** (which may not be the one you wanted)"
+    "*** Please change as required and accept in the browser."
+
+    |holder|
+
+    (holder := builder bindingAt:#projectNamespace) isNil ifTrue:[
+        builder aspectAt:#projectNamespace put:(holder :=  ValueHolder new).
+        holder onChangeSend:#value to:[modifiedChannel value:true].
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 projectTreeHolder
     "automatically generated by UIPainter ..."
 
@@ -1769,6 +1850,11 @@
 
 !ProjectBrowser methodsFor:'private'!
 
+canAddToPrerequisites:aProjectName
+    ^ aProjectName notNil
+      and:[aProjectName ~= self currentProject name]
+!
+
 currentProject
     |node|
 
@@ -1871,7 +1957,7 @@
 
     prerequisitesNode contents:#prerequisites.
     prerequisitesNode icon:(self class prerequisitesIcon).
-    prerequisitesNode spec:(self class rightCanvasSpecForPrerequisites).
+    prerequisitesNode spec:[self class rightCanvasSpecForPrerequisites].
 
     classesNode contents:#classes.
     classesNode icon:(self class classesIcon).
@@ -1891,7 +1977,7 @@
     ].
 
     propertiesNode contents:#properties.
-    propertiesNode spec:(self class rightCanvasSpecForProperties).
+    propertiesNode spec:[self class rightCanvasSpecForProperties].
 
     filesNode contents:#files.
     filesNode icon:(self class filesIcon).
@@ -1900,7 +1986,7 @@
     patchesNode icon:(self class methodsIcon).
 
     deploymentNode icon:(self class deploymentIcon).
-    deploymentNode spec:(self class rightCanvasSpecForDeployment).
+    deploymentNode spec:[self class rightCanvasSpecForDeployment].
 
     ^ pNode
 
@@ -1934,6 +2020,8 @@
         self projectType value:(p type).
         self projectDirectory value:(p directory).
 
+        self projectNamespace value:(p defaultNameSpace ? Smalltalk) name.
+
         self repositoryModule value:(p repositoryModule).
         self repositoryDirectory value:(p repositoryDirectory).
 
@@ -1941,6 +2029,7 @@
         self deliverGZipArchive value:(p propertyAt:#deliverGZipArchive) ? false.
         self deliverZipArchive value:(p propertyAt:#deliverZipArchive) ? false.
         self deliverSources value:(p propertyAt:#deliverSources) ? false.
+        self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false.
 
         modifiedChannel value:false.
         p addDependent:self.
@@ -1951,7 +2040,7 @@
 !
 
 saveAspectsIntoProject
-    |p|
+    |p s ns|
 
     p := self currentProject.
     p notNil ifTrue:[
@@ -1962,10 +2051,19 @@
         p repositoryModule:self repositoryModule value.
         p repositoryDirectory:self repositoryDirectory value.
 
+        s := self projectNamespace value.
+        (s size == 0) ifTrue:[
+            ns := Smalltalk
+        ] ifFalse:[
+            ns := Namespace name:s
+        ].
+        p defaultNameSpace:ns.
+
         p propertyAt:#deliverCompiledBinary put:self deliverCompiledBinary value.
         p propertyAt:#deliverSources put:self deliverSources value.
         p propertyAt:#deliverZipArchive put:self deliverZipArchive value.
         p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value.
+        p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value.
 
 "/        modifiedChannel value:false.
     ].
@@ -1977,6 +2075,9 @@
 updateRightCanvas
     |selectedNode nodeContents spec|
 
+    self selectedProjectInPrerequisites value:nil.
+    self selectedRequiredProjectInPrerequisites value:nil.
+
     selectedNode := self selectedTreeNode value.
     selectedNode isNil ifTrue:[
         self setupCanvasForNoSelection.
@@ -1984,7 +2085,7 @@
     ].
 
     (spec := selectedNode spec) notNil ifTrue:[
-        self currentCanvasHolder value:spec.
+        self currentCanvasHolder value:spec value.
         ^ self
     ].