|
1 "{ Package: 'stx:libtool2' }" |
|
2 |
|
3 "{ NameSpace: Tools }" |
|
4 |
|
5 AssistantApplication subclass:#ProjectBuilderAssistantApplication |
|
6 instanceVariableNames:'packageToBuildHolder projectType selectedProjectIndexHolder |
|
7 selectedProjectDefinition listOfMatchingProjects |
|
8 selectedProjectsComment newProjectsName hideSTXProjects |
|
9 startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
|
10 newApplicationsName selectedApplicationIndexHolder |
|
11 selectedApplication listOfApplicationsInProject |
|
12 selectedApplicationsComment buildDirectoryHolder makeProcess |
|
13 listOfClassesInProject' |
|
14 classVariableNames:'' |
|
15 poolDictionaries:'' |
|
16 category:'System-Support-Projects' |
|
17 ! |
|
18 |
|
19 |
|
20 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'! |
|
21 |
|
22 _1_projectTypeSelectionSpec |
|
23 "This resource specification was automatically generated |
|
24 by the UIPainter of ST/X." |
|
25 |
|
26 "Do not manually edit this!! If it is corrupted, |
|
27 the UIPainter may not be able to read the specification." |
|
28 |
|
29 " |
|
30 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_1_projectTypeSelectionSpec |
|
31 ProjectBuilderAssistantApplication new openInterface:#_1_projectTypeSelectionSpec |
|
32 " |
|
33 |
|
34 <resource: #canvas> |
|
35 |
|
36 ^ |
|
37 #(FullSpec |
|
38 name: #'_1_projectTypeSelectionSpec' |
|
39 window: |
|
40 (WindowSpec |
|
41 label: 'Project Selection' |
|
42 name: 'Project Selection' |
|
43 min: (Point 0 0) |
|
44 bounds: (Rectangle 0 0 626 394) |
|
45 ) |
|
46 component: |
|
47 (SpecCollection |
|
48 collection: ( |
|
49 (FramedBoxSpec |
|
50 label: 'Project Type Filter' |
|
51 name: 'FramedBox1' |
|
52 layout: (LayoutFrame 0 0.0 0 0 4 1.0 105 0) |
|
53 labelPosition: topLeft |
|
54 translateLabel: true |
|
55 component: |
|
56 (SpecCollection |
|
57 collection: ( |
|
58 (VerticalPanelViewSpec |
|
59 name: 'VerticalPanel1' |
|
60 layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
61 horizontalLayout: leftSpace |
|
62 verticalLayout: topSpace |
|
63 horizontalSpace: 3 |
|
64 verticalSpace: 3 |
|
65 component: |
|
66 (SpecCollection |
|
67 collection: ( |
|
68 (ViewSpec |
|
69 name: 'Box1' |
|
70 extent: (Point 10 10) |
|
71 ) |
|
72 (RadioButtonSpec |
|
73 label: 'GUI Application' |
|
74 name: 'RadioButton1' |
|
75 translateLabel: true |
|
76 model: projectType |
|
77 isTriggerOnDown: true |
|
78 onCallBackSelector: projectTypeChanged |
|
79 select: guiApplicationType |
|
80 extent: (Point 136 22) |
|
81 ) |
|
82 (RadioButtonSpec |
|
83 label: 'Non-GUI Application' |
|
84 name: 'RadioButton2' |
|
85 translateLabel: true |
|
86 model: projectType |
|
87 isTriggerOnDown: true |
|
88 onCallBackSelector: projectTypeChanged |
|
89 select: nonGuiApplicationType |
|
90 extent: (Point 136 22) |
|
91 ) |
|
92 (RadioButtonSpec |
|
93 label: 'Class Library' |
|
94 name: 'RadioButton3' |
|
95 translateLabel: true |
|
96 model: projectType |
|
97 isTriggerOnDown: true |
|
98 onCallBackSelector: projectTypeChanged |
|
99 select: libraryType |
|
100 extent: (Point 136 22) |
|
101 ) |
|
102 ) |
|
103 |
|
104 ) |
|
105 ) |
|
106 ) |
|
107 |
|
108 ) |
|
109 ) |
|
110 (FramedBoxSpec |
|
111 label: 'Existing Projects' |
|
112 name: 'FramedBox2' |
|
113 layout: (LayoutFrame 0 0.0 105 0 4 1.0 397 0) |
|
114 labelPosition: topLeft |
|
115 translateLabel: true |
|
116 component: |
|
117 (SpecCollection |
|
118 collection: ( |
|
119 (VariableHorizontalPanelSpec |
|
120 name: 'VariableHorizontalPanel1' |
|
121 layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
122 component: |
|
123 (SpecCollection |
|
124 collection: ( |
|
125 (SequenceViewSpec |
|
126 name: 'List1' |
|
127 model: selectedProjectIndexHolder |
|
128 hasHorizontalScrollBar: true |
|
129 hasVerticalScrollBar: true |
|
130 useIndex: true |
|
131 sequenceList: listOfMatchingProjects |
|
132 ) |
|
133 (TextEditorSpec |
|
134 name: 'TextEditor1' |
|
135 model: selectedProjectsComment |
|
136 hasHorizontalScrollBar: true |
|
137 hasVerticalScrollBar: true |
|
138 isReadOnly: true |
|
139 hasKeyboardFocusInitially: false |
|
140 ) |
|
141 ) |
|
142 |
|
143 ) |
|
144 handles: (Any 0.34560327198364 1.0) |
|
145 ) |
|
146 (CheckBoxSpec |
|
147 label: 'Hide ST/X Base Packages' |
|
148 name: 'CheckBox1' |
|
149 layout: (LayoutFrame -1 0 -18 1 275 0 4 1) |
|
150 model: hideSTXProjects |
|
151 translateLabel: true |
|
152 ) |
|
153 ) |
|
154 |
|
155 ) |
|
156 ) |
|
157 ) |
|
158 |
|
159 ) |
|
160 ) |
|
161 ! |
|
162 |
|
163 _2_projectSelectionSpec |
|
164 "This resource specification was automatically generated |
|
165 by the UIPainter of ST/X." |
|
166 |
|
167 "Do not manually edit this!! If it is corrupted, |
|
168 the UIPainter may not be able to read the specification." |
|
169 |
|
170 " |
|
171 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_2_projectSelectionSpec |
|
172 ProjectBuilderAssistantApplication new openInterface:#_2_projectSelectionSpec |
|
173 " |
|
174 |
|
175 <resource: #canvas> |
|
176 |
|
177 ^ |
|
178 #(FullSpec |
|
179 name: #'_2_projectSelectionSpec' |
|
180 window: |
|
181 (WindowSpec |
|
182 label: 'Project Selection' |
|
183 name: 'Project Selection' |
|
184 min: (Point 0 0) |
|
185 bounds: (Rectangle 0 0 521 453) |
|
186 ) |
|
187 component: |
|
188 (SpecCollection |
|
189 collection: ( |
|
190 (FramedBoxSpec |
|
191 label: 'New Project' |
|
192 name: 'FramedBox3' |
|
193 layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0) |
|
194 labelPosition: topLeft |
|
195 translateLabel: true |
|
196 component: |
|
197 (SpecCollection |
|
198 collection: ( |
|
199 (InputFieldSpec |
|
200 name: 'EntryField1' |
|
201 layout: (LayoutFrame 1 0 6 0 210 0 28 0) |
|
202 model: newProjectsName |
|
203 acceptOnReturn: true |
|
204 acceptOnTab: true |
|
205 acceptOnPointerLeave: true |
|
206 emptyFieldReplacementText: 'module:directory' |
|
207 ) |
|
208 (ActionButtonSpec |
|
209 label: 'Create' |
|
210 name: 'Button1' |
|
211 layout: (LayoutFrame 216 0 6 0 341 0 28 0) |
|
212 translateLabel: true |
|
213 model: createNewProject |
|
214 ) |
|
215 ) |
|
216 |
|
217 ) |
|
218 ) |
|
219 (FramedBoxSpec |
|
220 label: 'Existing Projects' |
|
221 name: 'FramedBox4' |
|
222 layout: (LayoutFrame 0 0.0 70 0 4 1.0 362 0) |
|
223 labelPosition: topLeft |
|
224 translateLabel: true |
|
225 component: |
|
226 (SpecCollection |
|
227 collection: ( |
|
228 (VariableHorizontalPanelSpec |
|
229 name: 'VariableHorizontalPanel2' |
|
230 layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
231 component: |
|
232 (SpecCollection |
|
233 collection: ( |
|
234 (SequenceViewSpec |
|
235 name: 'List2' |
|
236 model: selectedProjectIndexHolder |
|
237 hasHorizontalScrollBar: true |
|
238 hasVerticalScrollBar: true |
|
239 useIndex: true |
|
240 sequenceList: listOfMatchingProjects |
|
241 ) |
|
242 (TextEditorSpec |
|
243 name: 'TextEditor2' |
|
244 model: selectedProjectsComment |
|
245 hasHorizontalScrollBar: true |
|
246 hasVerticalScrollBar: true |
|
247 isReadOnly: true |
|
248 hasKeyboardFocusInitially: false |
|
249 viewClassName: 'TextView' |
|
250 ) |
|
251 ) |
|
252 |
|
253 ) |
|
254 handles: (Any 0.34560327198364 1.0) |
|
255 ) |
|
256 (CheckBoxSpec |
|
257 label: 'Hide ST/X Base Packages' |
|
258 name: 'CheckBox1' |
|
259 layout: (LayoutFrame -1 0 -17 1 275 0 5 1) |
|
260 model: hideSTXProjects |
|
261 translateLabel: true |
|
262 ) |
|
263 ) |
|
264 |
|
265 ) |
|
266 ) |
|
267 (ActionButtonSpec |
|
268 label: 'Browse Selected Project' |
|
269 name: 'Button3' |
|
270 layout: (LayoutFrame 9 0 363 0 189 0 385 0) |
|
271 translateLabel: true |
|
272 model: doBrowseProject |
|
273 ) |
|
274 ) |
|
275 |
|
276 ) |
|
277 ) |
|
278 ! |
|
279 |
|
280 _3_applicationSelectionSpec |
|
281 "This resource specification was automatically generated |
|
282 by the UIPainter of ST/X." |
|
283 |
|
284 "Do not manually edit this!! If it is corrupted, |
|
285 the UIPainter may not be able to read the specification." |
|
286 |
|
287 " |
|
288 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_3_applicationSelectionSpec |
|
289 ProjectBuilderAssistantApplication new openInterface:#_3_applicationSelectionSpec |
|
290 " |
|
291 |
|
292 <resource: #canvas> |
|
293 |
|
294 ^ |
|
295 #(FullSpec |
|
296 name: #'_3_applicationSelectionSpec' |
|
297 window: |
|
298 (WindowSpec |
|
299 label: 'Application Selection' |
|
300 name: 'Application Selection' |
|
301 min: (Point 0 0) |
|
302 bounds: (Rectangle 0 0 521 408) |
|
303 ) |
|
304 component: |
|
305 (SpecCollection |
|
306 collection: ( |
|
307 (FramedBoxSpec |
|
308 label: 'New Application' |
|
309 name: 'FramedBox3' |
|
310 layout: (LayoutFrame 0 0.0 5 0 4 1.0 105 0) |
|
311 labelPosition: topLeft |
|
312 translateLabel: true |
|
313 component: |
|
314 (SpecCollection |
|
315 collection: ( |
|
316 (InputFieldSpec |
|
317 name: 'EntryField1' |
|
318 layout: (LayoutFrame 1 0 6 0 210 0 28 0) |
|
319 model: newApplicationsName |
|
320 acceptOnReturn: true |
|
321 acceptOnTab: true |
|
322 acceptOnPointerLeave: true |
|
323 emptyFieldReplacementText: 'MyApplication' |
|
324 ) |
|
325 (ActionButtonSpec |
|
326 label: 'Create' |
|
327 name: 'Button1' |
|
328 layout: (LayoutFrame 216 0 6 0 341 0 28 0) |
|
329 translateLabel: true |
|
330 model: createNewApplication |
|
331 ) |
|
332 ) |
|
333 |
|
334 ) |
|
335 ) |
|
336 (FramedBoxSpec |
|
337 label: 'Existing Applications' |
|
338 name: 'FramedBox4' |
|
339 layout: (LayoutFrame 0 0.0 105 0 4 1.0 362 0) |
|
340 labelPosition: topLeft |
|
341 translateLabel: true |
|
342 component: |
|
343 (SpecCollection |
|
344 collection: ( |
|
345 (VariableHorizontalPanelSpec |
|
346 name: 'VariableHorizontalPanel2' |
|
347 layout: (LayoutFrame 0 0 4 0 0 1 0 1) |
|
348 component: |
|
349 (SpecCollection |
|
350 collection: ( |
|
351 (SequenceViewSpec |
|
352 name: 'List2' |
|
353 model: selectedApplicationIndexHolder |
|
354 hasHorizontalScrollBar: true |
|
355 hasVerticalScrollBar: true |
|
356 useIndex: true |
|
357 sequenceList: listOfApplicationsInProject |
|
358 ) |
|
359 (TextEditorSpec |
|
360 name: 'TextEditor2' |
|
361 model: selectedApplicationsComment |
|
362 hasHorizontalScrollBar: true |
|
363 hasVerticalScrollBar: true |
|
364 isReadOnly: true |
|
365 hasKeyboardFocusInitially: false |
|
366 viewClassName: 'TextView' |
|
367 ) |
|
368 ) |
|
369 |
|
370 ) |
|
371 handles: (Any 0.34560327198364 1.0) |
|
372 ) |
|
373 ) |
|
374 |
|
375 ) |
|
376 ) |
|
377 (ActionButtonSpec |
|
378 label: 'Browse Selected Application' |
|
379 name: 'Button3' |
|
380 layout: (LayoutFrame 9 0 363 0 189 0 385 0) |
|
381 translateLabel: true |
|
382 model: doBrowseApplication |
|
383 ) |
|
384 ) |
|
385 |
|
386 ) |
|
387 ) |
|
388 ! |
|
389 |
|
390 _4_specifyIncludedClasses |
|
391 "This resource specification was automatically generated |
|
392 by the UIPainter of ST/X." |
|
393 |
|
394 "Do not manually edit this!! If it is corrupted, |
|
395 the UIPainter may not be able to read the specification." |
|
396 |
|
397 " |
|
398 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_4_specifyIncludedClasses |
|
399 ProjectBuilderAssistantApplication new openInterface:#_4_specifyIncludedClasses |
|
400 " |
|
401 |
|
402 <resource: #canvas> |
|
403 |
|
404 ^ |
|
405 #(FullSpec |
|
406 name: #'_4_specifyIncludedClasses' |
|
407 window: |
|
408 (WindowSpec |
|
409 label: 'Project Selection' |
|
410 name: 'Project Selection' |
|
411 min: (Point 0 0) |
|
412 bounds: (Rectangle 0 0 521 400) |
|
413 ) |
|
414 component: |
|
415 (SpecCollection |
|
416 collection: ( |
|
417 (FramedBoxSpec |
|
418 label: 'Project Contents' |
|
419 name: 'FramedBox3' |
|
420 layout: (LayoutFrame 0 0.0 5 0 4 1.0 362 0) |
|
421 labelPosition: topLeft |
|
422 translateLabel: true |
|
423 component: |
|
424 (SpecCollection |
|
425 collection: ( |
|
426 (SequenceViewSpec |
|
427 name: 'List1' |
|
428 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
429 initiallyDisabled: true |
|
430 hasHorizontalScrollBar: true |
|
431 hasVerticalScrollBar: true |
|
432 useIndex: false |
|
433 sequenceList: listOfClassesInProject |
|
434 ) |
|
435 ) |
|
436 |
|
437 ) |
|
438 ) |
|
439 (ActionButtonSpec |
|
440 label: 'Browse Project Definition' |
|
441 name: 'Button3' |
|
442 layout: (LayoutFrame 9 0 363 0 189 0 385 0) |
|
443 translateLabel: true |
|
444 model: doBrowseProject |
|
445 ) |
|
446 (ActionButtonSpec |
|
447 label: 'Update Contents (Scan)' |
|
448 name: 'Button4' |
|
449 layout: (LayoutFrame 293 0 363 0 473 0 385 0) |
|
450 translateLabel: true |
|
451 model: doUpdateProjectContents |
|
452 ) |
|
453 ) |
|
454 |
|
455 ) |
|
456 ) |
|
457 ! |
|
458 |
|
459 _5_specifyBuildDirectorySpec |
|
460 "This resource specification was automatically generated |
|
461 by the UIPainter of ST/X." |
|
462 |
|
463 "Do not manually edit this!! If it is corrupted, |
|
464 the UIPainter may not be able to read the specification." |
|
465 |
|
466 " |
|
467 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_5_specifyBuildDirectorySpec |
|
468 ProjectBuilderAssistantApplication new openInterface:#_5_specifyBuildDirectorySpec |
|
469 " |
|
470 |
|
471 <resource: #canvas> |
|
472 |
|
473 ^ |
|
474 #(FullSpec |
|
475 name: #'_5_specifyBuildDirectorySpec' |
|
476 window: |
|
477 (WindowSpec |
|
478 label: 'Project Selection' |
|
479 name: 'Project Selection' |
|
480 min: (Point 0 0) |
|
481 bounds: (Rectangle 0 0 521 104) |
|
482 ) |
|
483 component: |
|
484 (SpecCollection |
|
485 collection: ( |
|
486 (FramedBoxSpec |
|
487 label: 'Build Directory' |
|
488 name: 'FramedBox3' |
|
489 layout: (LayoutFrame 0 0.0 5 0 4 1.0 79 0) |
|
490 labelPosition: topLeft |
|
491 translateLabel: true |
|
492 component: |
|
493 (SpecCollection |
|
494 collection: ( |
|
495 (FilenameInputFieldSpec |
|
496 name: 'FilenameEntryField1' |
|
497 layout: (LayoutFrame 0 0.0 10 0 0 1.0 32 0) |
|
498 model: buildDirectoryHolder |
|
499 acceptOnPointerLeave: true |
|
500 viewClassName: FilenameWidgetWithHistory |
|
501 ) |
|
502 ) |
|
503 |
|
504 ) |
|
505 ) |
|
506 ) |
|
507 |
|
508 ) |
|
509 ) |
|
510 ! |
|
511 |
|
512 _6_buildSpec |
|
513 "This resource specification was automatically generated |
|
514 by the UIPainter of ST/X." |
|
515 |
|
516 "Do not manually edit this!! If it is corrupted, |
|
517 the UIPainter may not be able to read the specification." |
|
518 |
|
519 " |
|
520 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_6_buildSpec |
|
521 ProjectBuilderAssistantApplication new openInterface:#_6_buildSpec |
|
522 " |
|
523 |
|
524 <resource: #canvas> |
|
525 |
|
526 ^ |
|
527 #(FullSpec |
|
528 name: #'_6_buildSpec' |
|
529 window: |
|
530 (WindowSpec |
|
531 label: 'Project Selection' |
|
532 name: 'Project Selection' |
|
533 min: (Point 0 0) |
|
534 bounds: (Rectangle 0 0 521 472) |
|
535 ) |
|
536 component: |
|
537 (SpecCollection |
|
538 collection: ( |
|
539 (FramedBoxSpec |
|
540 label: 'Make Output' |
|
541 name: 'FramedBox3' |
|
542 layout: (LayoutFrame 0 0.0 5 0 4 1.0 -46 1) |
|
543 labelPosition: topLeft |
|
544 translateLabel: true |
|
545 component: |
|
546 (SpecCollection |
|
547 collection: ( |
|
548 (TextEditorSpec |
|
549 name: 'TextEditor3' |
|
550 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
551 model: makeOutputHolder |
|
552 hasHorizontalScrollBar: true |
|
553 hasVerticalScrollBar: true |
|
554 hasKeyboardFocusInitially: false |
|
555 viewClassName: 'TextCollector' |
|
556 ) |
|
557 ) |
|
558 |
|
559 ) |
|
560 ) |
|
561 (ActionButtonSpec |
|
562 label: 'Start Make' |
|
563 name: 'Button3' |
|
564 layout: (LayoutFrame 9 0 -42 1 116 0 -20 1) |
|
565 translateLabel: true |
|
566 model: doStartMake |
|
567 enableChannel: startMakeButtonEnabled |
|
568 ) |
|
569 (ActionButtonSpec |
|
570 label: 'Stop Make' |
|
571 name: 'Button4' |
|
572 layout: (LayoutFrame 131 0 -42 1 238 0 -20 1) |
|
573 visibilityChannel: stopMakeButtonVisible |
|
574 translateLabel: true |
|
575 model: doStopMake |
|
576 ) |
|
577 ) |
|
578 |
|
579 ) |
|
580 ) |
|
581 ! |
|
582 |
|
583 _7_deploySpec |
|
584 "This resource specification was automatically generated |
|
585 by the UIPainter of ST/X." |
|
586 |
|
587 "Do not manually edit this!! If it is corrupted, |
|
588 the UIPainter may not be able to read the specification." |
|
589 |
|
590 " |
|
591 UIPainter new openOnClass:ProjectBuilderAssistantApplication andSelector:#_7_deploySpec |
|
592 ProjectBuilderAssistantApplication new openInterface:#_7_deploySpec |
|
593 " |
|
594 |
|
595 <resource: #canvas> |
|
596 |
|
597 ^ |
|
598 #(FullSpec |
|
599 name: #'_7_deploySpec' |
|
600 window: |
|
601 (WindowSpec |
|
602 label: 'Project Selection' |
|
603 name: 'Project Selection' |
|
604 min: (Point 0 0) |
|
605 bounds: (Rectangle 0 0 521 472) |
|
606 ) |
|
607 component: |
|
608 (SpecCollection |
|
609 collection: ( |
|
610 (FramedBoxSpec |
|
611 label: 'New Project' |
|
612 name: 'FramedBox3' |
|
613 layout: (LayoutFrame 0 0.0 5 0 4 1.0 105 0) |
|
614 labelPosition: topLeft |
|
615 translateLabel: true |
|
616 component: |
|
617 (SpecCollection |
|
618 collection: ( |
|
619 (InputFieldSpec |
|
620 name: 'EntryField1' |
|
621 layout: (LayoutFrame 1 0 6 0 210 0 28 0) |
|
622 model: newProjectsName |
|
623 acceptOnReturn: true |
|
624 acceptOnTab: true |
|
625 acceptOnPointerLeave: true |
|
626 emptyFieldReplacementText: 'module:directory' |
|
627 ) |
|
628 (ActionButtonSpec |
|
629 label: 'Create' |
|
630 name: 'Button1' |
|
631 layout: (LayoutFrame 216 0 6 0 341 0 28 0) |
|
632 translateLabel: true |
|
633 model: createNewProject |
|
634 ) |
|
635 ) |
|
636 |
|
637 ) |
|
638 ) |
|
639 (FramedBoxSpec |
|
640 label: 'Existing Projects' |
|
641 name: 'FramedBox4' |
|
642 layout: (LayoutFrame 0 0.0 105 0 4 1.0 397 0) |
|
643 labelPosition: topLeft |
|
644 translateLabel: true |
|
645 component: |
|
646 (SpecCollection |
|
647 collection: ( |
|
648 (VariableHorizontalPanelSpec |
|
649 name: 'VariableHorizontalPanel2' |
|
650 layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
651 component: |
|
652 (SpecCollection |
|
653 collection: ( |
|
654 (SequenceViewSpec |
|
655 name: 'List2' |
|
656 model: selectedProjectIndexHolder |
|
657 hasHorizontalScrollBar: true |
|
658 hasVerticalScrollBar: true |
|
659 useIndex: true |
|
660 sequenceList: listOfMatchingProjects |
|
661 ) |
|
662 (TextEditorSpec |
|
663 name: 'TextEditor2' |
|
664 model: selectedProjectsComment |
|
665 hasHorizontalScrollBar: true |
|
666 hasVerticalScrollBar: true |
|
667 isReadOnly: true |
|
668 hasKeyboardFocusInitially: false |
|
669 ) |
|
670 ) |
|
671 |
|
672 ) |
|
673 handles: (Any 0.34560327198364 1.0) |
|
674 ) |
|
675 (CheckBoxSpec |
|
676 label: 'Hide ST/X Base Packages' |
|
677 name: 'CheckBox1' |
|
678 layout: (LayoutFrame -1 0 241 0 275 0 263 0) |
|
679 model: hideSTXProjects |
|
680 translateLabel: true |
|
681 ) |
|
682 ) |
|
683 |
|
684 ) |
|
685 ) |
|
686 (ActionButtonSpec |
|
687 label: 'Browse Selected Project' |
|
688 name: 'Button3' |
|
689 layout: (LayoutFrame 9 0 410 0 189 0 432 0) |
|
690 translateLabel: true |
|
691 model: doBrowseProject |
|
692 ) |
|
693 ) |
|
694 |
|
695 ) |
|
696 ) |
|
697 ! ! |
|
698 |
|
699 !ProjectBuilderAssistantApplication methodsFor:'actions'! |
|
700 |
|
701 buildDirectoryChanged |
|
702 self updateButtonEnableState. |
|
703 ! |
|
704 |
|
705 createNewApplication |
|
706 <resource: #uiCallback> |
|
707 |
|
708 |newAppName newAppClass| |
|
709 |
|
710 newAppName := self newApplicationsName value. |
|
711 newAppName isEmptyOrNil ifTrue:[ |
|
712 Dialog warn:'Please enter the name of the Application-Class first.'. |
|
713 ^ self |
|
714 ]. |
|
715 |
|
716 Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
717 do:[ |
|
718 newAppClass := ApplicationModel |
|
719 subclass:newAppName asSymbol |
|
720 instanceVariableNames:'' |
|
721 classVariableNames:'' |
|
722 poolDictionaries:'' |
|
723 category:'Applications'. |
|
724 CodeGeneratorTool createApplicationCodeFor:newAppClass. |
|
725 ]. |
|
726 self updateListOfApplicationsInProject |
|
727 ! |
|
728 |
|
729 createNewProject |
|
730 <resource: #uiCallback> |
|
731 |
|
732 |newProjectID projectDefinitionType projectDefinitionClass projectClasses| |
|
733 |
|
734 newProjectID := self newProjectsName value. |
|
735 newProjectID isEmptyOrNil ifTrue:[ |
|
736 Dialog warn:'Please enter a packageID first.'. |
|
737 ^ self |
|
738 ]. |
|
739 |
|
740 projectDefinitionType := ProjectDefinition perform:(self projectType value). |
|
741 |
|
742 |
|
743 projectDefinitionClass := ProjectDefinition |
|
744 definitionClassForPackage:newProjectID |
|
745 projectType: projectDefinitionType |
|
746 createIfAbsent:true. |
|
747 |
|
748 projectDefinitionClass compileDescriptionMethods. |
|
749 self updateListOfMatchingProjects. |
|
750 |
|
751 self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass). |
|
752 |
|
753 projectClasses := projectDefinitionClass allClassNames |
|
754 collect:[:nm |Smalltalk classNamed:nm]. |
|
755 |
|
756 projectDefinitionClass isGUIApplication ifTrue:[ |
|
757 "/ see if it has an AppModel class |
|
758 (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[ |
|
759 (Dialog confirm:'Create an Application Class ?') ifTrue:[ |
|
760 self halt. |
|
761 ]. |
|
762 ]. |
|
763 ]. |
|
764 |
|
765 "/ projectDefinitionClass isLibrary ifFalse:[ |
|
766 "/ "/ see if it has a Startup class |
|
767 "/ (projectClasses contains:[:cls | cls isStartable]) ifFalse:[ |
|
768 "/ ]. |
|
769 "/ ]. |
|
770 ! |
|
771 |
|
772 doAddClassToProject |
|
773 <resource: #uiCallback> |
|
774 |
|
775 Transcript showCR:self class name, ': action for doAddClassToProject ...'. |
|
776 self halt. |
|
777 ! |
|
778 |
|
779 doBrowseApplication |
|
780 <resource: #uiCallback> |
|
781 |
|
782 |appClass| |
|
783 |
|
784 appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
785 UserPreferences systemBrowserClass openInClass:appClass. |
|
786 ! |
|
787 |
|
788 doBrowseProject |
|
789 <resource: #uiCallback> |
|
790 |
|
791 UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package. |
|
792 ! |
|
793 |
|
794 doStartMake |
|
795 <resource: #uiCallback> |
|
796 |
|
797 self stopMakeButtonVisible value:true. |
|
798 self startMakeButtonEnabled value:false. |
|
799 |
|
800 makeProcess := |
|
801 [ |
|
802 [ |
|
803 self runBuildProcess |
|
804 ] ensure:[ |
|
805 self stopMakeButtonVisible value:false. |
|
806 self startMakeButtonEnabled value:true. |
|
807 ]. |
|
808 ] newProcess. |
|
809 |
|
810 makeProcess priority:4. |
|
811 makeProcess priorityRange:(4 to:8). |
|
812 makeProcess resume. |
|
813 ! |
|
814 |
|
815 doUpdateProjectContents |
|
816 self updatePackageContentsMethods |
|
817 ! |
|
818 |
|
819 projectTypeChanged |
|
820 <resource: #uiCallback> |
|
821 |
|
822 self updateListOfMatchingProjects |
|
823 ! |
|
824 |
|
825 runBuildProcess |
|
826 <resource: #uiCallback> |
|
827 |
|
828 Delay waitForSeconds:10 |
|
829 ! |
|
830 |
|
831 selectedApplicationChanged |
|
832 self selectedApplicationIndexHolder value isNil ifTrue:[ |
|
833 selectedApplication := nil. |
|
834 ] ifFalse:[ |
|
835 selectedApplication := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
836 ]. |
|
837 self updateApplicationComment. |
|
838 self updateButtonEnableState. |
|
839 ! |
|
840 |
|
841 selectedProjectChanged |
|
842 self selectedProjectIndexHolder value isNil ifTrue:[ |
|
843 selectedProjectDefinition := nil. |
|
844 ] ifFalse:[ |
|
845 selectedProjectDefinition := self listOfMatchingProjects value at:(self selectedProjectIndexHolder value). |
|
846 ]. |
|
847 self updateComment. |
|
848 self updateListOfApplicationsInProject. |
|
849 self updateButtonEnableState. |
|
850 ! |
|
851 |
|
852 updatePackageContentsMethods |
|
853 <resource: #uiCallback> |
|
854 |
|
855 Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
856 do:[ |
|
857 selectedProjectDefinition |
|
858 forEachContentsMethodsCodeToCompileDo:[:code :category | |
|
859 CodeGeneratorTool |
|
860 compile:code |
|
861 forClass:selectedProjectDefinition theMetaclass |
|
862 inCategory:category. |
|
863 ] |
|
864 ignoreOldDefinition:true |
|
865 ]. |
|
866 ! ! |
|
867 |
|
868 !ProjectBuilderAssistantApplication methodsFor:'aspects'! |
|
869 |
|
870 buildDirectoryHolder |
|
871 <resource: #uiAspect> |
|
872 |
|
873 |buildDirectory| |
|
874 |
|
875 buildDirectoryHolder isNil ifTrue:[ |
|
876 buildDirectoryHolder := nil asValue. |
|
877 buildDirectoryHolder onChangeSend:#buildDirectoryChanged to:self. |
|
878 ]. |
|
879 buildDirectoryHolder value isEmptyOrNil ifTrue:[ |
|
880 buildDirectory := Tools::ProjectBuilder previousBuildDirectory. |
|
881 buildDirectory isNil ifTrue:[ |
|
882 buildDirectory := UserPreferences current buildDirectory. |
|
883 buildDirectory isNil ifTrue:[ |
|
884 buildDirectory := Filename tempDirectory construct:'stx_build'. |
|
885 ]. |
|
886 ]. |
|
887 buildDirectoryHolder value: buildDirectory. |
|
888 ]. |
|
889 ^ buildDirectoryHolder. |
|
890 ! |
|
891 |
|
892 hasBuildDirectorySpecified |
|
893 ^ self buildDirectoryHolder value notEmptyOrNil |
|
894 ! |
|
895 |
|
896 hasProjectSelected |
|
897 ^ self selectedProjectIndexHolder value notNil |
|
898 ! |
|
899 |
|
900 hideSTXProjects |
|
901 <resource: #uiAspect> |
|
902 |
|
903 hideSTXProjects isNil ifTrue:[ |
|
904 hideSTXProjects := true asValue. |
|
905 hideSTXProjects onChangeSend:#updateListOfMatchingProjects to:self. |
|
906 ]. |
|
907 ^ hideSTXProjects. |
|
908 ! |
|
909 |
|
910 listOfApplicationsInProject |
|
911 <resource: #uiAspect> |
|
912 |
|
913 listOfApplicationsInProject isNil ifTrue:[ |
|
914 listOfApplicationsInProject := ValueHolder new. |
|
915 ]. |
|
916 ^ listOfApplicationsInProject. |
|
917 ! |
|
918 |
|
919 listOfClassesInProject |
|
920 <resource: #uiAspect> |
|
921 |
|
922 listOfClassesInProject isNil ifTrue:[ |
|
923 listOfClassesInProject := ValueHolder new. |
|
924 ]. |
|
925 ^ listOfClassesInProject. |
|
926 ! |
|
927 |
|
928 listOfMatchingProjects |
|
929 <resource: #uiAspect> |
|
930 |
|
931 listOfMatchingProjects isNil ifTrue:[ |
|
932 listOfMatchingProjects := ValueHolder new. |
|
933 ]. |
|
934 ^ listOfMatchingProjects. |
|
935 ! |
|
936 |
|
937 makeOutputHolder |
|
938 <resource: #uiAspect> |
|
939 |
|
940 "automatically generated by UIPainter ..." |
|
941 |
|
942 "*** the code below creates a default model when invoked." |
|
943 "*** (which may not be the one you wanted)" |
|
944 "*** Please change as required and accept it in the browser." |
|
945 "*** (and replace this comment by something more useful ;-)" |
|
946 |
|
947 makeOutputHolder isNil ifTrue:[ |
|
948 makeOutputHolder := '' asValue. |
|
949 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
950 "/ makeOutputHolder addDependent:self. |
|
951 "/ makeOutputHolder onChangeSend:#makeOutputHolderChanged to:self. |
|
952 ]. |
|
953 ^ makeOutputHolder. |
|
954 ! |
|
955 |
|
956 newApplicationsName |
|
957 <resource: #uiAspect> |
|
958 |
|
959 "automatically generated by UIPainter ..." |
|
960 |
|
961 "*** the code below creates a default model when invoked." |
|
962 "*** (which may not be the one you wanted)" |
|
963 "*** Please change as required and accept it in the browser." |
|
964 "*** (and replace this comment by something more useful ;-)" |
|
965 |
|
966 newApplicationsName isNil ifTrue:[ |
|
967 newApplicationsName := ValueHolder new. |
|
968 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
969 "/ newApplicationsName addDependent:self. |
|
970 "/ newApplicationsName onChangeSend:#newApplicationsNameChanged to:self. |
|
971 ]. |
|
972 ^ newApplicationsName. |
|
973 ! |
|
974 |
|
975 newProjectsName |
|
976 <resource: #uiAspect> |
|
977 |
|
978 newProjectsName isNil ifTrue:[ |
|
979 newProjectsName := nil asValue. |
|
980 ]. |
|
981 ^ newProjectsName. |
|
982 ! |
|
983 |
|
984 projectType |
|
985 <resource: #uiAspect> |
|
986 |
|
987 projectType isNil ifTrue:[ |
|
988 projectType := RadioButtonGroup new. |
|
989 projectType value:#guiApplicationType. |
|
990 ]. |
|
991 ^ projectType. |
|
992 ! |
|
993 |
|
994 projectTypeIsNotLibrary |
|
995 ^ self projectType value ~~ #libraryType |
|
996 ! |
|
997 |
|
998 selectedApplication |
|
999 <resource: #uiAspect> |
|
1000 |
|
1001 selectedApplication isNil ifTrue:[ |
|
1002 selectedApplication := ValueHolder new. |
|
1003 selectedApplication onChangeSend:#selectedApplicationChanged to:self. |
|
1004 ]. |
|
1005 ^ selectedApplication. |
|
1006 ! |
|
1007 |
|
1008 selectedApplicationIndexHolder |
|
1009 <resource: #uiAspect> |
|
1010 |
|
1011 selectedApplicationIndexHolder isNil ifTrue:[ |
|
1012 selectedApplicationIndexHolder := ValueHolder new. |
|
1013 selectedApplicationIndexHolder onChangeSend:#selectedApplicationChanged to:self. |
|
1014 ]. |
|
1015 ^ selectedApplicationIndexHolder. |
|
1016 ! |
|
1017 |
|
1018 selectedApplicationsComment |
|
1019 <resource: #uiAspect> |
|
1020 |
|
1021 "automatically generated by UIPainter ..." |
|
1022 |
|
1023 "*** the code below creates a default model when invoked." |
|
1024 "*** (which may not be the one you wanted)" |
|
1025 "*** Please change as required and accept it in the browser." |
|
1026 "*** (and replace this comment by something more useful ;-)" |
|
1027 |
|
1028 selectedApplicationsComment isNil ifTrue:[ |
|
1029 selectedApplicationsComment := '' asValue. |
|
1030 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1031 "/ selectedApplicationsComment addDependent:self. |
|
1032 "/ selectedApplicationsComment onChangeSend:#selectedApplicationsCommentChanged to:self. |
|
1033 ]. |
|
1034 ^ selectedApplicationsComment. |
|
1035 ! |
|
1036 |
|
1037 selectedProjectDefinition |
|
1038 <resource: #uiAspect> |
|
1039 |
|
1040 ^ selectedProjectDefinition. |
|
1041 ! |
|
1042 |
|
1043 selectedProjectIndexHolder |
|
1044 <resource: #uiAspect> |
|
1045 |
|
1046 selectedProjectIndexHolder isNil ifTrue:[ |
|
1047 selectedProjectIndexHolder := ValueHolder new. |
|
1048 selectedProjectIndexHolder onChangeSend:#selectedProjectChanged to:self. |
|
1049 ]. |
|
1050 ^ selectedProjectIndexHolder. |
|
1051 ! |
|
1052 |
|
1053 selectedProjectsComment |
|
1054 <resource: #uiAspect> |
|
1055 |
|
1056 selectedProjectsComment isNil ifTrue:[ |
|
1057 selectedProjectsComment := '' asValue. |
|
1058 ]. |
|
1059 ^ selectedProjectsComment. |
|
1060 ! |
|
1061 |
|
1062 startMakeButtonEnabled |
|
1063 <resource: #uiAspect> |
|
1064 |
|
1065 startMakeButtonEnabled isNil ifTrue:[ |
|
1066 startMakeButtonEnabled := true asValue. |
|
1067 ]. |
|
1068 ^ startMakeButtonEnabled. |
|
1069 ! |
|
1070 |
|
1071 stopMakeButtonVisible |
|
1072 <resource: #uiAspect> |
|
1073 |
|
1074 stopMakeButtonVisible isNil ifTrue:[ |
|
1075 stopMakeButtonVisible := false asValue. |
|
1076 ]. |
|
1077 ^ stopMakeButtonVisible. |
|
1078 ! ! |
|
1079 |
|
1080 !ProjectBuilderAssistantApplication methodsFor:'initialization & release'! |
|
1081 |
|
1082 postBuildWith:aBuilder |
|
1083 super postBuildWith:aBuilder. |
|
1084 self updateListOfMatchingProjects. |
|
1085 |
|
1086 Smalltalk addDependent:self. |
|
1087 ! |
|
1088 |
|
1089 release |
|
1090 Smalltalk removeDependent:self. |
|
1091 super release |
|
1092 ! ! |
|
1093 |
|
1094 !ProjectBuilderAssistantApplication methodsFor:'private'! |
|
1095 |
|
1096 commentFromClass:aClass |
|
1097 |docMethod comment indents minIndent maxLineLength| |
|
1098 |
|
1099 docMethod := aClass class compiledMethodAt:#documentation. |
|
1100 docMethod notNil ifTrue:[ |
|
1101 comment := docMethod comment. |
|
1102 comment := comment asStringCollection |
|
1103 collect:[:line | line withoutTrailingSeparators]. |
|
1104 [comment notEmpty and:[comment first isBlank]] whileTrue:[ comment removeFirst ]. |
|
1105 maxLineLength := (comment collect:[:line | line size]) max. |
|
1106 indents := comment collect:[:line | |
|
1107 line isEmptyOrNil |
|
1108 ifTrue:[maxLineLength] |
|
1109 ifFalse:[ line findFirst:[:ch | ch isSeparator not]]]. |
|
1110 (minIndent := indents min) > 1 ifTrue:[ |
|
1111 comment := comment collect:[:line | line copyFrom:minIndent]. |
|
1112 ]. |
|
1113 comment := comment asString. |
|
1114 ]. |
|
1115 ^ comment |
|
1116 ! ! |
|
1117 |
|
1118 !ProjectBuilderAssistantApplication methodsFor:'specs'! |
|
1119 |
|
1120 assistantSpec |
|
1121 ^ #(Array |
|
1122 ( AssistantPageSpec |
|
1123 pageTitle: 'Project Type Selection' |
|
1124 windowSpecSelector: _1_projectTypeSelectionSpec |
|
1125 ) |
|
1126 |
|
1127 (AssistantPageSpec |
|
1128 pageTitle: 'Project Selection' |
|
1129 windowSpecSelector: _2_projectSelectionSpec |
|
1130 ) |
|
1131 |
|
1132 (AssistantPageSpec |
|
1133 pageTitle: 'Application Selection' |
|
1134 windowSpecSelector: _3_applicationSelectionSpec |
|
1135 isEnabledQuerySelector: #projectTypeIsNotLibrary |
|
1136 canEnterQuerySelector: #hasProjectSelected |
|
1137 ) |
|
1138 |
|
1139 (AssistantPageSpec |
|
1140 pageTitle: 'Specify Contents' |
|
1141 windowSpecSelector: _4_specifyIncludedClasses |
|
1142 enterCallbackSelector: updateListOfClassesInProject |
|
1143 ) |
|
1144 |
|
1145 (AssistantPageSpec |
|
1146 pageTitle: 'Specify Build Directory' |
|
1147 windowSpecSelector: _5_specifyBuildDirectorySpec |
|
1148 ) |
|
1149 |
|
1150 (AssistantPageSpec |
|
1151 pageTitle: 'Build' |
|
1152 windowSpecSelector: _6_buildSpec |
|
1153 canEnterQuerySelector: #hasBuildDirectorySpecified |
|
1154 ) |
|
1155 |
|
1156 (AssistantPageSpec |
|
1157 pageTitle: 'Deploy' |
|
1158 windowSpecSelector: _7_deploySpec |
|
1159 ) |
|
1160 ) decodeAsLiteralArray. |
|
1161 ! ! |
|
1162 |
|
1163 !ProjectBuilderAssistantApplication methodsFor:'update'! |
|
1164 |
|
1165 update:something with:anArgument from:changedObject |
|
1166 changedObject == Smalltalk ifTrue:[ |
|
1167 (something == #newClass |
|
1168 or:[something == #classRemove |
|
1169 or:[something == #projectOrganization]]) ifTrue:[ |
|
1170 self updateListOfMatchingProjects. |
|
1171 ^ self. |
|
1172 ]. |
|
1173 ^ self. |
|
1174 ]. |
|
1175 super update:something with:anArgument from:changedObject |
|
1176 ! |
|
1177 |
|
1178 updateApplicationComment |
|
1179 |comment| |
|
1180 |
|
1181 self selectedApplicationIndexHolder value notNil ifTrue:[ |
|
1182 comment := self commentFromClass:selectedApplication. |
|
1183 comment isNil ifTrue:[ |
|
1184 comment := 'Application has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
1185 ]. |
|
1186 ] ifFalse:[ |
|
1187 comment := 'Please select an Application' allItalic colorizeAllWith:Color lightGrey. |
|
1188 ]. |
|
1189 self selectedApplicationsComment value:comment. |
|
1190 ! |
|
1191 |
|
1192 updateComment |
|
1193 |comment| |
|
1194 |
|
1195 self selectedProjectIndexHolder value notNil ifTrue:[ |
|
1196 comment := self commentFromClass:selectedProjectDefinition. |
|
1197 comment isNil ifTrue:[ |
|
1198 comment := 'Project has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
1199 ]. |
|
1200 ] ifFalse:[ |
|
1201 comment := 'Please select a Project' allItalic colorizeAllWith:Color lightGrey. |
|
1202 ]. |
|
1203 self selectedProjectsComment value:comment. |
|
1204 ! |
|
1205 |
|
1206 updateListOfApplicationsInProject |
|
1207 |applicationClasses package| |
|
1208 |
|
1209 self selectedApplicationIndexHolder value:nil. |
|
1210 selectedProjectDefinition isNil ifTrue:[ |
|
1211 applicationClasses := #() |
|
1212 ] ifFalse:[ |
|
1213 package := selectedProjectDefinition package. |
|
1214 |
|
1215 applicationClasses := Smalltalk allClasses |
|
1216 select:[:cls | |
|
1217 (cls package = package |
|
1218 and:[ cls isSubclassOf:ApplicationModel ]) |
|
1219 ]. |
|
1220 applicationClasses := applicationClasses asOrderedCollection. |
|
1221 applicationClasses sort:[:a :b | a name < b name]. |
|
1222 ]. |
|
1223 self listOfApplicationsInProject value:applicationClasses |
|
1224 ! |
|
1225 |
|
1226 updateListOfClassesInProject |
|
1227 self listOfClassesInProject value:(selectedProjectDefinition classNames). |
|
1228 ! |
|
1229 |
|
1230 updateListOfMatchingProjects |
|
1231 |matching projectType idx| |
|
1232 |
|
1233 projectType := self projectType value. |
|
1234 matching := ProjectDefinition allSubclasses |
|
1235 select:[:defClass | |
|
1236 |match| |
|
1237 |
|
1238 match := false. |
|
1239 defClass isAbstract ifFalse:[ |
|
1240 (self hideSTXProjects value not |
|
1241 or:[ defClass package asPackageId module ~= 'stx' ]) |
|
1242 ifTrue:[ |
|
1243 projectType == #libraryType ifTrue:[ |
|
1244 match := defClass isLibraryDefinition |
|
1245 ] ifFalse:[ |
|
1246 projectType == #guiApplicationType ifTrue:[ |
|
1247 match := defClass isGUIApplication |
|
1248 ] ifFalse:[ |
|
1249 projectType == #nonGuiApplicationType ifTrue:[ |
|
1250 match := defClass isConsoleApplication |
|
1251 ] ifFalse:[ |
|
1252 self error. |
|
1253 ]. |
|
1254 ]. |
|
1255 ]. |
|
1256 ]. |
|
1257 ]. |
|
1258 ]. |
|
1259 matching sort:[:a :b | a name < b name]. |
|
1260 self listOfMatchingProjects value:matching. |
|
1261 |
|
1262 idx := matching indexOf:selectedProjectDefinition. |
|
1263 idx == 0 ifTrue:[ |
|
1264 self selectedProjectIndexHolder value:nil. |
|
1265 ] ifFalse:[ |
|
1266 self selectedProjectIndexHolder value:idx. |
|
1267 ]. |
|
1268 ! ! |
|
1269 |
|
1270 !ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
|
1271 |
|
1272 version_CVS |
|
1273 ^ '$Header$' |
|
1274 ! ! |