Tools__ProjectBuilderAssistantApplication.st
changeset 2719 f85a3fdfeaac
parent 2709 1ef5151b111e
child 2720 99b643eb4ba9
--- a/Tools__ProjectBuilderAssistantApplication.st	Thu Nov 05 22:56:54 2009 +0100
+++ b/Tools__ProjectBuilderAssistantApplication.st	Fri Nov 06 00:19:21 2009 +0100
@@ -1211,8 +1211,13 @@
         ^ self
     ].
 
-    self withWaitCursorDo:[
-        Class packageQuerySignal answer:(selectedProjectDefinition package)
+    self withWaitCursorDo:[ 
+        |pkg|
+
+        pkg := selectedProjectDefinition notNil 
+                    ifTrue:[selectedProjectDefinition package]
+                    ifFalse:[newProjectsName value].
+        Class packageQuerySignal answer:pkg
         do:[
             newStartupClass := StandaloneStartup
                             subclass:newClassName asSymbol
@@ -2099,9 +2104,25 @@
 !
 
 updateListOfMatchingProjects
-    |matching projectType idx|
+    |query matching projectType idx|
 
     projectType := self projectType.
+    projectType == ProjectDefinition libraryType ifTrue:[
+        query := #isLibraryDefinition
+    ] ifFalse:[
+        projectType == ProjectDefinition guiApplicationType ifTrue:[
+            query := #isGUIApplication
+        ] ifFalse:[
+            projectType == ProjectDefinition nonGuiApplicationType ifTrue:[
+                query := #isConsoleApplication
+            ] ifFalse:[
+                self error.
+            ].
+        ].
+    ].
+
+    Class flushSubclassInfo.
+
     matching := ProjectDefinition allSubclasses
                     select:[:defClass |
                         |match|
@@ -2111,22 +2132,11 @@
                             (self hideSTXProjects value not
                             or:[ defClass package asPackageId module ~= 'stx' ])
                             ifTrue:[
-                                projectType == ProjectDefinition libraryType ifTrue:[
-                                    match := defClass isLibraryDefinition
-                                ] ifFalse:[
-                                    projectType == ProjectDefinition guiApplicationType ifTrue:[
-                                        match := defClass isGUIApplication
-                                    ] ifFalse:[
-                                        projectType == ProjectDefinition nonGuiApplicationType ifTrue:[
-                                            match := defClass isConsoleApplication
-                                        ] ifFalse:[
-                                            self error.
-                                        ].
-                                    ].
-                                ].
+                                match := defClass perform:query
                             ].
                         ].
                    ].
+
     matching sort:[:a :b | a name < b name].
     self listOfMatchingProjects value:matching.
     self listOfMatchingPackageIds value:(matching collect:[:def | def package]).