5 AssistantApplication subclass:#ProjectBuilderAssistantApplication |
5 AssistantApplication subclass:#ProjectBuilderAssistantApplication |
6 instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder |
6 instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder |
7 selectedProjectIndexHolder selectedProjectDefinition |
7 selectedProjectIndexHolder selectedProjectDefinition |
8 listOfMatchingProjects selectedProjectsComment |
8 listOfMatchingProjects selectedProjectsComment |
9 hasProjectSelectedHolder newProjectsName hideSTXProjects |
9 hasProjectSelectedHolder newProjectsName hideSTXProjects |
|
10 hideOtherApplicationClasses hideOtherStartupClasses |
10 startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
11 startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
11 newApplicationsName listOfApplicationsInProject |
12 newApplicationsName listOfApplicationsInProject |
12 selectedApplicationIndexHolder selectedApplication |
13 selectedApplicationIndexHolder selectedApplication |
13 hasApplicationSelectedHolder listOfStartupClassesInProject |
14 hasApplicationSelectedHolder listOfStartupClassesInProject |
14 selectedStartupClassIndexHolder selectedStartupClass |
15 selectedStartupClassIndexHolder selectedStartupClass |
388 component: |
389 component: |
389 (SpecCollection |
390 (SpecCollection |
390 collection: ( |
391 collection: ( |
391 (VariableHorizontalPanelSpec |
392 (VariableHorizontalPanelSpec |
392 name: 'VariableHorizontalPanel2' |
393 name: 'VariableHorizontalPanel2' |
393 layout: (LayoutFrame 0 0 4 0 0 1 0 1) |
394 layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
394 component: |
395 component: |
395 (SpecCollection |
396 (SpecCollection |
396 collection: ( |
397 collection: ( |
397 (SequenceViewSpec |
398 (SequenceViewSpec |
398 name: 'List2' |
399 name: 'List2' |
399 model: selectedApplicationIndexHolder |
400 model: selectedApplicationIndexHolder |
400 hasHorizontalScrollBar: true |
401 hasHorizontalScrollBar: true |
401 hasVerticalScrollBar: true |
402 hasVerticalScrollBar: true |
402 useIndex: true |
403 useIndex: true |
403 sequenceList: listOfApplicationsInProject |
404 sequenceList: listOfApplicationsInProject |
|
405 ignoreReselect: false |
404 ) |
406 ) |
405 (TextEditorSpec |
407 (TextEditorSpec |
406 name: 'TextEditor2' |
408 name: 'TextEditor2' |
407 model: selectedApplicationsComment |
409 model: selectedApplicationsComment |
408 hasHorizontalScrollBar: true |
410 hasHorizontalScrollBar: true |
1122 projectBuilder buildWithColorizedOutputTo:makeOutputWindow. |
1138 projectBuilder buildWithColorizedOutputTo:makeOutputWindow. |
1123 ]. |
1139 ]. |
1124 ! |
1140 ! |
1125 |
1141 |
1126 selectedApplicationChanged |
1142 selectedApplicationChanged |
1127 self selectedApplicationIndexHolder value isNil ifTrue:[ |
1143 |idx| |
|
1144 |
|
1145 ((idx := self selectedApplicationIndexHolder value) isNil |
|
1146 or:[idx == 0]) ifTrue:[ |
1128 selectedApplication := nil. |
1147 selectedApplication := nil. |
1129 ] ifFalse:[ |
1148 ] ifFalse:[ |
1130 selectedApplication := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
1149 selectedApplication := self listOfApplicationsInProject value at:idx. |
1131 ]. |
1150 ]. |
1132 self hasApplicationSelectedHolder value:(selectedApplication notNil). |
1151 self hasApplicationSelectedHolder value:(selectedApplication notNil). |
1133 |
1152 |
1134 "/ selectedApplication notNil ifTrue:[ |
1153 "/ selectedApplication notNil ifTrue:[ |
1135 "/ "/ generate startupClass code |
1154 "/ "/ generate startupClass code |
1231 |
1250 |
1232 hasStartupClassSelectedHolder isNil ifTrue:[ |
1251 hasStartupClassSelectedHolder isNil ifTrue:[ |
1233 hasStartupClassSelectedHolder := nil asValue. |
1252 hasStartupClassSelectedHolder := nil asValue. |
1234 ]. |
1253 ]. |
1235 ^ hasStartupClassSelectedHolder. |
1254 ^ hasStartupClassSelectedHolder. |
|
1255 ! |
|
1256 |
|
1257 hideOtherApplicationClasses |
|
1258 <resource: #uiAspect> |
|
1259 |
|
1260 hideOtherApplicationClasses isNil ifTrue:[ |
|
1261 hideOtherApplicationClasses := true asValue. |
|
1262 hideOtherApplicationClasses onChangeSend:#updateListOfApplicationsInProject to:self. |
|
1263 ]. |
|
1264 ^ hideOtherApplicationClasses. |
|
1265 ! |
|
1266 |
|
1267 hideOtherStartupClasses |
|
1268 <resource: #uiAspect> |
|
1269 |
|
1270 hideOtherStartupClasses isNil ifTrue:[ |
|
1271 hideOtherStartupClasses := true asValue. |
|
1272 hideOtherStartupClasses onChangeSend:#updateListOfStartupClassesInProject to:self. |
|
1273 ]. |
|
1274 ^ hideOtherStartupClasses. |
1236 ! |
1275 ! |
1237 |
1276 |
1238 hideSTXProjects |
1277 hideSTXProjects |
1239 <resource: #uiAspect> |
1278 <resource: #uiAspect> |
1240 |
1279 |
1591 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1630 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1592 canEnterQuerySelector: #canEnterApplicationSelection |
1631 canEnterQuerySelector: #canEnterApplicationSelection |
1593 enterCallbackSelector: updateListOfApplicationsInProject |
1632 enterCallbackSelector: updateListOfApplicationsInProject |
1594 infoText: 'Choose an existing application or create a new one. |
1633 infoText: 'Choose an existing application or create a new one. |
1595 These are subclasses of <I>ApplicationModel</I> and define |
1634 These are subclasses of <I>ApplicationModel</I> and define |
1596 the GUI and control flow inside the application.' |
1635 the GUI and control flow inside the application. |
|
1636 Can also be left blank if the startup class does it all (stx build).' |
1597 ) |
1637 ) |
1598 |
1638 |
1599 (AssistantPageSpec |
1639 (AssistantPageSpec |
1600 pageTitle: 'Startup Class Selection' |
1640 pageTitle: 'Startup Class Selection' |
1601 windowSpecSelector: page4_startupClassSelectionSpec |
1641 windowSpecSelector: page4_startupClassSelectionSpec |
1701 ]. |
1741 ]. |
1702 self selectedProjectsComment value:comment. |
1742 self selectedProjectsComment value:comment. |
1703 ! |
1743 ! |
1704 |
1744 |
1705 updateListOfApplicationsInProject |
1745 updateListOfApplicationsInProject |
1706 |oldList applicationClasses package startUpClassName startUpClass |
1746 |oldList applicationClasses package appClass appClassIndex| |
1707 appClass appClassIndex| |
|
1708 |
1747 |
1709 appClassIndex := nil. |
1748 appClassIndex := nil. |
1710 |
1749 |
1711 selectedProjectDefinition isNil ifTrue:[ |
1750 selectedProjectDefinition isNil ifTrue:[ |
1712 applicationClasses := #() |
1751 applicationClasses := #() |
1713 ] ifFalse:[ |
1752 ] ifFalse:[ |
1714 package := selectedProjectDefinition package. |
1753 package := selectedProjectDefinition package. |
1715 |
1754 |
1716 applicationClasses := Smalltalk allClasses |
1755 applicationClasses := Smalltalk allClasses |
1717 select:[:cls | |
1756 select:[:cls | |
1718 (cls package = package |
1757 ((cls isSubclassOf:ApplicationModel) |
1719 and:[ cls isSubclassOf:ApplicationModel ]) |
1758 and:[ self hideOtherApplicationClasses value not |
|
1759 or:[ cls package = package ]]) |
1720 ]. |
1760 ]. |
1721 applicationClasses := applicationClasses asOrderedCollection. |
1761 applicationClasses := applicationClasses asOrderedCollection. |
1722 applicationClasses sort:[:a :b | a name < b name]. |
1762 applicationClasses sort:[:a :b | a name < b name]. |
1723 |
1763 |
1724 "/ startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
1764 "/ startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
1797 ] ifFalse:[ |
1837 ] ifFalse:[ |
1798 package := selectedProjectDefinition package. |
1838 package := selectedProjectDefinition package. |
1799 |
1839 |
1800 startupClasses := Smalltalk allClasses |
1840 startupClasses := Smalltalk allClasses |
1801 select:[:cls | |
1841 select:[:cls | |
1802 (cls package = package |
1842 ((cls includesBehavior:StandaloneStartup) |
1803 and:[ cls isSubclassOf:StandaloneStartup ]) |
1843 and:[ self hideOtherStartupClasses value not |
|
1844 or:[ cls package = package ]]) |
1804 ]. |
1845 ]. |
1805 startupClasses := startupClasses asOrderedCollection. |
1846 startupClasses := startupClasses asOrderedCollection. |
1806 startupClasses sort:[:a :b | a name < b name]. |
1847 startupClasses sort:[:a :b | a name < b name]. |
1807 |
1848 |
1808 startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
1849 startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |