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