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