Tools__ProjectBuilderAssistantApplication.st
changeset 2719 f85a3fdfeaac
parent 2709 1ef5151b111e
child 2720 99b643eb4ba9
equal deleted inserted replaced
2718:5e6bbceb68c1 2719:f85a3fdfeaac
  1209     newClassName isEmptyOrNil ifTrue:[
  1209     newClassName isEmptyOrNil ifTrue:[
  1210         Dialog warn:'Please enter the name of the Startup-Class first.'.
  1210         Dialog warn:'Please enter the name of the Startup-Class first.'.
  1211         ^ self
  1211         ^ self
  1212     ].
  1212     ].
  1213 
  1213 
  1214     self withWaitCursorDo:[
  1214     self withWaitCursorDo:[ 
  1215         Class packageQuerySignal answer:(selectedProjectDefinition package)
  1215         |pkg|
       
  1216 
       
  1217         pkg := selectedProjectDefinition notNil 
       
  1218                     ifTrue:[selectedProjectDefinition package]
       
  1219                     ifFalse:[newProjectsName value].
       
  1220         Class packageQuerySignal answer:pkg
  1216         do:[
  1221         do:[
  1217             newStartupClass := StandaloneStartup
  1222             newStartupClass := StandaloneStartup
  1218                             subclass:newClassName asSymbol
  1223                             subclass:newClassName asSymbol
  1219                             instanceVariableNames:''
  1224                             instanceVariableNames:''
  1220                             classVariableNames:''
  1225                             classVariableNames:''
  2097 updateListOfClassesInProject
  2102 updateListOfClassesInProject
  2098     self listOfClassesInProject value:(selectedProjectDefinition classNames).
  2103     self listOfClassesInProject value:(selectedProjectDefinition classNames).
  2099 !
  2104 !
  2100 
  2105 
  2101 updateListOfMatchingProjects
  2106 updateListOfMatchingProjects
  2102     |matching projectType idx|
  2107     |query matching projectType idx|
  2103 
  2108 
  2104     projectType := self projectType.
  2109     projectType := self projectType.
       
  2110     projectType == ProjectDefinition libraryType ifTrue:[
       
  2111         query := #isLibraryDefinition
       
  2112     ] ifFalse:[
       
  2113         projectType == ProjectDefinition guiApplicationType ifTrue:[
       
  2114             query := #isGUIApplication
       
  2115         ] ifFalse:[
       
  2116             projectType == ProjectDefinition nonGuiApplicationType ifTrue:[
       
  2117                 query := #isConsoleApplication
       
  2118             ] ifFalse:[
       
  2119                 self error.
       
  2120             ].
       
  2121         ].
       
  2122     ].
       
  2123 
       
  2124     Class flushSubclassInfo.
       
  2125 
  2105     matching := ProjectDefinition allSubclasses
  2126     matching := ProjectDefinition allSubclasses
  2106                     select:[:defClass |
  2127                     select:[:defClass |
  2107                         |match|
  2128                         |match|
  2108 
  2129 
  2109                         match := false.
  2130                         match := false.
  2110                         defClass isAbstract ifFalse:[
  2131                         defClass isAbstract ifFalse:[
  2111                             (self hideSTXProjects value not
  2132                             (self hideSTXProjects value not
  2112                             or:[ defClass package asPackageId module ~= 'stx' ])
  2133                             or:[ defClass package asPackageId module ~= 'stx' ])
  2113                             ifTrue:[
  2134                             ifTrue:[
  2114                                 projectType == ProjectDefinition libraryType ifTrue:[
  2135                                 match := defClass perform:query
  2115                                     match := defClass isLibraryDefinition
       
  2116                                 ] ifFalse:[
       
  2117                                     projectType == ProjectDefinition guiApplicationType ifTrue:[
       
  2118                                         match := defClass isGUIApplication
       
  2119                                     ] ifFalse:[
       
  2120                                         projectType == ProjectDefinition nonGuiApplicationType ifTrue:[
       
  2121                                             match := defClass isConsoleApplication
       
  2122                                         ] ifFalse:[
       
  2123                                             self error.
       
  2124                                         ].
       
  2125                                     ].
       
  2126                                 ].
       
  2127                             ].
  2136                             ].
  2128                         ].
  2137                         ].
  2129                    ].
  2138                    ].
       
  2139 
  2130     matching sort:[:a :b | a name < b name].
  2140     matching sort:[:a :b | a name < b name].
  2131     self listOfMatchingProjects value:matching.
  2141     self listOfMatchingProjects value:matching.
  2132     self listOfMatchingPackageIds value:(matching collect:[:def | def package]).
  2142     self listOfMatchingPackageIds value:(matching collect:[:def | def package]).
  2133 
  2143 
  2134     idx := matching indexOf:selectedProjectDefinition.
  2144     idx := matching indexOf:selectedProjectDefinition.