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