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