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