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