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