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