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