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