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