author | Claus Gittinger <cg@exept.de> |
Thu, 04 Feb 2010 11:18:16 +0100 | |
changeset 2757 | 6c83d6b487b2 |
parent 2756 | c3b2615d734d |
child 2825 | 49853e842335 |
permissions | -rw-r--r-- |
2742 | 1 |
" |
2 |
COPYRIGHT (c) 2009 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2636 | 12 |
"{ Package: 'stx:libtool2' }" |
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
AssistantApplication subclass:#ProjectBuilderAssistantApplication |
|
2687
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
17 |
instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
18 |
selectedProjectIndexHolder selectedProjectDefinition |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
19 |
listOfMatchingProjects listOfMatchingPackageIds |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
20 |
selectedProjectsComment hasProjectSelectedHolder newProjectsName |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
21 |
hideSTXProjects hideOtherApplicationClasses |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
22 |
hideOtherStartupClasses startMakeButtonEnabled |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
23 |
stopMakeButtonVisible makeOutputHolder newApplicationsName |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
24 |
listOfApplicationsInProject selectedApplicationIndexHolder |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
25 |
selectedApplication hasApplicationSelectedHolder |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
26 |
listOfStartupClassesInProject selectedStartupClassIndexHolder |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
27 |
selectedStartupClass hasStartupClassSelectedHolder |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
28 |
selectedApplicationsComment buildDirectoryHolder makeProcess |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
29 |
listOfClassesInProject makeOutputWindow projectBuilder |
2705 | 30 |
newStartupClassName usedCompilerHolder listOfNewProjectsName |
2724 | 31 |
newProjectsNameListExtendedComboBox productNameHolder |
32 |
companyNameHolder compilerWarnMessageHolder |
|
33 |
compilerWarnMessageVisibleHolder' |
|
2687
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
34 |
classVariableNames:'' |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
35 |
poolDictionaries:'' |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
36 |
category:'System-Support-Projects' |
2636 | 37 |
! |
38 |
||
2668 | 39 |
!ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
40 |
||
2742 | 41 |
copyright |
42 |
" |
|
43 |
COPYRIGHT (c) 2009 by eXept Software AG |
|
44 |
All Rights Reserved |
|
45 |
||
46 |
This software is furnished under a license and may be used |
|
47 |
only in accordance with the terms of that license and with the |
|
48 |
inclusion of the above copyright notice. This software may not |
|
49 |
be provided or otherwise made available to, or used by, any |
|
50 |
other person. No title to or ownership of the software is |
|
51 |
hereby transferred. |
|
52 |
" |
|
53 |
! |
|
54 |
||
2668 | 55 |
documentation |
56 |
" |
|
57 |
a user friendly interface to the build process. |
|
58 |
Simply wraps up existing tools like the CodeGeneratorTool, the browsers |
|
59 |
and the ProjetBuilder |
|
60 |
||
61 |
[see also:] |
|
62 |
CodeGeneratorTool |
|
63 |
ProjectBuilder |
|
64 |
ProjectDefinition |
|
65 |
||
66 |
[author:] |
|
67 |
Claus Gittinger |
|
68 |
" |
|
2721 | 69 |
! |
70 |
||
71 |
help |
|
72 |
||
73 |
"/ Packager - A Standalone-Executable Builder and Packager |
|
74 |
"/ This assistant-application allows for standalone applications to be built very easily. It will generate all required classes, files, start the compilation process, generate a self-installable executable with a few mouse clicks. A simple demo application like the famous "Hello World" can be generated in a few minutes. |
|
75 |
"/ Prerequisites |
|
76 |
"/ Windows Users: |
|
77 |
"/ Please install either the "Borland Free Commandline Compiler Tools (bcc32)" or the "Microsoft Visual-C++" package (also free). In addition, the "NullSoft NSIS-Installer Package" is required. |
|
78 |
"/ |
|
79 |
"/ Due to limitations and bugs in the Visual-C++ compiler (limit on the size of string-constants), some Smalltalk code is still not compilable (classes which contain image-resource methods for big images). Although microsoft is doing their best (a relative measure) to make things better (they increase the string-limit with every new release), they still seem to be undable to figure out how ti use malloc for string-data). We are patiently waiting for a real fix and still using bcc in the meanwhile. Therefore, we still recommend using the borland compiler suite. Please install it at its standard location ("C:\Borland") as our makefiles might still contain hard-coded pathes (yes, we are ashamed about this). |
|
80 |
"/ Unix Users: |
|
81 |
"/ You should already have the gcc compile suite (including all required header files) installed and ready to use. For a lack of time on our side, there is currently no self-installer support for Unix. The packager will generate a zipped tar file, which must be deployed and unpacked for use. This may change in the near future. |
|
82 |
"/ Packages, Projects, PackageIDs and ProjectDefinitions |
|
83 |
"/ Smalltalk basically uses two objects for packaging: |
|
84 |
"/ |
|
85 |
"/ * PackageIDs (also called ProjectID's occasionally) |
|
86 |
"/ * ProjectDefinitions |
|
87 |
"/ |
|
88 |
"/ Older ST/X versions used instances of a Project class - this is now obsolete and removed from the system (although there are still some minor uses of it, which might remain there for backward compatibility for some time, as some customers have built their own packaging scheme around it). |
|
89 |
"/ |
|
90 |
"/ PackageIDs |
|
91 |
"/ These are simple symbols and are attached to classes and methods. If a method has a packageID different from its class, it is called an extension method. |
|
92 |
"/ PackageIDs must have a certain fixed format: they always contain exactly two parts, which are separated by a colon character: the module and the directory part. The module is used as main-selector on where and how the source code repository is accessed. The directory is a path below that repository. If checked out into the local filesystem, the module defines the top-level directory. Thus, if a packageID is "stx:libbasic", the corresponding sources will be found in the repository associated to the "stx" module, under the directory "libbasic". In the local file system, it will be found under "stx/libbasic". As another example, if the packageID is "exept:expecco/plugins/foo", the repository is whichever is associated with the "exept" module, and the subdirectory is "expecco/plugins/foo". The local path to the sourcefiles would be "exept/expecco/plugins/foo". |
|
93 |
"/ Please notice that it does make sense to associate different repositories to different modules: for example, you could setup the sourceCodeManager to use CVS access to the exept repository for everything under the "stx" module, and at the same time, use a local SVN repository for everything under the "myCompany" module. |
|
94 |
"/ ProjectDefinitions |
|
95 |
"/ These describe the contents of a project, such as the classes to include, the set of extension methods, any additional compilation information. ProjectDefinitions come in 3 flavours: |
|
96 |
"/ |
|
97 |
"/ * GUI Application Definition |
|
98 |
"/ * non-GUI Application Definition |
|
99 |
"/ * ClassLibrary Definition |
|
100 |
"/ |
|
101 |
"/ ProjectDefinitions are stored and managed as class-instances, located as subclasses of one of ApplicationDefinition or LibraryDefinition. As classes, they are themself managed, compiled and packaged as part of the project (and also have the same PackageID as their components). They are also treated like any other class w.r.t. source code management. |
|
102 |
"/ Packaging |
|
103 |
"/ All classes and extension methods belonging to a single package are supposed to be loaded (and possibly unloaded) together. They are also usually deployed inside a single dynamic link library ("dll", for short). In the Unix world, these are called "shared object" or "so". Finally, they are stored in a common directory both on the local file system and in a source code repository (CVS, SVN, etc.). |
|
104 |
"/ Structure of a Project |
|
105 |
"/ The artefacts as manipulated by the packager are: |
|
106 |
"/ |
|
107 |
"/ * the ProjectDefinition class |
|
108 |
"/ This defines the type of application (GUI / non-GUI), its contents (i.e. the set of classes to be included in the binary itself and the set of library-dll's to be included in the deployed package), and some other metadata, such as icon, title etc. |
|
109 |
"/ |
|
110 |
"/ * the ApplicationModel class |
|
111 |
"/ This defines the GUI, and is typically created using the UI-Painter. |
|
112 |
"/ |
|
113 |
"/ * the Startup class |
|
114 |
"/ This is the first class which gets control when the executable is started; it can analyze the command line arguments, read patches or updates, start background ptocesses, and will eventually open the applications GUI. |
|
115 |
"/ |
|
116 |
"/ Build Procedure |
|
117 |
"/ All of the three components above can be generated by the packager to provide an initial framework for further work. |
|
118 |
"/ |
|
119 |
"/ After the definition of those classes, all required files are stored in a temporary build directory. This means that the above classes are filed out, and make- and other support files are generated. |
|
120 |
"/ |
|
121 |
"/ Finally, the actual build process is started. This requires an external C-compiler. Under windows, both Borland-C (free download available via the internet) and Microsoft's Visual-C++ (also available for free) can be used. |
|
122 |
"/ |
|
123 |
"/ A self-installing executable is built using the NullSoft NSIS package. This is also required to be installed before the packager is started. |
|
124 |
"/ |
|
125 |
"/ After the build, all required files are packaged in a single install-file. This is called "MyApplicationSetup.exe" and found in the project-specific subdirectory of the build directory. For deployment, this single file has to be delivered to a customer and executed there. |
|
126 |
"/ |
|
127 |
"/ Summary: It has NEVER been easier to create a GUI application. |
|
2668 | 128 |
! ! |
2636 | 129 |
|
2703 | 130 |
!ProjectBuilderAssistantApplication class methodsFor:'assistant pages spec'! |
131 |
||
132 |
assistantSpec |
|
133 |
^ #(Array |
|
134 |
( AssistantPageSpec |
|
135 |
pageTitle: 'Project Type Selection' |
|
136 |
windowSpecSelector: page1_projectTypeSelectionSpec |
|
137 |
enterCallbackSelector: updateListOfMatchingProjects |
|
138 |
infoText: 'Choose the <B>type</B> of project you are about to build.' |
|
139 |
) |
|
140 |
||
141 |
(AssistantPageSpec |
|
142 |
pageTitle: 'ProjectDefinition Selection' |
|
143 |
windowSpecSelector: page2_projectSelectionSpec |
|
144 |
enterCallbackSelector: updateListOfMatchingProjects |
|
145 |
infoText: 'Choose an existing project definition or create a new one. |
|
146 |
These are subclasses of <I>ProjectDefinition</I> and define the |
|
147 |
type and contents of a project.' |
|
148 |
) |
|
149 |
||
150 |
(AssistantPageSpec |
|
151 |
pageTitle: 'Startup Application Selection' |
|
152 |
windowSpecSelector: page3_applicationSelectionSpec |
|
153 |
isEnabledQuerySelector: #projectTypeIsGuiApplication |
|
154 |
canEnterQuerySelector: #canEnterApplicationSelection |
|
155 |
enterCallbackSelector: updateListOfApplicationsInProject |
|
156 |
infoText: 'Choose an existing application or create a new one. |
|
157 |
These are subclasses of <I>ApplicationModel</I> and define |
|
158 |
the GUI and control flow inside the application. |
|
159 |
Can also be left blank if the startup class does it all (stx build).' |
|
160 |
) |
|
161 |
||
162 |
(AssistantPageSpec |
|
163 |
pageTitle: 'Startup Class Selection' |
|
164 |
windowSpecSelector: page4_startupClassSelectionSpec |
|
165 |
isEnabledQuerySelector: #projectTypeIsNotLibrary |
|
166 |
canEnterQuerySelector: #canEnterStartupClassSelection |
|
167 |
enterCallbackSelector: updateListOfStartupClassesInProject |
|
168 |
infoText: 'Choose an existing startup-class or create a new one. |
|
169 |
These are subclasses of <I>StandaloneStartup</I> and |
|
170 |
start the application. Command line arguments can be |
|
171 |
interpreted there.' |
|
172 |
) |
|
173 |
||
174 |
(AssistantPageSpec |
|
175 |
pageTitle: 'Specify Contents' |
|
176 |
windowSpecSelector: page5_specifyIncludedClasses |
|
177 |
enterCallbackSelector: enterContentsSpecification |
|
178 |
canEnterQuerySelector: #canEnterContentsSelection |
|
179 |
infoText: 'Define which (other) classes are to be included. |
|
180 |
Press "<I>Scan</I>" to include all classes of the package; |
|
181 |
browse to edit the contents manually.' |
|
182 |
) |
|
183 |
||
184 |
(AssistantPageSpec |
|
2724 | 185 |
pageTitle: 'Specify Project Attributes' |
186 |
windowSpecSelector: page6a_specifyProjectAttributes |
|
187 |
infoText: 'Define additional attributes.' |
|
188 |
enterCallbackSelector: updateProjectAttributes |
|
189 |
leaveCallbackSelector: #rememberProjectAttributes |
|
190 |
) |
|
191 |
||
192 |
(AssistantPageSpec |
|
2703 | 193 |
pageTitle: 'Specify Build Directory' |
2724 | 194 |
windowSpecSelector: page6b_specifyBuildDirectorySpec |
2703 | 195 |
infoText: 'Define where the build-process is to be performed. |
196 |
All generated files are created below that directory. |
|
197 |
After deployment, the build directory is no longer needed |
|
198 |
(but you can keep it for a faster compile the next time).' |
|
2724 | 199 |
|
200 |
enterCallbackSelector: #checkCompilerAvailability |
|
2703 | 201 |
) |
202 |
||
203 |
(AssistantPageSpec |
|
204 |
pageTitle: 'Build' |
|
205 |
windowSpecSelector: page7_buildSpec |
|
206 |
canEnterQuerySelector: #canEnterBuild |
|
207 |
enterCallbackSelector: #restoreMakeOutputsContents |
|
208 |
leaveCallbackSelector: #rememberMakeOutputsContents |
|
209 |
infoText: 'Start the build-process. This will run make/bcc to compile |
|
210 |
all required classes and nsis to generate a self-installable |
|
211 |
executable. You must have the borland-cc and NullSoft NSIS |
|
212 |
packages installed for this to work.' |
|
213 |
) |
|
214 |
||
215 |
(AssistantPageSpec |
|
216 |
pageTitle: 'Deploy' |
|
217 |
windowSpecSelector: page8_deploySpec |
|
218 |
canEnterQuerySelector: #canEnterDeploy |
|
219 |
infoText: 'Find the installer to be deployed (or test-run the binary). |
|
220 |
You can open a WindowsExplorer there to copy the files for |
|
221 |
deployment. After that, the build directory is no longer needed |
|
222 |
(but you can keep it for a faster compile the next time).' |
|
223 |
) |
|
224 |
) decodeAsLiteralArray. |
|
225 |
! ! |
|
226 |
||
2670 | 227 |
!ProjectBuilderAssistantApplication class methodsFor:'defaults'! |
228 |
||
229 |
defaultIcon |
|
230 |
^ ToolbarIconLibrary projectBuilderIcon |
|
231 |
! |
|
232 |
||
233 |
windowLabelTemplate |
|
234 |
^ 'ST/X Packager: %1' |
|
235 |
! ! |
|
236 |
||
2703 | 237 |
!ProjectBuilderAssistantApplication class methodsFor:'help'! |
238 |
||
239 |
flyByHelpSpec |
|
240 |
<resource: #help> |
|
241 |
||
242 |
^ super flyByHelpSpec addPairsFrom:#( |
|
243 |
||
2706 | 244 |
#'projectType' |
245 |
'Choose the type of Project you are about to deploy.' |
|
246 |
||
247 |
#existingProjects |
|
248 |
'Projects with an existing ProjectDefinition of the chosen type (above).' |
|
2703 | 249 |
|
2706 | 250 |
#browseSelectedProject |
251 |
'Open a SystemBrowser on the selected Project.' |
|
252 |
||
253 |
#hideSTXBasePackages |
|
254 |
'Only show packages which are not already included in the basic ST/X delivery.' |
|
2703 | 255 |
|
256 |
#'listOfNewProjectsName' |
|
2706 | 257 |
'PackageID (module:directory). |
258 |
The pull-down list contains packageIDs for which no ProjectDefinition exists (yet).' |
|
259 |
||
260 |
#'createNewProject' |
|
261 |
'PackageID (module:directory). |
|
262 |
Click to create a new (empty) ProjectDefinition for the given PackageID.' |
|
2703 | 263 |
|
264 |
) |
|
265 |
! ! |
|
266 |
||
2636 | 267 |
!ProjectBuilderAssistantApplication class methodsFor:'interface specs'! |
268 |
||
2645 | 269 |
page1_projectTypeSelectionSpec |
2636 | 270 |
"This resource specification was automatically generated |
271 |
by the UIPainter of ST/X." |
|
272 |
||
273 |
"Do not manually edit this!! If it is corrupted, |
|
274 |
the UIPainter may not be able to read the specification." |
|
275 |
||
276 |
" |
|
2648 | 277 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page1_projectTypeSelectionSpec |
278 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page1_projectTypeSelectionSpec |
|
2636 | 279 |
" |
280 |
||
281 |
<resource: #canvas> |
|
282 |
||
283 |
^ |
|
284 |
#(FullSpec |
|
2645 | 285 |
name: #'page1_projectTypeSelectionSpec' |
2636 | 286 |
window: |
287 |
(WindowSpec |
|
288 |
label: 'Project Selection' |
|
289 |
name: 'Project Selection' |
|
290 |
min: (Point 0 0) |
|
291 |
bounds: (Rectangle 0 0 626 394) |
|
292 |
) |
|
293 |
component: |
|
294 |
(SpecCollection |
|
295 |
collection: ( |
|
296 |
(FramedBoxSpec |
|
2706 | 297 |
label: 'Project Type' |
2636 | 298 |
name: 'FramedBox1' |
2698
64d179f1eae7
changed: #page1_projectTypeSelectionSpec
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
299 |
layout: (LayoutFrame 0 0.0 0 0 4 1.0 120 0) |
2706 | 300 |
activeHelpKey: projectType |
2636 | 301 |
labelPosition: topLeft |
302 |
translateLabel: true |
|
303 |
component: |
|
304 |
(SpecCollection |
|
305 |
collection: ( |
|
306 |
(VerticalPanelViewSpec |
|
307 |
name: 'VerticalPanel1' |
|
308 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
309 |
horizontalLayout: leftSpace |
|
310 |
verticalLayout: topSpace |
|
311 |
horizontalSpace: 3 |
|
312 |
verticalSpace: 3 |
|
313 |
component: |
|
314 |
(SpecCollection |
|
315 |
collection: ( |
|
316 |
(ViewSpec |
|
317 |
name: 'Box1' |
|
318 |
extent: (Point 10 10) |
|
319 |
) |
|
320 |
(RadioButtonSpec |
|
321 |
label: 'GUI Application' |
|
322 |
name: 'RadioButton1' |
|
323 |
translateLabel: true |
|
2659 | 324 |
model: projectTypeHolder |
2636 | 325 |
isTriggerOnDown: true |
326 |
onCallBackSelector: projectTypeChanged |
|
327 |
select: guiApplicationType |
|
328 |
extent: (Point 136 22) |
|
329 |
) |
|
330 |
(RadioButtonSpec |
|
331 |
label: 'Non-GUI Application' |
|
332 |
name: 'RadioButton2' |
|
333 |
translateLabel: true |
|
2659 | 334 |
model: projectTypeHolder |
2636 | 335 |
isTriggerOnDown: true |
336 |
onCallBackSelector: projectTypeChanged |
|
337 |
select: nonGuiApplicationType |
|
338 |
extent: (Point 136 22) |
|
339 |
) |
|
340 |
(RadioButtonSpec |
|
341 |
label: 'Class Library' |
|
342 |
name: 'RadioButton3' |
|
343 |
translateLabel: true |
|
2659 | 344 |
model: projectTypeHolder |
2636 | 345 |
isTriggerOnDown: true |
346 |
onCallBackSelector: projectTypeChanged |
|
347 |
select: libraryType |
|
348 |
extent: (Point 136 22) |
|
349 |
) |
|
350 |
) |
|
351 |
||
352 |
) |
|
353 |
) |
|
354 |
) |
|
355 |
||
356 |
) |
|
357 |
) |
|
358 |
(FramedBoxSpec |
|
2726
7263301b5216
changed: #page1_projectTypeSelectionSpec
Claus Gittinger <cg@exept.de>
parents:
2725
diff
changeset
|
359 |
label: 'Existing Projects of this Type (PackageIDs)' |
2636 | 360 |
name: 'FramedBox2' |
2698
64d179f1eae7
changed: #page1_projectTypeSelectionSpec
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
361 |
layout: (LayoutFrame 0 0.0 123 0 4 1.0 0 1) |
2706 | 362 |
activeHelpKey: existingProjects |
2636 | 363 |
labelPosition: topLeft |
364 |
translateLabel: true |
|
365 |
component: |
|
366 |
(SpecCollection |
|
367 |
collection: ( |
|
368 |
(VariableHorizontalPanelSpec |
|
369 |
name: 'VariableHorizontalPanel1' |
|
370 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
371 |
component: |
|
372 |
(SpecCollection |
|
373 |
collection: ( |
|
374 |
(SequenceViewSpec |
|
375 |
name: 'List1' |
|
376 |
model: selectedProjectIndexHolder |
|
377 |
hasHorizontalScrollBar: true |
|
378 |
hasVerticalScrollBar: true |
|
379 |
useIndex: true |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
380 |
sequenceList: listOfMatchingPackageIds |
2636 | 381 |
) |
382 |
(TextEditorSpec |
|
383 |
name: 'TextEditor1' |
|
384 |
model: selectedProjectsComment |
|
385 |
hasHorizontalScrollBar: true |
|
386 |
hasVerticalScrollBar: true |
|
387 |
isReadOnly: true |
|
388 |
hasKeyboardFocusInitially: false |
|
389 |
) |
|
390 |
) |
|
391 |
||
392 |
) |
|
393 |
handles: (Any 0.34560327198364 1.0) |
|
394 |
) |
|
395 |
(CheckBoxSpec |
|
396 |
label: 'Hide ST/X Base Packages' |
|
397 |
name: 'CheckBox1' |
|
2659 | 398 |
layout: (LayoutFrame -1 0 -18 1 0 1 4 1) |
2706 | 399 |
activeHelpKey: hideSTXBasePackages |
2636 | 400 |
model: hideSTXProjects |
401 |
translateLabel: true |
|
402 |
) |
|
403 |
) |
|
404 |
||
405 |
) |
|
406 |
) |
|
407 |
) |
|
408 |
||
409 |
) |
|
410 |
) |
|
411 |
! |
|
412 |
||
2645 | 413 |
page2_projectSelectionSpec |
2636 | 414 |
"This resource specification was automatically generated |
415 |
by the UIPainter of ST/X." |
|
416 |
||
417 |
"Do not manually edit this!! If it is corrupted, |
|
418 |
the UIPainter may not be able to read the specification." |
|
419 |
||
420 |
" |
|
2648 | 421 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page2_projectSelectionSpec |
422 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page2_projectSelectionSpec |
|
2636 | 423 |
" |
424 |
||
425 |
<resource: #canvas> |
|
426 |
||
427 |
^ |
|
428 |
#(FullSpec |
|
2645 | 429 |
name: #'page2_projectSelectionSpec' |
2636 | 430 |
window: |
431 |
(WindowSpec |
|
432 |
label: 'Project Selection' |
|
433 |
name: 'Project Selection' |
|
434 |
min: (Point 0 0) |
|
435 |
bounds: (Rectangle 0 0 521 453) |
|
436 |
) |
|
437 |
component: |
|
438 |
(SpecCollection |
|
439 |
collection: ( |
|
440 |
(FramedBoxSpec |
|
2706 | 441 |
label: 'New Project''s PackageID' |
2636 | 442 |
name: 'FramedBox3' |
443 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0) |
|
444 |
labelPosition: topLeft |
|
445 |
translateLabel: true |
|
446 |
component: |
|
447 |
(SpecCollection |
|
448 |
collection: ( |
|
2706 | 449 |
(ExtendedComboBoxSpec |
450 |
name: 'NewProjectsNameListExtendedComboBox' |
|
451 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
|
452 |
model: newProjectsName |
|
453 |
readOnly: false |
|
454 |
miniScrollerHorizontal: true |
|
455 |
postBuildCallback: postBuildNewProjectsNameListExtendedComboBox: |
|
456 |
activeHelpKey: listOfNewProjectsName |
|
457 |
) |
|
2636 | 458 |
(ActionButtonSpec |
459 |
label: 'Create' |
|
460 |
name: 'Button1' |
|
2659 | 461 |
layout: (LayoutFrame -100 1 6 0 2 1 28 0) |
2636 | 462 |
translateLabel: true |
463 |
model: createNewProject |
|
2703 | 464 |
activeHelpKey: createNewProject |
2706 | 465 |
|
2636 | 466 |
) |
2706 | 467 |
|
2636 | 468 |
) |
469 |
||
470 |
) |
|
471 |
) |
|
472 |
(FramedBoxSpec |
|
2706 | 473 |
label: 'Existing Projects with ProjectDefinition' |
2636 | 474 |
name: 'FramedBox4' |
2648 | 475 |
layout: (LayoutFrame 0 0.0 70 0 4 1.0 -30 1) |
2636 | 476 |
labelPosition: topLeft |
477 |
translateLabel: true |
|
478 |
component: |
|
479 |
(SpecCollection |
|
480 |
collection: ( |
|
481 |
(VariableHorizontalPanelSpec |
|
482 |
name: 'VariableHorizontalPanel2' |
|
483 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
484 |
component: |
|
485 |
(SpecCollection |
|
486 |
collection: ( |
|
487 |
(SequenceViewSpec |
|
488 |
name: 'List2' |
|
489 |
model: selectedProjectIndexHolder |
|
490 |
hasHorizontalScrollBar: true |
|
491 |
hasVerticalScrollBar: true |
|
492 |
useIndex: true |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
493 |
sequenceList: listOfMatchingPackageIds |
2636 | 494 |
) |
495 |
(TextEditorSpec |
|
496 |
name: 'TextEditor2' |
|
497 |
model: selectedProjectsComment |
|
498 |
hasHorizontalScrollBar: true |
|
499 |
hasVerticalScrollBar: true |
|
500 |
isReadOnly: true |
|
501 |
hasKeyboardFocusInitially: false |
|
502 |
viewClassName: 'TextView' |
|
503 |
) |
|
504 |
) |
|
505 |
||
506 |
) |
|
507 |
handles: (Any 0.34560327198364 1.0) |
|
508 |
) |
|
509 |
(CheckBoxSpec |
|
510 |
label: 'Hide ST/X Base Packages' |
|
511 |
name: 'CheckBox1' |
|
2659 | 512 |
layout: (LayoutFrame -1 0 -17 1 0 1 5 1) |
2636 | 513 |
model: hideSTXProjects |
514 |
translateLabel: true |
|
2706 | 515 |
activeHelpKey: hideSTXBasePackages |
2636 | 516 |
) |
517 |
) |
|
518 |
||
519 |
) |
|
520 |
) |
|
2648 | 521 |
(HorizontalPanelViewSpec |
522 |
name: 'HorizontalPanel1' |
|
523 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
524 |
horizontalLayout: leftSpace |
|
525 |
verticalLayout: center |
|
526 |
horizontalSpace: 3 |
|
527 |
verticalSpace: 3 |
|
528 |
component: |
|
529 |
(SpecCollection |
|
530 |
collection: ( |
|
531 |
(ActionButtonSpec |
|
532 |
label: 'Browse Selected Project' |
|
533 |
name: 'Button3' |
|
534 |
translateLabel: true |
|
535 |
model: doBrowseProject |
|
2659 | 536 |
enableChannel: hasProjectSelectedHolder |
2648 | 537 |
extent: (Point 180 22) |
2706 | 538 |
activeHelpKey: browseSelectedProject |
2648 | 539 |
) |
540 |
) |
|
541 |
||
542 |
) |
|
2636 | 543 |
) |
544 |
) |
|
545 |
||
546 |
) |
|
547 |
) |
|
548 |
! |
|
549 |
||
2645 | 550 |
page3_applicationSelectionSpec |
2636 | 551 |
"This resource specification was automatically generated |
552 |
by the UIPainter of ST/X." |
|
553 |
||
554 |
"Do not manually edit this!! If it is corrupted, |
|
555 |
the UIPainter may not be able to read the specification." |
|
556 |
||
557 |
" |
|
2648 | 558 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page3_applicationSelectionSpec |
559 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page3_applicationSelectionSpec |
|
2636 | 560 |
" |
561 |
||
562 |
<resource: #canvas> |
|
563 |
||
564 |
^ |
|
565 |
#(FullSpec |
|
2645 | 566 |
name: #'page3_applicationSelectionSpec' |
2636 | 567 |
window: |
568 |
(WindowSpec |
|
569 |
label: 'Application Selection' |
|
570 |
name: 'Application Selection' |
|
571 |
min: (Point 0 0) |
|
2671 | 572 |
bounds: (Rectangle 0 0 519 406) |
2636 | 573 |
) |
574 |
component: |
|
575 |
(SpecCollection |
|
576 |
collection: ( |
|
577 |
(FramedBoxSpec |
|
2725 | 578 |
label: 'New Application Class' |
2636 | 579 |
name: 'FramedBox3' |
2725 | 580 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 70 0) |
2636 | 581 |
labelPosition: topLeft |
582 |
translateLabel: true |
|
583 |
component: |
|
584 |
(SpecCollection |
|
585 |
collection: ( |
|
586 |
(InputFieldSpec |
|
587 |
name: 'EntryField1' |
|
2659 | 588 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
2636 | 589 |
model: newApplicationsName |
590 |
acceptOnReturn: true |
|
591 |
acceptOnTab: true |
|
2693 | 592 |
acceptOnLostFocus: true |
2636 | 593 |
acceptOnPointerLeave: true |
594 |
emptyFieldReplacementText: 'MyApplication' |
|
595 |
) |
|
596 |
(ActionButtonSpec |
|
597 |
label: 'Create' |
|
598 |
name: 'Button1' |
|
2659 | 599 |
layout: (LayoutFrame -100 1 6 0 1 1 28 0) |
2636 | 600 |
translateLabel: true |
601 |
model: createNewApplication |
|
602 |
) |
|
603 |
) |
|
604 |
||
605 |
) |
|
606 |
) |
|
607 |
(FramedBoxSpec |
|
608 |
label: 'Existing Applications' |
|
609 |
name: 'FramedBox4' |
|
2725 | 610 |
layout: (LayoutFrame 0 0.0 72 0 4 1.0 -30 1) |
2636 | 611 |
labelPosition: topLeft |
612 |
translateLabel: true |
|
613 |
component: |
|
614 |
(SpecCollection |
|
615 |
collection: ( |
|
616 |
(VariableHorizontalPanelSpec |
|
617 |
name: 'VariableHorizontalPanel2' |
|
2671 | 618 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
2636 | 619 |
component: |
620 |
(SpecCollection |
|
621 |
collection: ( |
|
622 |
(SequenceViewSpec |
|
623 |
name: 'List2' |
|
624 |
model: selectedApplicationIndexHolder |
|
625 |
hasHorizontalScrollBar: true |
|
626 |
hasVerticalScrollBar: true |
|
627 |
useIndex: true |
|
628 |
sequenceList: listOfApplicationsInProject |
|
2671 | 629 |
ignoreReselect: false |
2636 | 630 |
) |
631 |
(TextEditorSpec |
|
632 |
name: 'TextEditor2' |
|
633 |
model: selectedApplicationsComment |
|
634 |
hasHorizontalScrollBar: true |
|
635 |
hasVerticalScrollBar: true |
|
636 |
isReadOnly: true |
|
637 |
hasKeyboardFocusInitially: false |
|
638 |
viewClassName: 'TextView' |
|
639 |
) |
|
640 |
) |
|
641 |
||
642 |
) |
|
643 |
handles: (Any 0.34560327198364 1.0) |
|
644 |
) |
|
2671 | 645 |
(CheckBoxSpec |
646 |
label: 'Hide other Application Classes' |
|
647 |
name: 'CheckBox1' |
|
648 |
layout: (LayoutFrame -1 0 -18 1 0 1 4 1) |
|
649 |
model: hideOtherApplicationClasses |
|
650 |
translateLabel: true |
|
651 |
) |
|
2636 | 652 |
) |
653 |
||
654 |
) |
|
655 |
) |
|
2648 | 656 |
(HorizontalPanelViewSpec |
657 |
name: 'HorizontalPanel1' |
|
658 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
659 |
horizontalLayout: leftSpace |
|
660 |
verticalLayout: center |
|
661 |
horizontalSpace: 3 |
|
662 |
verticalSpace: 3 |
|
663 |
component: |
|
664 |
(SpecCollection |
|
665 |
collection: ( |
|
666 |
(ActionButtonSpec |
|
667 |
label: 'Browse Selected Application' |
|
668 |
name: 'Button3' |
|
669 |
translateLabel: true |
|
670 |
model: doBrowseApplication |
|
2659 | 671 |
enableChannel: hasApplicationSelectedHolder |
672 |
extent: (Point 180 22) |
|
673 |
) |
|
674 |
(ActionButtonSpec |
|
675 |
label: 'Launch Selected Application' |
|
676 |
name: 'Button4' |
|
677 |
translateLabel: true |
|
678 |
model: doLaunchApplication |
|
679 |
enableChannel: hasApplicationSelectedHolder |
|
2648 | 680 |
extent: (Point 180 22) |
681 |
) |
|
682 |
) |
|
683 |
||
684 |
) |
|
2636 | 685 |
) |
686 |
) |
|
687 |
||
688 |
) |
|
689 |
) |
|
690 |
! |
|
691 |
||
2656 | 692 |
page4_startupClassSelectionSpec |
2636 | 693 |
"This resource specification was automatically generated |
694 |
by the UIPainter of ST/X." |
|
695 |
||
696 |
"Do not manually edit this!! If it is corrupted, |
|
697 |
the UIPainter may not be able to read the specification." |
|
698 |
||
699 |
" |
|
2656 | 700 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page4_startupClassSelectionSpec |
701 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page4_startupClassSelectionSpec |
|
2636 | 702 |
" |
703 |
||
704 |
<resource: #canvas> |
|
705 |
||
706 |
^ |
|
707 |
#(FullSpec |
|
2656 | 708 |
name: #'page4_startupClassSelectionSpec' |
709 |
window: |
|
710 |
(WindowSpec |
|
711 |
label: 'Startup Class Selection' |
|
712 |
name: 'Startup Class Selection' |
|
713 |
min: (Point 0 0) |
|
714 |
bounds: (Rectangle 0 0 521 408) |
|
715 |
) |
|
716 |
component: |
|
717 |
(SpecCollection |
|
718 |
collection: ( |
|
719 |
(FramedBoxSpec |
|
2725 | 720 |
label: 'New Startup Class' |
2656 | 721 |
name: 'FramedBox3' |
2725 | 722 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 70 0) |
2656 | 723 |
labelPosition: topLeft |
724 |
translateLabel: true |
|
725 |
component: |
|
726 |
(SpecCollection |
|
727 |
collection: ( |
|
728 |
(InputFieldSpec |
|
729 |
name: 'EntryField1' |
|
2659 | 730 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
2656 | 731 |
model: newStartupClassName |
732 |
acceptOnReturn: true |
|
733 |
acceptOnTab: true |
|
2693 | 734 |
acceptOnLostFocus: true |
2656 | 735 |
acceptOnPointerLeave: true |
736 |
emptyFieldReplacementText: 'MyStandAloneStartup' |
|
737 |
) |
|
738 |
(ActionButtonSpec |
|
739 |
label: 'Create' |
|
740 |
name: 'Button1' |
|
2659 | 741 |
layout: (LayoutFrame -100 1 6 0 1 1 28 0) |
2656 | 742 |
translateLabel: true |
743 |
model: createNewStartupClass |
|
744 |
) |
|
745 |
) |
|
746 |
||
747 |
) |
|
748 |
) |
|
749 |
(FramedBoxSpec |
|
2725 | 750 |
label: 'Existing Startup Classes' |
2656 | 751 |
name: 'FramedBox4' |
2725 | 752 |
layout: (LayoutFrame 0 0.0 72 0 4 1.0 -30 1) |
2656 | 753 |
labelPosition: topLeft |
754 |
translateLabel: true |
|
755 |
component: |
|
756 |
(SpecCollection |
|
757 |
collection: ( |
|
758 |
(VariableHorizontalPanelSpec |
|
759 |
name: 'VariableHorizontalPanel2' |
|
2671 | 760 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
2656 | 761 |
component: |
762 |
(SpecCollection |
|
763 |
collection: ( |
|
764 |
(SequenceViewSpec |
|
765 |
name: 'List2' |
|
766 |
model: selectedStartupClassIndexHolder |
|
767 |
hasHorizontalScrollBar: true |
|
768 |
hasVerticalScrollBar: true |
|
769 |
useIndex: true |
|
770 |
sequenceList: listOfStartupClassesInProject |
|
771 |
) |
|
772 |
(TextEditorSpec |
|
773 |
name: 'TextEditor2' |
|
774 |
model: selectedStartupClassesComment |
|
775 |
hasHorizontalScrollBar: true |
|
776 |
hasVerticalScrollBar: true |
|
777 |
isReadOnly: true |
|
778 |
hasKeyboardFocusInitially: false |
|
779 |
viewClassName: 'TextView' |
|
780 |
) |
|
781 |
) |
|
782 |
||
783 |
) |
|
784 |
handles: (Any 0.34560327198364 1.0) |
|
785 |
) |
|
2671 | 786 |
(CheckBoxSpec |
787 |
label: 'Hide other Startup Classes' |
|
788 |
name: 'CheckBox1' |
|
789 |
layout: (LayoutFrame -1 0 -20 1 0 1 2 1) |
|
790 |
model: hideOtherStartupClasses |
|
791 |
translateLabel: true |
|
792 |
) |
|
2656 | 793 |
) |
794 |
||
795 |
) |
|
796 |
) |
|
797 |
(HorizontalPanelViewSpec |
|
798 |
name: 'HorizontalPanel1' |
|
799 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
800 |
horizontalLayout: leftSpace |
|
801 |
verticalLayout: center |
|
802 |
horizontalSpace: 3 |
|
803 |
verticalSpace: 3 |
|
804 |
component: |
|
805 |
(SpecCollection |
|
806 |
collection: ( |
|
807 |
(ActionButtonSpec |
|
808 |
label: 'Browse Selected StartupClass' |
|
809 |
name: 'Button3' |
|
810 |
translateLabel: true |
|
811 |
model: doBrowseStartupClass |
|
2659 | 812 |
enableChannel: hasStartupClassSelectedHolder |
2656 | 813 |
extent: (Point 180 22) |
814 |
) |
|
815 |
) |
|
816 |
||
817 |
) |
|
818 |
) |
|
819 |
) |
|
820 |
||
821 |
) |
|
822 |
) |
|
823 |
! |
|
824 |
||
825 |
page5_specifyIncludedClasses |
|
826 |
"This resource specification was automatically generated |
|
827 |
by the UIPainter of ST/X." |
|
828 |
||
829 |
"Do not manually edit this!! If it is corrupted, |
|
830 |
the UIPainter may not be able to read the specification." |
|
831 |
||
832 |
" |
|
833 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page5_specifyIncludedClasses |
|
834 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page5_specifyIncludedClasses |
|
835 |
" |
|
836 |
||
837 |
<resource: #canvas> |
|
838 |
||
839 |
^ |
|
840 |
#(FullSpec |
|
841 |
name: #'page5_specifyIncludedClasses' |
|
2636 | 842 |
window: |
843 |
(WindowSpec |
|
844 |
label: 'Project Selection' |
|
845 |
name: 'Project Selection' |
|
846 |
min: (Point 0 0) |
|
847 |
bounds: (Rectangle 0 0 521 400) |
|
848 |
) |
|
849 |
component: |
|
850 |
(SpecCollection |
|
851 |
collection: ( |
|
852 |
(FramedBoxSpec |
|
853 |
label: 'Project Contents' |
|
854 |
name: 'FramedBox3' |
|
2648 | 855 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 -30 1) |
2636 | 856 |
labelPosition: topLeft |
857 |
translateLabel: true |
|
858 |
component: |
|
859 |
(SpecCollection |
|
860 |
collection: ( |
|
861 |
(SequenceViewSpec |
|
862 |
name: 'List1' |
|
863 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
864 |
initiallyDisabled: true |
|
865 |
hasHorizontalScrollBar: true |
|
866 |
hasVerticalScrollBar: true |
|
867 |
useIndex: false |
|
868 |
sequenceList: listOfClassesInProject |
|
869 |
) |
|
870 |
) |
|
871 |
||
872 |
) |
|
873 |
) |
|
2648 | 874 |
(HorizontalPanelViewSpec |
875 |
name: 'HorizontalPanel1' |
|
876 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
877 |
horizontalLayout: center |
|
878 |
verticalLayout: center |
|
879 |
horizontalSpace: 3 |
|
880 |
verticalSpace: 3 |
|
881 |
component: |
|
882 |
(SpecCollection |
|
883 |
collection: ( |
|
884 |
(ActionButtonSpec |
|
885 |
label: 'Browse Project Definition' |
|
886 |
name: 'Button3' |
|
887 |
translateLabel: true |
|
2659 | 888 |
model: doBrowseProjectDefinitionClass |
2648 | 889 |
extent: (Point 180 22) |
890 |
) |
|
891 |
(ActionButtonSpec |
|
892 |
label: 'Update Contents (Scan)' |
|
893 |
name: 'Button4' |
|
894 |
translateLabel: true |
|
895 |
model: doGenerateProjectContentsDefinition |
|
896 |
extent: (Point 180 22) |
|
897 |
) |
|
898 |
) |
|
899 |
||
900 |
) |
|
2636 | 901 |
) |
902 |
) |
|
903 |
||
904 |
) |
|
905 |
) |
|
906 |
! |
|
907 |
||
2724 | 908 |
page6a_specifyProjectAttributes |
2636 | 909 |
"This resource specification was automatically generated |
910 |
by the UIPainter of ST/X." |
|
911 |
||
912 |
"Do not manually edit this!! If it is corrupted, |
|
913 |
the UIPainter may not be able to read the specification." |
|
914 |
||
915 |
" |
|
2724 | 916 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page6a_specifyProjectAttributes |
917 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page6a_specifyProjectAttributes |
|
2636 | 918 |
" |
919 |
||
920 |
<resource: #canvas> |
|
921 |
||
922 |
^ |
|
923 |
#(FullSpec |
|
2724 | 924 |
name: #'page6a_specifyProjectAttributes' |
2636 | 925 |
window: |
926 |
(WindowSpec |
|
927 |
label: 'Project Selection' |
|
928 |
name: 'Project Selection' |
|
929 |
min: (Point 0 0) |
|
2681 | 930 |
bounds: (Rectangle 0 0 521 239) |
2636 | 931 |
) |
932 |
component: |
|
933 |
(SpecCollection |
|
934 |
collection: ( |
|
935 |
(FramedBoxSpec |
|
2724 | 936 |
label: 'Product Information' |
937 |
name: 'FramedBox3' |
|
938 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 101 0) |
|
939 |
labelPosition: topLeft |
|
940 |
translateLabel: true |
|
941 |
component: |
|
942 |
(SpecCollection |
|
943 |
collection: ( |
|
944 |
(LabelSpec |
|
945 |
label: 'Product Name:' |
|
946 |
name: 'Label1' |
|
947 |
layout: (LayoutFrame 0 0 10 0 148 0 32 0) |
|
948 |
translateLabel: true |
|
949 |
adjust: right |
|
950 |
) |
|
951 |
(InputFieldSpec |
|
952 |
name: 'EntryField4' |
|
953 |
layout: (LayoutFrame 150 0.0 10 0 0 1.0 32 0) |
|
954 |
model: productNameHolder |
|
955 |
acceptOnLostFocus: true |
|
956 |
acceptOnPointerLeave: true |
|
957 |
viewClassName: '' |
|
958 |
) |
|
959 |
(LabelSpec |
|
960 |
label: 'Company Name:' |
|
961 |
name: 'Label2' |
|
962 |
layout: (LayoutFrame 0 0 39 0 148 0 61 0) |
|
963 |
translateLabel: true |
|
964 |
adjust: right |
|
965 |
) |
|
966 |
(InputFieldSpec |
|
967 |
name: 'EntryField3' |
|
968 |
layout: (LayoutFrame 150 0.0 39 0 0 1.0 61 0) |
|
969 |
model: companyNameHolder |
|
970 |
acceptOnLostFocus: true |
|
971 |
acceptOnPointerLeave: true |
|
972 |
viewClassName: '' |
|
973 |
) |
|
974 |
) |
|
975 |
||
976 |
) |
|
977 |
) |
|
978 |
) |
|
979 |
||
980 |
) |
|
981 |
) |
|
982 |
! |
|
983 |
||
984 |
page6b_specifyBuildDirectorySpec |
|
985 |
"This resource specification was automatically generated |
|
986 |
by the UIPainter of ST/X." |
|
987 |
||
988 |
"Do not manually edit this!! If it is corrupted, |
|
989 |
the UIPainter may not be able to read the specification." |
|
990 |
||
991 |
" |
|
992 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page6b_specifyBuildDirectorySpec |
|
993 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page6b_specifyBuildDirectorySpec |
|
994 |
" |
|
995 |
||
996 |
<resource: #canvas> |
|
997 |
||
998 |
^ |
|
999 |
#(FullSpec |
|
1000 |
name: #'page6b_specifyBuildDirectorySpec' |
|
1001 |
window: |
|
1002 |
(WindowSpec |
|
1003 |
label: 'Project Selection' |
|
1004 |
name: 'Project Selection' |
|
1005 |
min: (Point 0 0) |
|
1006 |
bounds: (Rectangle 0 0 521 361) |
|
1007 |
) |
|
1008 |
component: |
|
1009 |
(SpecCollection |
|
1010 |
collection: ( |
|
1011 |
(FramedBoxSpec |
|
2636 | 1012 |
label: 'Build Directory' |
1013 |
name: 'FramedBox3' |
|
1014 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 79 0) |
|
1015 |
labelPosition: topLeft |
|
1016 |
translateLabel: true |
|
1017 |
component: |
|
1018 |
(SpecCollection |
|
1019 |
collection: ( |
|
1020 |
(FilenameInputFieldSpec |
|
1021 |
name: 'FilenameEntryField1' |
|
1022 |
layout: (LayoutFrame 0 0.0 10 0 0 1.0 32 0) |
|
1023 |
model: buildDirectoryHolder |
|
1024 |
acceptOnPointerLeave: true |
|
1025 |
viewClassName: FilenameWidgetWithHistory |
|
1026 |
) |
|
1027 |
) |
|
1028 |
||
1029 |
) |
|
1030 |
) |
|
2681 | 1031 |
(FramedBoxSpec |
1032 |
label: 'Compiler / Toolchain' |
|
1033 |
name: 'FramedBox4' |
|
1034 |
layout: (LayoutFrame 0 0.0 81 0 4 1.0 155 0) |
|
1035 |
labelPosition: topLeft |
|
1036 |
translateLabel: true |
|
1037 |
component: |
|
1038 |
(SpecCollection |
|
1039 |
collection: ( |
|
1040 |
(ComboListSpec |
|
1041 |
name: 'ComboList1' |
|
1042 |
layout: (LayoutFrame 0 0 10 0 137 0 32 0) |
|
1043 |
model: usedCompilerHolder |
|
1044 |
comboList: listOfPossibleCompilers |
|
1045 |
useIndex: false |
|
1046 |
) |
|
1047 |
) |
|
1048 |
||
1049 |
) |
|
1050 |
) |
|
2724 | 1051 |
(LabelSpec |
1052 |
label: 'Compiler Warn-Label' |
|
1053 |
name: 'Label1' |
|
1054 |
layout: (LayoutFrame 2 0.0 158 0 -2 1.0 303 0) |
|
1055 |
level: -1 |
|
1056 |
visibilityChannel: compilerWarnMessageVisibleHolder |
|
1057 |
backgroundColor: (Color 100.0 49.999237048905 49.999237048905) |
|
1058 |
translateLabel: true |
|
1059 |
labelChannel: compilerWarnMessageHolder |
|
1060 |
adjust: left |
|
1061 |
) |
|
2636 | 1062 |
) |
1063 |
||
1064 |
) |
|
1065 |
) |
|
1066 |
! |
|
1067 |
||
2656 | 1068 |
page7_buildSpec |
2636 | 1069 |
"This resource specification was automatically generated |
1070 |
by the UIPainter of ST/X." |
|
1071 |
||
1072 |
"Do not manually edit this!! If it is corrupted, |
|
1073 |
the UIPainter may not be able to read the specification." |
|
1074 |
||
1075 |
" |
|
2656 | 1076 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page7_buildSpec |
1077 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page7_buildSpec |
|
2636 | 1078 |
" |
1079 |
||
1080 |
<resource: #canvas> |
|
1081 |
||
1082 |
^ |
|
1083 |
#(FullSpec |
|
2656 | 1084 |
name: #'page7_buildSpec' |
2636 | 1085 |
window: |
1086 |
(WindowSpec |
|
1087 |
label: 'Project Selection' |
|
1088 |
name: 'Project Selection' |
|
1089 |
min: (Point 0 0) |
|
1090 |
bounds: (Rectangle 0 0 521 472) |
|
1091 |
) |
|
1092 |
component: |
|
1093 |
(SpecCollection |
|
1094 |
collection: ( |
|
1095 |
(FramedBoxSpec |
|
1096 |
label: 'Make Output' |
|
1097 |
name: 'FramedBox3' |
|
2648 | 1098 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 -30 1) |
2636 | 1099 |
labelPosition: topLeft |
1100 |
translateLabel: true |
|
1101 |
component: |
|
1102 |
(SpecCollection |
|
1103 |
collection: ( |
|
1104 |
(TextEditorSpec |
|
2646 | 1105 |
name: 'MakeOutputWindow' |
2636 | 1106 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
1107 |
model: makeOutputHolder |
|
1108 |
hasHorizontalScrollBar: true |
|
1109 |
hasVerticalScrollBar: true |
|
1110 |
hasKeyboardFocusInitially: false |
|
1111 |
viewClassName: 'TextCollector' |
|
2646 | 1112 |
postBuildCallback: postBuildMakeOutputWindow: |
2636 | 1113 |
) |
1114 |
) |
|
1115 |
||
1116 |
) |
|
1117 |
) |
|
2648 | 1118 |
(HorizontalPanelViewSpec |
1119 |
name: 'HorizontalPanel1' |
|
1120 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
1121 |
horizontalLayout: leftSpace |
|
1122 |
verticalLayout: center |
|
1123 |
horizontalSpace: 3 |
|
1124 |
verticalSpace: 3 |
|
1125 |
component: |
|
1126 |
(SpecCollection |
|
1127 |
collection: ( |
|
1128 |
(ActionButtonSpec |
|
2674 | 1129 |
label: 'Make All' |
2648 | 1130 |
name: 'Button3' |
1131 |
translateLabel: true |
|
2674 | 1132 |
model: doStartMakeAll |
2648 | 1133 |
enableChannel: startMakeButtonEnabled |
1134 |
extent: (Point 107 22) |
|
1135 |
) |
|
1136 |
(ActionButtonSpec |
|
2674 | 1137 |
label: 'Make EXE only' |
1138 |
name: 'Button5' |
|
1139 |
translateLabel: true |
|
1140 |
model: doStartMakeExe |
|
1141 |
enableChannel: startMakeButtonEnabled |
|
1142 |
extent: (Point 107 22) |
|
1143 |
) |
|
1144 |
(ViewSpec |
|
1145 |
name: 'Box1' |
|
1146 |
extent: (Point 20 10) |
|
1147 |
) |
|
1148 |
(ActionButtonSpec |
|
2648 | 1149 |
label: 'Stop Make' |
1150 |
name: 'Button4' |
|
1151 |
visibilityChannel: stopMakeButtonVisible |
|
1152 |
translateLabel: true |
|
1153 |
model: doStopMake |
|
1154 |
extent: (Point 107 22) |
|
1155 |
) |
|
1156 |
) |
|
1157 |
||
1158 |
) |
|
2636 | 1159 |
) |
1160 |
) |
|
1161 |
||
1162 |
) |
|
1163 |
) |
|
1164 |
! |
|
1165 |
||
2676 | 1166 |
page8_deploySpec |
1167 |
"This resource specification was automatically generated |
|
1168 |
by the UIPainter of ST/X." |
|
1169 |
||
1170 |
"Do not manually edit this!! If it is corrupted, |
|
1171 |
the UIPainter may not be able to read the specification." |
|
1172 |
||
1173 |
" |
|
1174 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page8_deploySpec |
|
1175 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page8_deploySpec |
|
1176 |
" |
|
1177 |
||
1178 |
<resource: #canvas> |
|
1179 |
||
1180 |
^ |
|
1181 |
#(FullSpec |
|
1182 |
name: #'page8_deploySpec' |
|
1183 |
window: |
|
1184 |
(WindowSpec |
|
1185 |
label: 'Project Selection' |
|
1186 |
name: 'Project Selection' |
|
1187 |
min: (Point 0 0) |
|
1188 |
bounds: (Rectangle 0 0 521 472) |
|
1189 |
) |
|
1190 |
component: |
|
1191 |
(SpecCollection |
|
1192 |
collection: ( |
|
1193 |
(FramedBoxSpec |
|
1194 |
label: 'Files for Deployment' |
|
1195 |
name: 'FramedBox3' |
|
1196 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 0 1) |
|
1197 |
labelPosition: topLeft |
|
1198 |
translateLabel: true |
|
1199 |
component: |
|
1200 |
(SpecCollection |
|
1201 |
collection: ( |
|
1202 |
(SubCanvasSpec |
|
1203 |
name: 'SubCanvas1' |
|
1204 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
1205 |
hasHorizontalScrollBar: false |
|
1206 |
hasVerticalScrollBar: false |
|
1207 |
clientHolder: fileBrowserInstance |
|
1208 |
createNewApplication: true |
|
1209 |
createNewBuilder: true |
|
2675 | 1210 |
) |
2676 | 1211 |
(HorizontalPanelViewSpec |
1212 |
name: 'HorizontalPanel1' |
|
1213 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
2679 | 1214 |
horizontalLayout: centerMax |
2676 | 1215 |
verticalLayout: center |
1216 |
horizontalSpace: 3 |
|
1217 |
verticalSpace: 3 |
|
1218 |
component: |
|
1219 |
(SpecCollection |
|
1220 |
collection: ( |
|
1221 |
(ActionButtonSpec |
|
1222 |
label: 'Open Windows Explorer' |
|
1223 |
name: 'Button1' |
|
2720 | 1224 |
visibilityChannel: isWindowsOS |
2676 | 1225 |
translateLabel: true |
2649 | 1226 |
resizeForLabel: true |
1227 |
model: doOpenExplorer |
|
1228 |
extent: (Point 172 22) |
|
1229 |
) |
|
2679 | 1230 |
(ActionButtonSpec |
1231 |
label: 'Open Console' |
|
1232 |
name: 'Button2' |
|
2724 | 1233 |
visibilityChannel: isUnixOS |
2679 | 1234 |
translateLabel: true |
1235 |
resizeForLabel: true |
|
1236 |
model: doOpenConsoleTerminal |
|
1237 |
extent: (Point 172 22) |
|
1238 |
) |
|
2649 | 1239 |
) |
1240 |
||
1241 |
) |
|
1242 |
) |
|
2636 | 1243 |
) |
1244 |
||
1245 |
) |
|
1246 |
) |
|
1247 |
) |
|
1248 |
||
1249 |
) |
|
1250 |
) |
|
2676 | 1251 |
! ! |
1252 |
||
2697 | 1253 |
!ProjectBuilderAssistantApplication class methodsFor:'misc specs'! |
1254 |
||
1255 |
newProjectsNameListSpec |
|
1256 |
"This resource specification was automatically generated |
|
1257 |
by the UIPainter of ST/X." |
|
1258 |
||
1259 |
"Do not manually edit this!! If it is corrupted, |
|
1260 |
the UIPainter may not be able to read the specification." |
|
1261 |
||
1262 |
" |
|
1263 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#newProjectsNameListSpec |
|
1264 |
Tools::ProjectBuilderAssistantApplication new openInterface:#newProjectsNameListSpec |
|
1265 |
" |
|
1266 |
||
1267 |
<resource: #canvas> |
|
1268 |
||
1269 |
^ |
|
1270 |
#(FullSpec |
|
1271 |
name: newProjectsNameListSpec |
|
1272 |
window: |
|
1273 |
(WindowSpec |
|
1274 |
label: 'NewApplication' |
|
1275 |
name: 'NewApplication' |
|
1276 |
min: (Point 0 0) |
|
1277 |
bounds: (Rectangle 0 0 131 207) |
|
1278 |
) |
|
1279 |
component: |
|
1280 |
(SpecCollection |
|
1281 |
collection: ( |
|
1282 |
(SequenceViewSpec |
|
1283 |
name: 'ReferencePoint2' |
|
1284 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
2705 | 1285 |
activeHelpKey: listOfNewProjectsName |
2697 | 1286 |
model: newProjectsName |
1287 |
hasHorizontalScrollBar: true |
|
1288 |
hasVerticalScrollBar: true |
|
1289 |
miniScrollerHorizontal: true |
|
1290 |
miniScrollerVertical: false |
|
1291 |
useIndex: false |
|
1292 |
sequenceList: listOfNewProjectsName |
|
2705 | 1293 |
doubleClickChannel: newProjectsNameListDoubleClickChannel |
2697 | 1294 |
) |
1295 |
) |
|
1296 |
||
1297 |
) |
|
1298 |
) |
|
1299 |
! ! |
|
1300 |
||
2676 | 1301 |
!ProjectBuilderAssistantApplication methodsFor:'actions'! |
1302 |
||
1303 |
buildDirectoryChanged |
|
1304 |
self updateButtonEnableState. |
|
2636 | 1305 |
! |
1306 |
||
2676 | 1307 |
createNewApplication |
1308 |
<resource: #uiCallback> |
|
1309 |
||
1310 |
|newAppName newAppClass| |
|
2636 | 1311 |
|
2676 | 1312 |
newAppName := self newApplicationsName value. |
1313 |
newAppName isEmptyOrNil ifTrue:[ |
|
1314 |
Dialog warn:'Please enter the name of the Application-Class first.'. |
|
1315 |
^ self |
|
1316 |
]. |
|
1317 |
||
1318 |
self withWaitCursorDo:[ |
|
1319 |
Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
1320 |
do:[ |
|
2659 | 1321 |
newAppClass := ApplicationModel |
1322 |
subclass:newAppName asSymbol |
|
1323 |
instanceVariableNames:'' |
|
1324 |
classVariableNames:'' |
|
1325 |
poolDictionaries:'' |
|
1326 |
category:'Applications'. |
|
1327 |
CodeGeneratorTool createApplicationCodeFor:newAppClass. |
|
1328 |
]. |
|
2724 | 1329 |
self updateListOfApplicationsInProject. |
1330 |
self selectedApplicationIndexHolder value:(listOfApplicationsInProject value indexOf:newAppClass). |
|
2636 | 1331 |
]. |
1332 |
! |
|
1333 |
||
2676 | 1334 |
createNewProject |
1335 |
<resource: #uiCallback> |
|
1336 |
||
1337 |
|newProjectID projectDefinitionType projectDefinitionClass projectClasses| |
|
1338 |
||
1339 |
newProjectID := self newProjectsName value. |
|
1340 |
newProjectID isEmptyOrNil ifTrue:[ |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1341 |
Dialog warn:(resources string:'Please enter a packageID first.'). |
2676 | 1342 |
^ self |
1343 |
]. |
|
1344 |
newProjectID asPackageId isModuleId ifTrue:[ |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1345 |
Dialog warn:(resources stringWithCRs: |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1346 |
'Please enter a corrent packageID. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1347 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1348 |
All packages must be named like "%1:%2" |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1349 |
(%2 can be a path like "dir/dir/...").' with:(resources string:'module')allItalic |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1350 |
with:(resources string:'directory')allItalic). |
2676 | 1351 |
^ self |
1352 |
]. |
|
1353 |
||
2709 | 1354 |
self withWaitCursorDo:[ |
1355 |
projectDefinitionType := ProjectDefinition perform:(self projectTypeHolder value). |
|
2676 | 1356 |
|
2709 | 1357 |
projectDefinitionClass := ProjectDefinition |
1358 |
definitionClassForPackage:newProjectID |
|
1359 |
projectType: projectDefinitionType |
|
1360 |
createIfAbsent:true. |
|
2676 | 1361 |
|
2709 | 1362 |
projectDefinitionClass compileDescriptionMethods. |
1363 |
self updateListOfMatchingProjects. |
|
1364 |
self updateListOfNewProjectsName. |
|
2676 | 1365 |
|
2709 | 1366 |
self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass). |
2676 | 1367 |
|
2709 | 1368 |
projectClasses := projectDefinitionClass allClassNames |
1369 |
collect:[:nm |Smalltalk classNamed:nm]. |
|
2676 | 1370 |
|
1371 |
"/ projectDefinitionClass isGUIApplication ifTrue:[ |
|
1372 |
"/ "/ see if it has an AppModel class |
|
2659 | 1373 |
"/ (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[ |
1374 |
"/ (Dialog confirm:'Create an Application Class ?') ifTrue:[ |
|
1375 |
"/ self halt. |
|
1376 |
"/ ]. |
|
1377 |
"/ ]. |
|
1378 |
"/ ]. |
|
2636 | 1379 |
|
1380 |
"/ projectDefinitionClass isLibrary ifFalse:[ |
|
1381 |
"/ "/ see if it has a Startup class |
|
1382 |
"/ (projectClasses contains:[:cls | cls isStartable]) ifFalse:[ |
|
1383 |
"/ ]. |
|
1384 |
"/ ]. |
|
2709 | 1385 |
|
1386 |
]. |
|
2636 | 1387 |
! |
1388 |
||
2676 | 1389 |
createNewStartupClass |
1390 |
<resource: #uiCallback> |
|
1391 |
||
2696 | 1392 |
|newClassName newStartupClass startupApplication| |
2676 | 1393 |
|
1394 |
newClassName := self newStartupClassName value. |
|
1395 |
newClassName isEmptyOrNil ifTrue:[ |
|
1396 |
Dialog warn:'Please enter the name of the Startup-Class first.'. |
|
1397 |
^ self |
|
1398 |
]. |
|
1399 |
||
2719 | 1400 |
self withWaitCursorDo:[ |
1401 |
|pkg| |
|
1402 |
||
1403 |
pkg := selectedProjectDefinition notNil |
|
1404 |
ifTrue:[selectedProjectDefinition package] |
|
1405 |
ifFalse:[newProjectsName value]. |
|
1406 |
Class packageQuerySignal answer:pkg |
|
2676 | 1407 |
do:[ |
1408 |
newStartupClass := StandaloneStartup |
|
2659 | 1409 |
subclass:newClassName asSymbol |
1410 |
instanceVariableNames:'' |
|
1411 |
classVariableNames:'' |
|
1412 |
poolDictionaries:'' |
|
2696 | 1413 |
category:'Applications'. |
1414 |
||
1415 |
self projectTypeIsGuiApplication ifTrue: [startupApplication := selectedApplication]. |
|
1416 |
CodeGeneratorTool createStartupCodeFor:newStartupClass forStartOf:startupApplication. |
|
2659 | 1417 |
]. |
2724 | 1418 |
self updateListOfStartupClassesInProject. |
1419 |
self selectedStartupClassIndexHolder value:(listOfStartupClassesInProject value indexOf:newStartupClass). |
|
2659 | 1420 |
]. |
1421 |
! |
|
1422 |
||
2676 | 1423 |
doAddClassToProject |
1424 |
<resource: #uiCallback> |
|
2636 | 1425 |
|
1426 |
Transcript showCR:self class name, ': action for doAddClassToProject ...'. |
|
1427 |
self halt. |
|
1428 |
! |
|
1429 |
||
2676 | 1430 |
doBrowseApplication |
1431 |
<resource: #uiCallback> |
|
2636 | 1432 |
|
1433 |
|appClass| |
|
1434 |
||
2659 | 1435 |
self hasApplicationSelected ifTrue:[ |
1436 |
appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
1437 |
UserPreferences systemBrowserClass |
|
2668 | 1438 |
openInClass:appClass class selector:#windowSpec. |
2659 | 1439 |
]. |
2636 | 1440 |
! |
1441 |
||
2676 | 1442 |
doBrowseProject |
1443 |
<resource: #uiCallback> |
|
1444 |
||
1445 |
UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package. |
|
2636 | 1446 |
! |
1447 |
||
2676 | 1448 |
doBrowseProjectDefinitionClass |
1449 |
<resource: #uiCallback> |
|
1450 |
||
1451 |
|defClass| |
|
1452 |
||
1453 |
self hasProjectSelected ifTrue:[ |
|
1454 |
defClass := self selectedProjectDefinition. |
|
1455 |
UserPreferences systemBrowserClass |
|
2659 | 1456 |
openInClass:defClass class selector:#classNamesAndAttributes. |
1457 |
]. |
|
1458 |
! |
|
1459 |
||
2676 | 1460 |
doBrowseStartupClass |
1461 |
<resource: #uiCallback> |
|
1462 |
||
1463 |
|startupClass| |
|
1464 |
||
1465 |
self hasStartupClassSelected ifTrue:[ |
|
1466 |
startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value). |
|
1467 |
UserPreferences systemBrowserClass |
|
1468 |
openInClass:startupClass class selector:#main:. |
|
2659 | 1469 |
]. |
1470 |
! |
|
1471 |
||
2676 | 1472 |
doGenerateProjectContentsDefinition |
1473 |
self generatePackageContentsMethods |
|
1474 |
! |
|
1475 |
||
1476 |
doLaunchApplication |
|
1477 |
<resource: #uiCallback> |
|
1478 |
||
1479 |
|appClass| |
|
1480 |
||
1481 |
self hasApplicationSelected ifTrue:[ |
|
1482 |
appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
1483 |
appClass open. |
|
2659 | 1484 |
]. |
1485 |
! |
|
1486 |
||
2679 | 1487 |
doOpenConsoleTerminal |
1488 |
"/ OperatingSystem |
|
1489 |
"/ executeCommand:'cmd.exe' |
|
1490 |
"/ inDirectory:(projectBuilder packageBuildDirectory) |
|
2724 | 1491 |
OperatingSystem isUNIXlike ifTrue:[ |
1492 |
VT100TerminalView openShellIn:(projectBuilder packageBuildDirectory) |
|
1493 |
] ifFalse:[ |
|
1494 |
OperatingSystem |
|
1495 |
executeCommand:'c:\windows\System32\cmd.exe' |
|
1496 |
inDirectory:(projectBuilder packageBuildDirectory) |
|
1497 |
] |
|
2679 | 1498 |
! |
1499 |
||
2676 | 1500 |
doOpenExplorer |
1501 |
OperatingSystem |
|
2756 | 1502 |
openApplicationForDocument:(projectBuilder packageBuildDirectory) |
1503 |
operation:#explore. |
|
2676 | 1504 |
! |
1505 |
||
2674 | 1506 |
doStartMakeAll |
2636 | 1507 |
<resource: #uiCallback> |
1508 |
||
1509 |
self stopMakeButtonVisible value:true. |
|
1510 |
self startMakeButtonEnabled value:false. |
|
1511 |
||
2724 | 1512 |
self infoHolder value:'Building (make) - please wait...'. |
2646 | 1513 |
makeOutputWindow clear. |
1514 |
||
2636 | 1515 |
makeProcess := |
1516 |
[ |
|
1517 |
[ |
|
2674 | 1518 |
self runBuildProcess:'all' |
1519 |
] ensure:[ |
|
1520 |
self stopMakeButtonVisible value:false. |
|
1521 |
self startMakeButtonEnabled value:true. |
|
1522 |
makeProcess := nil. |
|
1523 |
self updateButtonEnableState. |
|
2724 | 1524 |
self infoHolder value:''. |
2674 | 1525 |
]. |
1526 |
] newProcess. |
|
1527 |
||
1528 |
makeProcess priority:4. |
|
1529 |
makeProcess priorityRange:(4 to:8). |
|
1530 |
makeProcess resume. |
|
1531 |
! |
|
1532 |
||
2675 | 1533 |
doStartMakeExe |
2674 | 1534 |
<resource: #uiCallback> |
1535 |
||
1536 |
self stopMakeButtonVisible value:true. |
|
1537 |
self startMakeButtonEnabled value:false. |
|
1538 |
||
2724 | 1539 |
self infoHolder value:'Building (make) - please wait...'. |
2674 | 1540 |
makeOutputWindow clear. |
1541 |
||
1542 |
makeProcess := |
|
1543 |
[ |
|
1544 |
[ |
|
1545 |
self runBuildProcess:'exe' |
|
2636 | 1546 |
] ensure:[ |
1547 |
self stopMakeButtonVisible value:false. |
|
1548 |
self startMakeButtonEnabled value:true. |
|
2646 | 1549 |
makeProcess := nil. |
2648 | 1550 |
self updateButtonEnableState. |
2724 | 1551 |
self infoHolder value:''. |
2636 | 1552 |
]. |
1553 |
] newProcess. |
|
1554 |
||
1555 |
makeProcess priority:4. |
|
1556 |
makeProcess priorityRange:(4 to:8). |
|
1557 |
makeProcess resume. |
|
1558 |
! |
|
1559 |
||
2676 | 1560 |
doStopMake |
1561 |
<resource: #uiCallback> |
|
1562 |
||
1563 |
|p| |
|
2646 | 1564 |
|
2676 | 1565 |
(p := makeProcess) notNil ifTrue:[ |
1566 |
makeProcess := nil. |
|
1567 |
p terminate. |
|
1568 |
p waitUntilTerminated. |
|
1569 |
||
1570 |
makeOutputWindow endEntry. |
|
1571 |
makeOutputWindow cr. |
|
1572 |
makeOutputWindow nextPutLine:('Make Cancelled' colorizeAllWith:Color white on:Color red). |
|
1573 |
makeOutputWindow endEntry. |
|
1574 |
]. |
|
2646 | 1575 |
! |
1576 |
||
2676 | 1577 |
projectTypeChanged |
1578 |
<resource: #uiCallback> |
|
1579 |
||
1580 |
self updateListOfMatchingProjects |
|
2636 | 1581 |
! |
1582 |
||
2674 | 1583 |
runBuildProcess:what |
2636 | 1584 |
<resource: #uiCallback> |
1585 |
||
2646 | 1586 |
self assert:makeOutputWindow notNil. |
1587 |
self assert:makeOutputWindow model == self makeOutputHolder. |
|
1588 |
||
1589 |
ActivityNotification handle:[:ex | |
|
1590 |
ex messageText notNil ifTrue:[ |
|
1591 |
makeOutputWindow endEntry. |
|
1592 |
makeOutputWindow cr. |
|
2659 | 1593 |
makeOutputWindow nextPutLine:(ex messageText colorizeAllWith:Color white on:Color blue). |
2646 | 1594 |
makeOutputWindow endEntry. |
2687
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
1595 |
]. |
2646 | 1596 |
ex proceed. |
1597 |
] do:[ |
|
1598 |
projectBuilder := ProjectBuilder new. |
|
1599 |
projectBuilder package:(selectedProjectDefinition package). |
|
2681 | 1600 |
projectBuilder usedCompiler:(usedCompilerHolder value). |
2674 | 1601 |
what = 'exe' ifTrue:[ |
1602 |
projectBuilder makeExeOnly:true |
|
1603 |
] ifFalse:[ |
|
1604 |
projectBuilder makeExeOnly:false |
|
1605 |
]. |
|
1606 |
||
1607 |
Error handle:[:ex | |
|
1608 |
makeOutputWindow endEntry. |
|
1609 |
makeOutputWindow cr. |
|
2682 | 1610 |
makeOutputWindow nextPutLine:(ex description colorizeAllWith:Color white on:Color red). |
2674 | 1611 |
makeOutputWindow endEntry. |
2682 | 1612 |
ex proceed. |
2674 | 1613 |
] do:[ |
1614 |
projectBuilder buildWithColorizedOutputTo:makeOutputWindow. |
|
1615 |
]. |
|
2646 | 1616 |
]. |
2636 | 1617 |
! |
1618 |
||
2676 | 1619 |
selectedApplicationChanged |
1620 |
|idx| |
|
2671 | 1621 |
|
2676 | 1622 |
((idx := self selectedApplicationIndexHolder value) isNil |
1623 |
or:[idx == 0]) ifTrue:[ |
|
1624 |
selectedApplication := nil. |
|
1625 |
] ifFalse:[ |
|
1626 |
selectedApplication := self listOfApplicationsInProject value at:idx. |
|
2636 | 1627 |
]. |
2676 | 1628 |
self hasApplicationSelectedHolder value:(selectedApplication notNil). |
2659 | 1629 |
|
2676 | 1630 |
"/ selectedApplication notNil ifTrue:[ |
1631 |
"/ "/ generate startupClass code |
|
1632 |
"/ CodeGeneratorTool |
|
2656 | 1633 |
"/ compile:(selectedProjectDefinition startupClassName_codeFor:(selectedApplication name)) |
1634 |
"/ forClass:selectedProjectDefinition theMetaclass |
|
1635 |
"/ inCategory:'description - startup'. |
|
1636 |
"/ ]. |
|
2636 | 1637 |
self updateApplicationComment. |
1638 |
self updateButtonEnableState. |
|
1639 |
! |
|
1640 |
||
2676 | 1641 |
selectedProjectChanged |
2694 | 1642 |
|
1643 |
|selectedProjectIndex| |
|
1644 |
||
1645 |
selectedProjectIndex := self selectedProjectIndexHolder value. |
|
1646 |
(selectedProjectIndex ? 0) == 0 ifTrue:[ |
|
2676 | 1647 |
selectedProjectDefinition := nil. |
1648 |
] ifFalse:[ |
|
2694 | 1649 |
selectedProjectDefinition := self listOfMatchingProjects value at:(selectedProjectIndex). |
2676 | 1650 |
]. |
1651 |
self hasProjectSelectedHolder value:(selectedProjectDefinition notNil). |
|
1652 |
||
1653 |
self updateComment. |
|
1654 |
self updateListOfApplicationsInProject. |
|
2636 | 1655 |
self updateButtonEnableState. |
2656 | 1656 |
! |
1657 |
||
2676 | 1658 |
selectedStartupClassChanged |
1659 |
self selectedStartupClassIndexHolder value isNil ifTrue:[ |
|
1660 |
selectedStartupClass := nil. |
|
1661 |
] ifFalse:[ |
|
1662 |
selectedStartupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value). |
|
2656 | 1663 |
]. |
2659 | 1664 |
self hasStartupClassSelectedHolder value:(selectedStartupClass notNil). |
1665 |
||
2656 | 1666 |
selectedStartupClass notNil ifTrue:[ |
1667 |
"/ generate startupClass code |
|
1668 |
CodeGeneratorTool |
|
1669 |
compile:(selectedProjectDefinition startupClassName_codeFor:(selectedStartupClass name)) |
|
1670 |
forClass:selectedProjectDefinition theMetaclass |
|
1671 |
inCategory:'description - startup'. |
|
1672 |
]. |
|
1673 |
self updateButtonEnableState. |
|
2676 | 1674 |
! ! |
2636 | 1675 |
|
2676 | 1676 |
!ProjectBuilderAssistantApplication methodsFor:'aspects'! |
2636 | 1677 |
|
2676 | 1678 |
buildDirectoryHolder |
1679 |
<resource: #uiAspect> |
|
2636 | 1680 |
|
1681 |
|buildDirectory| |
|
1682 |
||
1683 |
buildDirectoryHolder isNil ifTrue:[ |
|
1684 |
buildDirectoryHolder := nil asValue. |
|
1685 |
buildDirectoryHolder onChangeSend:#buildDirectoryChanged to:self. |
|
1686 |
]. |
|
1687 |
buildDirectoryHolder value isEmptyOrNil ifTrue:[ |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1688 |
buildDirectory := ProjectBuilder previousBuildDirectory. |
2636 | 1689 |
buildDirectory isNil ifTrue:[ |
1690 |
buildDirectory := UserPreferences current buildDirectory. |
|
1691 |
buildDirectory isNil ifTrue:[ |
|
1692 |
buildDirectory := Filename tempDirectory construct:'stx_build'. |
|
1693 |
]. |
|
1694 |
]. |
|
1695 |
buildDirectoryHolder value: buildDirectory. |
|
1696 |
]. |
|
1697 |
^ buildDirectoryHolder. |
|
1698 |
! |
|
1699 |
||
2724 | 1700 |
companyNameHolder |
1701 |
<resource: #uiAspect> |
|
1702 |
||
1703 |
companyNameHolder isNil ifTrue:[ |
|
1704 |
companyNameHolder := 'MyCompany' asValue. |
|
1705 |
]. |
|
1706 |
^ companyNameHolder. |
|
1707 |
! |
|
1708 |
||
1709 |
compilerWarnMessageHolder |
|
1710 |
<resource: #uiAspect> |
|
1711 |
||
1712 |
compilerWarnMessageHolder isNil ifTrue:[ |
|
1713 |
compilerWarnMessageHolder := '' asValue. |
|
1714 |
]. |
|
1715 |
^ compilerWarnMessageHolder. |
|
1716 |
! |
|
1717 |
||
1718 |
compilerWarnMessageVisibleHolder |
|
1719 |
<resource: #uiAspect> |
|
1720 |
||
1721 |
compilerWarnMessageVisibleHolder isNil ifTrue:[ |
|
1722 |
compilerWarnMessageVisibleHolder := false asValue. |
|
1723 |
]. |
|
1724 |
^ compilerWarnMessageVisibleHolder. |
|
1725 |
! |
|
1726 |
||
2676 | 1727 |
hasApplicationSelectedHolder |
1728 |
<resource: #uiAspect> |
|
1729 |
||
1730 |
hasApplicationSelectedHolder isNil ifTrue:[ |
|
2659 | 1731 |
hasApplicationSelectedHolder := nil asValue. |
1732 |
]. |
|
1733 |
^ hasApplicationSelectedHolder. |
|
2636 | 1734 |
! |
1735 |
||
2676 | 1736 |
hasProjectSelectedHolder |
1737 |
<resource: #uiAspect> |
|
1738 |
||
1739 |
hasProjectSelectedHolder isNil ifTrue:[ |
|
2659 | 1740 |
hasProjectSelectedHolder := nil asValue. |
1741 |
]. |
|
1742 |
^ hasProjectSelectedHolder. |
|
2648 | 1743 |
! |
1744 |
||
2676 | 1745 |
hasStartupClassSelectedHolder |
1746 |
<resource: #uiAspect> |
|
1747 |
||
1748 |
hasStartupClassSelectedHolder isNil ifTrue:[ |
|
2659 | 1749 |
hasStartupClassSelectedHolder := nil asValue. |
1750 |
]. |
|
1751 |
^ hasStartupClassSelectedHolder. |
|
2636 | 1752 |
! |
1753 |
||
2676 | 1754 |
hideOtherApplicationClasses |
1755 |
<resource: #uiAspect> |
|
1756 |
||
1757 |
hideOtherApplicationClasses isNil ifTrue:[ |
|
2671 | 1758 |
hideOtherApplicationClasses := true asValue. |
1759 |
hideOtherApplicationClasses onChangeSend:#updateListOfApplicationsInProject to:self. |
|
1760 |
]. |
|
1761 |
^ hideOtherApplicationClasses. |
|
1762 |
! |
|
1763 |
||
2676 | 1764 |
hideOtherStartupClasses |
1765 |
<resource: #uiAspect> |
|
1766 |
||
1767 |
hideOtherStartupClasses isNil ifTrue:[ |
|
1768 |
hideOtherStartupClasses := true asValue. |
|
1769 |
hideOtherStartupClasses onChangeSend:#updateListOfStartupClassesInProject to:self. |
|
2671 | 1770 |
]. |
2676 | 1771 |
^ hideOtherStartupClasses. |
2671 | 1772 |
! |
1773 |
||
2676 | 1774 |
hideSTXProjects |
1775 |
<resource: #uiAspect> |
|
1776 |
||
1777 |
hideSTXProjects isNil ifTrue:[ |
|
1778 |
hideSTXProjects := true asValue. |
|
1779 |
hideSTXProjects onChangeSend:#updateListOfMatchingProjects to:self. |
|
1780 |
]. |
|
1781 |
^ hideSTXProjects. |
|
1782 |
! |
|
1783 |
||
1784 |
listOfApplicationsInProject |
|
1785 |
<resource: #uiAspect> |
|
1786 |
||
1787 |
listOfApplicationsInProject isNil ifTrue:[ |
|
2636 | 1788 |
listOfApplicationsInProject := ValueHolder new. |
1789 |
]. |
|
1790 |
^ listOfApplicationsInProject. |
|
1791 |
! |
|
1792 |
||
2676 | 1793 |
listOfClassesInProject |
1794 |
<resource: #uiAspect> |
|
1795 |
||
1796 |
listOfClassesInProject isNil ifTrue:[ |
|
2636 | 1797 |
listOfClassesInProject := ValueHolder new. |
1798 |
]. |
|
1799 |
^ listOfClassesInProject. |
|
1800 |
! |
|
1801 |
||
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1802 |
listOfMatchingPackageIds |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1803 |
<resource: #uiAspect> |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1804 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1805 |
listOfMatchingPackageIds isNil ifTrue:[ |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1806 |
listOfMatchingPackageIds := ValueHolder new. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1807 |
]. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1808 |
^ listOfMatchingPackageIds. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1809 |
! |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
1810 |
|
2676 | 1811 |
listOfMatchingProjects |
1812 |
<resource: #uiAspect> |
|
2636 | 1813 |
|
1814 |
listOfMatchingProjects isNil ifTrue:[ |
|
1815 |
listOfMatchingProjects := ValueHolder new. |
|
1816 |
]. |
|
1817 |
^ listOfMatchingProjects. |
|
1818 |
! |
|
1819 |
||
2697 | 1820 |
listOfNewProjectsName |
1821 |
||
1822 |
<resource: #uiAspect> |
|
1823 |
||
1824 |
listOfNewProjectsName isNil ifTrue:[ |
|
1825 |
listOfNewProjectsName := ValueHolder new. |
|
1826 |
]. |
|
1827 |
^ listOfNewProjectsName. |
|
1828 |
! |
|
1829 |
||
2681 | 1830 |
listOfPossibleCompilers |
1831 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
2724 | 1832 |
^ #('bcc' 'vc' 'lcc' 'gcc' ) |
2681 | 1833 |
]. |
1834 |
^ #('gcc') |
|
1835 |
! |
|
1836 |
||
2676 | 1837 |
listOfStartupClassesInProject |
1838 |
<resource: #uiAspect> |
|
1839 |
||
1840 |
listOfStartupClassesInProject isNil ifTrue:[ |
|
1841 |
listOfStartupClassesInProject := ValueHolder new. |
|
1842 |
]. |
|
1843 |
^ listOfStartupClassesInProject. |
|
1844 |
! |
|
1845 |
||
1846 |
makeOutputHolder |
|
1847 |
<resource: #uiAspect> |
|
2636 | 1848 |
|
1849 |
makeOutputHolder isNil ifTrue:[ |
|
2646 | 1850 |
makeOutputHolder := ValueHolder new. |
2636 | 1851 |
]. |
1852 |
^ makeOutputHolder. |
|
1853 |
! |
|
1854 |
||
2676 | 1855 |
newApplicationsName |
1856 |
<resource: #uiAspect> |
|
1857 |
||
1858 |
"automatically generated by UIPainter ..." |
|
1859 |
||
1860 |
"*** the code below creates a default model when invoked." |
|
1861 |
"*** (which may not be the one you wanted)" |
|
1862 |
"*** Please change as required and accept it in the browser." |
|
1863 |
"*** (and replace this comment by something more useful ;-)" |
|
1864 |
||
1865 |
newApplicationsName isNil ifTrue:[ |
|
1866 |
newApplicationsName := ValueHolder new. |
|
1867 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
2636 | 1868 |
"/ newApplicationsName addDependent:self. |
1869 |
"/ newApplicationsName onChangeSend:#newApplicationsNameChanged to:self. |
|
1870 |
]. |
|
1871 |
^ newApplicationsName. |
|
1872 |
! |
|
1873 |
||
2676 | 1874 |
newProjectsName |
1875 |
<resource: #uiAspect> |
|
1876 |
||
1877 |
newProjectsName isNil ifTrue:[ |
|
2636 | 1878 |
newProjectsName := nil asValue. |
1879 |
]. |
|
1880 |
^ newProjectsName. |
|
1881 |
! |
|
1882 |
||
2705 | 1883 |
newProjectsNameListDoubleClickChannel |
1884 |
"automatically generated by UIPainter ..." |
|
1885 |
||
1886 |
"*** the code below creates a default model when invoked." |
|
1887 |
"*** (which may not be the one you wanted)" |
|
1888 |
"*** Please change as required and accept it in the browser." |
|
1889 |
||
1890 |
|holder| |
|
1891 |
||
1892 |
(holder := builder bindingAt:#newProjectsNameListDoubleClickChannel) isNil ifTrue:[ |
|
1893 |
holder := TriggerValue new. |
|
1894 |
builder aspectAt:#newProjectsNameListDoubleClickChannel put:holder. |
|
1895 |
holder onChangeEvaluate:[ |
|
1896 |
newProjectsNameListExtendedComboBox notNil ifTrue: [ |
|
1897 |
newProjectsNameListExtendedComboBox closeMenu. |
|
1898 |
] |
|
1899 |
] |
|
1900 |
]. |
|
1901 |
^ holder. |
|
1902 |
! |
|
1903 |
||
2676 | 1904 |
newStartupClassName |
1905 |
<resource: #uiAspect> |
|
1906 |
||
1907 |
newStartupClassName isNil ifTrue:[ |
|
1908 |
newStartupClassName := ValueHolder new. |
|
1909 |
]. |
|
1910 |
^ newStartupClassName. |
|
2659 | 1911 |
! |
1912 |
||
2724 | 1913 |
productNameHolder |
1914 |
<resource: #uiAspect> |
|
1915 |
||
1916 |
productNameHolder isNil ifTrue:[ |
|
1917 |
productNameHolder := 'MyProduct' asValue. |
|
1918 |
]. |
|
1919 |
^ productNameHolder. |
|
1920 |
! |
|
1921 |
||
2676 | 1922 |
projectType |
1923 |
self projectTypeHolder value == #libraryType ifTrue:[ |
|
1924 |
^ ProjectDefinition libraryType |
|
2659 | 1925 |
]. |
1926 |
self projectTypeHolder value == #guiApplicationType ifTrue:[ |
|
1927 |
^ ProjectDefinition guiApplicationType |
|
1928 |
]. |
|
1929 |
self projectTypeHolder value == #nonGuiApplicationType ifTrue:[ |
|
1930 |
^ ProjectDefinition nonGuiApplicationType |
|
2636 | 1931 |
]. |
2659 | 1932 |
self error. |
1933 |
! |
|
1934 |
||
2676 | 1935 |
projectType:aProjectTypeSymbol |
1936 |
|pType| |
|
1937 |
||
1938 |
self assert:(ProjectDefinition projectTypes includes:aProjectTypeSymbol). |
|
1939 |
aProjectTypeSymbol == ProjectDefinition libraryType ifTrue:[ |
|
1940 |
pType := #libraryType |
|
1941 |
] ifFalse:[ |
|
1942 |
aProjectTypeSymbol == ProjectDefinition guiApplicationType ifTrue:[ |
|
1943 |
pType := #guiApplicationType |
|
1944 |
] ifFalse:[ |
|
1945 |
aProjectTypeSymbol == ProjectDefinition nonGuiApplicationType ifTrue:[ |
|
2659 | 1946 |
pType := #nonGuiApplicationType |
1947 |
] ifFalse:[ |
|
1948 |
self error. |
|
1949 |
]. |
|
1950 |
] |
|
1951 |
]. |
|
1952 |
self projectTypeHolder value:aProjectTypeSymbol |
|
1953 |
! |
|
1954 |
||
2676 | 1955 |
projectTypeHolder |
1956 |
<resource: #uiAspect> |
|
2659 | 1957 |
|
2676 | 1958 |
projectTypeHolder isNil ifTrue:[ |
1959 |
projectTypeHolder := RadioButtonGroup new. |
|
1960 |
projectTypeHolder value:#guiApplicationType. |
|
2659 | 1961 |
]. |
1962 |
^ projectTypeHolder. |
|
2636 | 1963 |
! |
1964 |
||
2676 | 1965 |
selectedApplicationIndexHolder |
1966 |
<resource: #uiAspect> |
|
1967 |
||
1968 |
selectedApplicationIndexHolder isNil ifTrue:[ |
|
2636 | 1969 |
selectedApplicationIndexHolder := ValueHolder new. |
1970 |
selectedApplicationIndexHolder onChangeSend:#selectedApplicationChanged to:self. |
|
1971 |
]. |
|
1972 |
^ selectedApplicationIndexHolder. |
|
1973 |
! |
|
1974 |
||
2676 | 1975 |
selectedApplicationsComment |
1976 |
<resource: #uiAspect> |
|
1977 |
||
1978 |
"automatically generated by UIPainter ..." |
|
2636 | 1979 |
|
1980 |
"*** the code below creates a default model when invoked." |
|
1981 |
"*** (which may not be the one you wanted)" |
|
1982 |
"*** Please change as required and accept it in the browser." |
|
1983 |
"*** (and replace this comment by something more useful ;-)" |
|
1984 |
||
1985 |
selectedApplicationsComment isNil ifTrue:[ |
|
1986 |
selectedApplicationsComment := '' asValue. |
|
1987 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1988 |
"/ selectedApplicationsComment addDependent:self. |
|
1989 |
"/ selectedApplicationsComment onChangeSend:#selectedApplicationsCommentChanged to:self. |
|
1990 |
]. |
|
1991 |
^ selectedApplicationsComment. |
|
1992 |
! |
|
1993 |
||
2676 | 1994 |
selectedProjectDefinition |
1995 |
<resource: #uiAspect> |
|
2636 | 1996 |
|
2676 | 1997 |
^ selectedProjectDefinition. |
2636 | 1998 |
! |
1999 |
||
2676 | 2000 |
selectedProjectIndexHolder |
2001 |
<resource: #uiAspect> |
|
2636 | 2002 |
|
2003 |
selectedProjectIndexHolder isNil ifTrue:[ |
|
2004 |
selectedProjectIndexHolder := ValueHolder new. |
|
2005 |
selectedProjectIndexHolder onChangeSend:#selectedProjectChanged to:self. |
|
2006 |
]. |
|
2007 |
^ selectedProjectIndexHolder. |
|
2676 | 2008 |
! |
2009 |
||
2010 |
selectedProjectsComment |
|
2011 |
<resource: #uiAspect> |
|
2012 |
||
2013 |
selectedProjectsComment isNil ifTrue:[ |
|
2014 |
selectedProjectsComment := '' asValue. |
|
2015 |
]. |
|
2016 |
^ selectedProjectsComment. |
|
2017 |
! |
|
2018 |
||
2019 |
selectedStartupClassIndexHolder |
|
2020 |
<resource: #uiAspect> |
|
2021 |
||
2022 |
selectedStartupClassIndexHolder isNil ifTrue:[ |
|
2023 |
selectedStartupClassIndexHolder := ValueHolder new. |
|
2024 |
selectedStartupClassIndexHolder onChangeSend:#selectedStartupClassChanged to:self. |
|
2025 |
]. |
|
2026 |
^ selectedStartupClassIndexHolder. |
|
2027 |
! |
|
2028 |
||
2029 |
startMakeButtonEnabled |
|
2030 |
<resource: #uiAspect> |
|
2031 |
||
2032 |
startMakeButtonEnabled isNil ifTrue:[ |
|
2033 |
startMakeButtonEnabled := true asValue. |
|
2034 |
]. |
|
2035 |
^ startMakeButtonEnabled. |
|
2036 |
! |
|
2037 |
||
2038 |
stopMakeButtonVisible |
|
2039 |
<resource: #uiAspect> |
|
2040 |
||
2041 |
stopMakeButtonVisible isNil ifTrue:[ |
|
2042 |
stopMakeButtonVisible := false asValue. |
|
2043 |
]. |
|
2044 |
^ stopMakeButtonVisible. |
|
2681 | 2045 |
! |
2046 |
||
2047 |
usedCompilerHolder |
|
2048 |
<resource: #uiAspect> |
|
2049 |
||
2050 |
usedCompilerHolder isNil ifTrue:[ |
|
2051 |
usedCompilerHolder := ValueHolder new. |
|
2724 | 2052 |
usedCompilerHolder value:(OperatingSystem isMSWINDOWSlike ifTrue:['bcc'] ifFalse:['gcc']). |
2053 |
usedCompilerHolder onChangeSend:#checkCompilerAvailability to:self. |
|
2681 | 2054 |
]. |
2055 |
^ usedCompilerHolder. |
|
2676 | 2056 |
! ! |
2057 |
||
2058 |
!ProjectBuilderAssistantApplication methodsFor:'initialization & release'! |
|
2059 |
||
2687
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2060 |
fileBrowserInstance |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2061 |
"setup the embedded fileBrowser (in the last page)" |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2062 |
|
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2063 |
|targetDirectory browser| |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2064 |
|
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2065 |
targetDirectory := projectBuilder packageBuildDirectory. |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2066 |
|
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2067 |
browser := FileBrowserV2 new. |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2068 |
browser onDirectory:targetDirectory. |
2724 | 2069 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
2070 |
browser filter:'*.exe;*.com'. |
|
2071 |
] ifFalse:[ |
|
2072 |
browser filter:'*'. |
|
2073 |
]. |
|
2687
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2074 |
^ browser. |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2075 |
! |
66343568f2b2
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2686
diff
changeset
|
2076 |
|
2676 | 2077 |
postBuildMakeOutputWindow:aView |
2078 |
makeOutputWindow := aView |
|
2079 |
! |
|
2080 |
||
2705 | 2081 |
postBuildNewProjectsNameListExtendedComboBox:anExtendedComboBox |
2697 | 2082 |
|
2083 |
|menu| |
|
2084 |
||
2085 |
menu := SubCanvas new. |
|
2086 |
menu client:self spec:#newProjectsNameListSpec builder:nil. |
|
2705 | 2087 |
anExtendedComboBox closeOnSelect: false. |
2088 |
anExtendedComboBox menuWidget:menu. |
|
2697 | 2089 |
|
2705 | 2090 |
anExtendedComboBox editor |
2697 | 2091 |
immediateAccept:true; |
2092 |
acceptOnLeave:true; |
|
2093 |
acceptOnLostFocus:true; |
|
2094 |
acceptOnPointerLeave:true; |
|
2095 |
acceptOnReturn:true; |
|
2096 |
acceptOnTab:true. |
|
2705 | 2097 |
|
2098 |
newProjectsNameListExtendedComboBox := anExtendedComboBox. |
|
2697 | 2099 |
! |
2100 |
||
2676 | 2101 |
postBuildWith:aBuilder |
2102 |
super postBuildWith:aBuilder. |
|
2103 |
self updateListOfMatchingProjects. |
|
2697 | 2104 |
self updateListOfNewProjectsName. |
2676 | 2105 |
|
2106 |
Smalltalk addDependent:self. |
|
2107 |
! |
|
2108 |
||
2109 |
release |
|
2110 |
Smalltalk removeDependent:self. |
|
2111 |
super release |
|
2112 |
! ! |
|
2113 |
||
2114 |
!ProjectBuilderAssistantApplication methodsFor:'menu actions'! |
|
2115 |
||
2116 |
openDocumentation |
|
2117 |
self openHTMLDocument:'tools/misc/TOP.html#PACKAGER'. |
|
2659 | 2118 |
! ! |
2119 |
||
2636 | 2120 |
!ProjectBuilderAssistantApplication methodsFor:'private'! |
2121 |
||
2676 | 2122 |
commentFromClass:aClass |
2123 |
|docMethod comment indents minIndent maxLineLength| |
|
2636 | 2124 |
|
2125 |
docMethod := aClass class compiledMethodAt:#documentation. |
|
2126 |
docMethod notNil ifTrue:[ |
|
2127 |
comment := docMethod comment. |
|
2128 |
comment := comment asStringCollection |
|
2129 |
collect:[:line | line withoutTrailingSeparators]. |
|
2130 |
[comment notEmpty and:[comment first isBlank]] whileTrue:[ comment removeFirst ]. |
|
2131 |
maxLineLength := (comment collect:[:line | line size]) max. |
|
2132 |
indents := comment collect:[:line | |
|
2133 |
line isEmptyOrNil |
|
2134 |
ifTrue:[maxLineLength] |
|
2135 |
ifFalse:[ line findFirst:[:ch | ch isSeparator not]]]. |
|
2136 |
(minIndent := indents min) > 1 ifTrue:[ |
|
2137 |
comment := comment collect:[:line | line copyFrom:minIndent]. |
|
2138 |
]. |
|
2139 |
comment := comment asString. |
|
2140 |
]. |
|
2141 |
^ comment |
|
2659 | 2142 |
! |
2143 |
||
2676 | 2144 |
generatePackageContentsMethods |
2145 |
<resource: #uiCallback> |
|
2146 |
||
2147 |
Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
2148 |
do:[ |
|
2149 |
selectedProjectDefinition |
|
2150 |
forEachContentsMethodsCodeToCompileDo:[:code :category | |
|
2151 |
CodeGeneratorTool |
|
2152 |
compile:code |
|
2153 |
forClass:selectedProjectDefinition theMetaclass |
|
2154 |
inCategory:category. |
|
2155 |
] |
|
2156 |
ignoreOldDefinition:true |
|
2659 | 2157 |
]. |
2676 | 2158 |
self updateListOfClassesInProject |
2659 | 2159 |
! |
2160 |
||
2676 | 2161 |
hasApplicationSelected |
2162 |
^ self selectedApplicationIndexHolder value notNil |
|
2163 |
! |
|
2164 |
||
2165 |
hasBuildDirectorySpecified |
|
2166 |
^ self buildDirectoryHolder value notEmptyOrNil |
|
2659 | 2167 |
! |
2168 |
||
2676 | 2169 |
hasProjectBuilder |
2170 |
^ projectBuilder notNil |
|
2171 |
! |
|
2172 |
||
2173 |
hasProjectSelected |
|
2174 |
^ self selectedProjectIndexHolder value notNil |
|
2175 |
! |
|
2176 |
||
2177 |
hasStartupClassSelected |
|
2178 |
^ self selectedStartupClassIndexHolder value notNil |
|
2636 | 2179 |
! ! |
2180 |
||
2656 | 2181 |
!ProjectBuilderAssistantApplication methodsFor:'queries'! |
2182 |
||
2676 | 2183 |
canEnterApplicationSelection |
2184 |
^ self hasProjectSelected |
|
2656 | 2185 |
! |
2186 |
||
2676 | 2187 |
canEnterBuild |
2188 |
^ self hasBuildDirectorySpecified |
|
2656 | 2189 |
! |
2190 |
||
2659 | 2191 |
canEnterContentsSelection |
2192 |
^ self hasProjectSelected |
|
2674 | 2193 |
and:[ true "self hasApplicationSelected" |
2695 | 2194 |
and:[ (self projectTypeIsLibrary or:[self hasStartupClassSelected]) ]] |
2659 | 2195 |
! |
2196 |
||
2676 | 2197 |
canEnterDeploy |
2198 |
^ self hasProjectBuilder |
|
2656 | 2199 |
! |
2200 |
||
2676 | 2201 |
canEnterStartupClassSelection |
2202 |
^ self hasProjectSelected "and:[ self hasApplicationSelected ]" |
|
2696 | 2203 |
! |
2204 |
||
2724 | 2205 |
isUnixOS |
2206 |
^ OperatingSystem isUNIXlike |
|
2207 |
! |
|
2208 |
||
2720 | 2209 |
isWindowsOS |
2210 |
^ OperatingSystem isMSWINDOWSlike |
|
2211 |
! |
|
2212 |
||
2696 | 2213 |
projectTypeIsGuiApplication |
2214 |
^ self projectTypeHolder value == #guiApplicationType |
|
2215 |
! |
|
2216 |
||
2217 |
projectTypeIsLibrary |
|
2218 |
^ self projectTypeHolder value == #libraryType |
|
2219 |
! |
|
2220 |
||
2221 |
projectTypeIsNotLibrary |
|
2222 |
^ self projectTypeIsLibrary not |
|
2656 | 2223 |
! ! |
2224 |
||
2636 | 2225 |
!ProjectBuilderAssistantApplication methodsFor:'specs'! |
2226 |
||
2676 | 2227 |
assistantSpec |
2703 | 2228 |
^ self class assistantSpec |
2676 | 2229 |
! ! |
2230 |
||
2231 |
!ProjectBuilderAssistantApplication methodsFor:'update'! |
|
2232 |
||
2724 | 2233 |
checkCompilerAvailability |
2234 |
|cmd suite warnMsg1 warnMsg2 sep| |
|
2235 |
||
2236 |
cmd := 'cc'. |
|
2237 |
suite := 'C-Compiler'. |
|
2238 |
warnMsg1 := warnMsg2 := ''. |
|
2239 |
||
2240 |
self usedCompilerHolder value = 'bcc' ifTrue:[ |
|
2241 |
cmd := 'bcc32'. |
|
2242 |
suite := 'Borland C-Compiler'. |
|
2243 |
]. |
|
2244 |
self usedCompilerHolder value = 'vc' ifTrue:[ |
|
2245 |
cmd := 'cl'. |
|
2246 |
suite := 'Microsoft Visual C C-Compiler'. |
|
2247 |
warnMsg2 := 'Due to bugs in this C-compiler, some classes may not be compilable.'. |
|
2248 |
]. |
|
2249 |
self usedCompilerHolder value = 'lcc' ifTrue:[ |
|
2250 |
cmd := 'lcc'. |
|
2251 |
suite := 'LCC C-Compiler'. |
|
2252 |
warnMsg2 := 'The LCC C-compiler suite is not yet supported (linkage).'. |
|
2253 |
]. |
|
2254 |
self usedCompilerHolder value = 'gcc' ifTrue:[ |
|
2255 |
cmd := 'gcc'. |
|
2256 |
suite := 'GNU C-Compiler'. |
|
2257 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
2258 |
warnMsg2 := 'The GNU C-compiler suite is not yet supported on MSDOS systems.'. |
|
2259 |
]. |
|
2260 |
]. |
|
2261 |
||
2262 |
(OperatingSystem canExecuteCommand:cmd) ifFalse:[ |
|
2263 |
warnMsg1 := |
|
2264 |
'The "%1"-command seems to be not in your path. |
|
2265 |
Please ensure that you installed the |
|
2266 |
"%2" compiler suite correctly.' bindWith:cmd with:suite. |
|
2267 |
]. |
|
2268 |
||
2269 |
(warnMsg1 notEmpty or:[warnMsg2 notEmpty]) ifTrue:[ |
|
2270 |
sep := ''. |
|
2271 |
(warnMsg2 notEmpty) ifTrue:[ sep := '\\' withCRs ]. |
|
2272 |
||
2273 |
self compilerWarnMessageHolder value:('Warning: |
|
2274 |
||
2275 |
',warnMsg1,sep,warnMsg2). |
|
2276 |
self compilerWarnMessageVisibleHolder value:true. |
|
2277 |
] ifFalse:[ |
|
2278 |
self compilerWarnMessageVisibleHolder value:false |
|
2279 |
]. |
|
2280 |
! |
|
2281 |
||
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2282 |
enterContentsSpecification |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2283 |
|toAdd| |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2284 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2285 |
self updateListOfClassesInProject. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2286 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2287 |
toAdd := OrderedCollection new. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2288 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2289 |
"/ ensure that startup & app-class are in the list |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2290 |
selectedApplication notNil ifTrue:[ |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2291 |
(selectedProjectDefinition classNames includes:selectedApplication name) ifFalse:[ |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2292 |
toAdd add:selectedApplication. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2293 |
]. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2294 |
]. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2295 |
selectedStartupClass notNil ifTrue:[ |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2296 |
(selectedProjectDefinition classNames includes:selectedStartupClass name) ifFalse:[ |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2297 |
toAdd add:selectedStartupClass. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2298 |
]. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2299 |
]. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2300 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2301 |
selectedProjectDefinition includeClasses:toAdd usingCompiler:nil. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2302 |
|
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2303 |
self updateListOfClassesInProject. |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2304 |
! |
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2305 |
|
2676 | 2306 |
rememberMakeOutputsContents |
2307 |
makeOutputHolder value:(makeOutputWindow contents) |
|
2308 |
! |
|
2309 |
||
2724 | 2310 |
rememberProjectAttributes |
2311 |
self assert:selectedProjectDefinition notNil. |
|
2312 |
Class withoutUpdatingChangesDo:[ |
|
2313 |
self productNameHolder value ~= selectedProjectDefinition productName ifTrue:[ |
|
2314 |
selectedProjectDefinition class compile:(selectedProjectDefinition |
|
2315 |
productName_codeFor:(self productNameHolder value)). |
|
2316 |
]. |
|
2317 |
self companyNameHolder value ~= selectedProjectDefinition companyName ifTrue:[ |
|
2318 |
selectedProjectDefinition class compile:(selectedProjectDefinition |
|
2319 |
companyName_codeFor:(self companyNameHolder value)). |
|
2320 |
] |
|
2321 |
]. |
|
2322 |
! |
|
2323 |
||
2676 | 2324 |
restoreMakeOutputsContents |
2325 |
makeOutputWindow contents:makeOutputHolder value |
|
2646 | 2326 |
! |
2327 |
||
2676 | 2328 |
update:something with:anArgument from:changedObject |
2329 |
changedObject == Smalltalk ifTrue:[ |
|
2330 |
(something == #newClass |
|
2331 |
or:[something == #classRemove |
|
2332 |
or:[something == #projectOrganization]]) ifTrue:[ |
|
2333 |
self updateListOfMatchingProjects. |
|
2697 | 2334 |
self updateListOfNewProjectsName. |
2676 | 2335 |
^ self. |
2336 |
]. |
|
2337 |
^ self. |
|
2338 |
]. |
|
2339 |
super update:something with:anArgument from:changedObject |
|
2636 | 2340 |
! |
2341 |
||
2676 | 2342 |
updateApplicationComment |
2343 |
|comment| |
|
2636 | 2344 |
|
2676 | 2345 |
self selectedApplicationIndexHolder value notNil ifTrue:[ |
2346 |
comment := self commentFromClass:selectedApplication. |
|
2347 |
comment isNil ifTrue:[ |
|
2348 |
comment := 'Application has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
2349 |
]. |
|
2350 |
] ifFalse:[ |
|
2351 |
comment := 'Please select an Application' allItalic colorizeAllWith:Color lightGrey. |
|
2352 |
]. |
|
2353 |
self selectedApplicationsComment value:comment. |
|
2636 | 2354 |
! |
2355 |
||
2676 | 2356 |
updateComment |
2357 |
|comment| |
|
2636 | 2358 |
|
2676 | 2359 |
self selectedProjectIndexHolder value notNil ifTrue:[ |
2360 |
comment := self commentFromClass:selectedProjectDefinition. |
|
2361 |
comment isNil ifTrue:[ |
|
2362 |
comment := 'Project has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
2363 |
]. |
|
2364 |
] ifFalse:[ |
|
2365 |
comment := 'Please select a Project' allItalic colorizeAllWith:Color lightGrey. |
|
2366 |
]. |
|
2367 |
self selectedProjectsComment value:comment. |
|
2636 | 2368 |
! |
2369 |
||
2676 | 2370 |
updateListOfApplicationsInProject |
2371 |
|oldList applicationClasses package appClass appClassIndex| |
|
2636 | 2372 |
|
2649 | 2373 |
appClassIndex := nil. |
2374 |
||
2636 | 2375 |
selectedProjectDefinition isNil ifTrue:[ |
2376 |
applicationClasses := #() |
|
2377 |
] ifFalse:[ |
|
2378 |
package := selectedProjectDefinition package. |
|
2379 |
||
2380 |
applicationClasses := Smalltalk allClasses |
|
2381 |
select:[:cls | |
|
2671 | 2382 |
((cls isSubclassOf:ApplicationModel) |
2383 |
and:[ self hideOtherApplicationClasses value not |
|
2384 |
or:[ cls package = package ]]) |
|
2636 | 2385 |
]. |
2386 |
applicationClasses := applicationClasses asOrderedCollection. |
|
2387 |
applicationClasses sort:[:a :b | a name < b name]. |
|
2649 | 2388 |
|
2668 | 2389 |
"/ startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
2390 |
"/ startUpClassName notNil ifTrue:[ |
|
2391 |
"/ startUpClass := Smalltalk classNamed:startUpClassName. |
|
2392 |
"/ startUpClass notNil ifTrue:[ |
|
2393 |
"/ appClassIndex := applicationClasses indexOf:startUpClass. |
|
2394 |
"/ appClassIndex == 0 ifTrue:[ appClassIndex := nil ]. |
|
2395 |
"/ ]. |
|
2396 |
"/ ]. |
|
2636 | 2397 |
]. |
2649 | 2398 |
|
2668 | 2399 |
oldList := self listOfApplicationsInProject value. |
2400 |
oldList = applicationClasses ifFalse:[ |
|
2401 |
appClass := selectedApplication. |
|
2402 |
appClassIndex := applicationClasses indexOf:appClass. |
|
2403 |
appClassIndex == 0 ifTrue:[ appClassIndex := nil ]. |
|
2404 |
||
2405 |
self listOfApplicationsInProject value:applicationClasses. |
|
2406 |
self selectedApplicationIndexHolder value:appClassIndex. |
|
2407 |
]. |
|
2636 | 2408 |
! |
2409 |
||
2676 | 2410 |
updateListOfClassesInProject |
2411 |
self listOfClassesInProject value:(selectedProjectDefinition classNames). |
|
2412 |
! |
|
2636 | 2413 |
|
2676 | 2414 |
updateListOfMatchingProjects |
2719 | 2415 |
|query matching projectType idx| |
2676 | 2416 |
|
2417 |
projectType := self projectType. |
|
2719 | 2418 |
projectType == ProjectDefinition libraryType ifTrue:[ |
2419 |
query := #isLibraryDefinition |
|
2420 |
] ifFalse:[ |
|
2421 |
projectType == ProjectDefinition guiApplicationType ifTrue:[ |
|
2422 |
query := #isGUIApplication |
|
2423 |
] ifFalse:[ |
|
2424 |
projectType == ProjectDefinition nonGuiApplicationType ifTrue:[ |
|
2425 |
query := #isConsoleApplication |
|
2426 |
] ifFalse:[ |
|
2427 |
self error. |
|
2428 |
]. |
|
2429 |
]. |
|
2430 |
]. |
|
2431 |
||
2432 |
Class flushSubclassInfo. |
|
2433 |
||
2676 | 2434 |
matching := ProjectDefinition allSubclasses |
2435 |
select:[:defClass | |
|
2436 |
|match| |
|
2636 | 2437 |
|
2676 | 2438 |
match := false. |
2439 |
defClass isAbstract ifFalse:[ |
|
2440 |
(self hideSTXProjects value not |
|
2441 |
or:[ defClass package asPackageId module ~= 'stx' ]) |
|
2442 |
ifTrue:[ |
|
2719 | 2443 |
match := defClass perform:query |
2676 | 2444 |
]. |
2445 |
]. |
|
2446 |
]. |
|
2719 | 2447 |
|
2676 | 2448 |
matching sort:[:a :b | a name < b name]. |
2449 |
self listOfMatchingProjects value:matching. |
|
2686
5a19c21dada0
ensure starup and application are in the classList of the projectDef
Claus Gittinger <cg@exept.de>
parents:
2685
diff
changeset
|
2450 |
self listOfMatchingPackageIds value:(matching collect:[:def | def package]). |
2636 | 2451 |
|
2676 | 2452 |
idx := matching indexOf:selectedProjectDefinition. |
2453 |
idx == 0 ifTrue:[ |
|
2454 |
self selectedProjectIndexHolder value:nil. |
|
2455 |
] ifFalse:[ |
|
2456 |
self selectedProjectIndexHolder value:idx. |
|
2636 | 2457 |
]. |
2659 | 2458 |
! |
2459 |
||
2697 | 2460 |
updateListOfNewProjectsName |
2461 |
||
2462 |
|loadedProjectIDsWithoutProjectDefinition| |
|
2463 |
||
2464 |
loadedProjectIDsWithoutProjectDefinition := Smalltalk allLoadedProjectIDs |
|
2465 |
select:[:eachProjectID | |
|
2466 |
eachProjectID ~= PackageId noProjectID |
|
2467 |
and:[ (ProjectDefinition definitionClassForPackage: eachProjectID) isNil ]. |
|
2468 |
]. |
|
2469 |
self listOfNewProjectsName value:loadedProjectIDsWithoutProjectDefinition. |
|
2470 |
! |
|
2471 |
||
2659 | 2472 |
updateListOfStartupClassesInProject |
2473 |
|startupClasses package startUpClassName startUpClass startupClassIndex| |
|
2474 |
||
2475 |
startupClassIndex := nil. |
|
2476 |
self selectedStartupClassIndexHolder value:nil. |
|
2477 |
||
2478 |
selectedProjectDefinition isNil ifTrue:[ |
|
2479 |
startupClasses := #() |
|
2480 |
] ifFalse:[ |
|
2481 |
package := selectedProjectDefinition package. |
|
2482 |
||
2483 |
startupClasses := Smalltalk allClasses |
|
2484 |
select:[:cls | |
|
2671 | 2485 |
((cls includesBehavior:StandaloneStartup) |
2486 |
and:[ self hideOtherStartupClasses value not |
|
2487 |
or:[ cls package = package ]]) |
|
2674 | 2488 |
or:[ cls == Smalltalk |
2489 |
and:[ self hideOtherStartupClasses value not ] ] |
|
2659 | 2490 |
]. |
2491 |
startupClasses := startupClasses asOrderedCollection. |
|
2492 |
startupClasses sort:[:a :b | a name < b name]. |
|
2493 |
||
2494 |
startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
|
2495 |
startUpClassName notNil ifTrue:[ |
|
2496 |
startUpClass := Smalltalk classNamed:startUpClassName. |
|
2497 |
startUpClass notNil ifTrue:[ |
|
2498 |
startupClassIndex := startupClasses indexOf:startUpClass. |
|
2499 |
startupClassIndex == 0 ifTrue:[ startupClassIndex := nil ]. |
|
2500 |
]. |
|
2501 |
]. |
|
2502 |
]. |
|
2674 | 2503 |
|
2659 | 2504 |
self listOfStartupClassesInProject value:startupClasses. |
2505 |
self selectedStartupClassIndexHolder value:startupClassIndex. |
|
2724 | 2506 |
! |
2507 |
||
2508 |
updateProjectAttributes |
|
2509 |
self assert:selectedProjectDefinition notNil. |
|
2510 |
self productNameHolder value:(selectedProjectDefinition productName). |
|
2511 |
self companyNameHolder value:(selectedProjectDefinition companyName). |
|
2636 | 2512 |
! ! |
2513 |
||
2514 |
!ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
|
2515 |
||
2516 |
version_CVS |
|
2517 |
^ '$Header$' |
|
2518 |
! ! |