author | Jan Vrany <jan.vrany@labware.com> |
Wed, 05 Oct 2022 11:57:26 +0100 | |
branch | jv |
changeset 19637 | 28f5bfaa093d |
parent 19607 | f9108fde4972 |
permissions | -rw-r--r-- |
5141 | 1 |
" |
2 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
18226 | 3 |
COPYRIGHT (c) 2016 Jan Vrany |
19595
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
4 |
COPYRIGHT (c) 2021 LabWare |
5141 | 5 |
All Rights Reserved |
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
3712 | 14 |
"{ Package: 'stx:libtool' }" |
15 |
||
15085
dac5a348dd09
class: CodeGeneratorTool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14966
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
dac5a348dd09
class: CodeGeneratorTool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14966
diff
changeset
|
17 |
|
3712 | 18 |
Object subclass:#CodeGeneratorTool |
9757
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
19 |
instanceVariableNames:'compositeChangeCollector compositeChangeNesting userPreferences |
11170 | 20 |
generateComments confirmChanges targetClass' |
9757
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
21 |
classVariableNames:'GenerateCommentsForGetters GenerateCommentsForSetters |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
22 |
CopyrightTemplate' |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
23 |
poolDictionaries:'' |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
24 |
category:'Interface-Browsers' |
3712 | 25 |
! |
26 |
||
3719 | 27 |
!CodeGeneratorTool class methodsFor:'documentation'! |
28 |
||
5141 | 29 |
copyright |
30 |
" |
|
31 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
18226 | 32 |
COPYRIGHT (c) 2016 Jan Vrany |
19595
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
33 |
COPYRIGHT (c) 2021 LabWare |
5141 | 34 |
All Rights Reserved |
35 |
||
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
! |
|
44 |
||
3719 | 45 |
documentation |
46 |
" |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
47 |
This utility class contains various code generation facilites; |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
48 |
these were extracted from the old and newBrowser. |
6791
6559c9ebb561
Keep method argument names when generating required methods
Stefan Vogel <sv@exept.de>
parents:
6718
diff
changeset
|
49 |
There is probably more to come... |
3719 | 50 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
51 |
Note: being refactored into separate per-language generators |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
52 |
|
3719 | 53 |
[author:] |
54 |
Claus Gittiner |
|
55 |
" |
|
56 |
! ! |
|
3712 | 57 |
|
8572 | 58 |
!CodeGeneratorTool class methodsFor:'instance creation'! |
59 |
||
60 |
new |
|
61 |
^ self basicNew initialize. |
|
62 |
! ! |
|
63 |
||
3712 | 64 |
!CodeGeneratorTool class methodsFor:'code generation'! |
65 |
||
66 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
67 |
"create accessors in aClass" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
68 |
|
5758 | 69 |
^ self new |
6313 | 70 |
createAccessMethodsFor:aCollectionOfVarNames |
71 |
in:aClass |
|
72 |
withChange:withChange |
|
73 |
asValueHolder:asValueHolder |
|
74 |
readersOnly:readersOnly |
|
75 |
writersOnly:writersOnly |
|
4444
6b077945517c
generate instvar accessors with lazy-init
Claus Gittinger <cg@exept.de>
parents:
4351
diff
changeset
|
76 |
! |
6b077945517c
generate instvar accessors with lazy-init
Claus Gittinger <cg@exept.de>
parents:
4351
diff
changeset
|
77 |
|
3712 | 78 |
createApplicationCodeFor:aClass |
79 |
"create an empty application framework" |
|
80 |
||
5758 | 81 |
^ self new createApplicationCodeFor:aClass |
3712 | 82 |
! |
83 |
||
3804 | 84 |
createClassResponsibleProtocolFor:aClass |
85 |
"create stubs for the required protocol" |
|
86 |
||
5758 | 87 |
^ self new createClassResponsibleProtocolFor:aClass |
3804 | 88 |
! |
89 |
||
5124 | 90 |
createClassTypeTestMethodsIn:aClass forClasses:subClasses |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
91 |
"create a #isXXX test methods (I'm tired of typing)" |
4351 | 92 |
|
5758 | 93 |
^ self new createClassTypeTestMethodsIn:aClass forClasses:subClasses |
4351 | 94 |
! |
95 |
||
3712 | 96 |
createDocumentationMethodsFor:aClass |
97 |
"create empty documentation methods" |
|
98 |
||
5758 | 99 |
^ self new createDocumentationMethodsFor:aClass |
3712 | 100 |
! |
101 |
||
6313 | 102 |
createEnumTypeCodeFor:aClass |
103 |
^ self new createEnumTypeCodeFor:aClass |
|
104 |
! |
|
105 |
||
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
106 |
createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
107 |
"create a #initialize methods (I'm tired of typing)" |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
108 |
|
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
109 |
^ self new createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
110 |
! |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
111 |
|
6718 | 112 |
createInitializedInstanceCreationMethodsIn:aClass |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
113 |
"create a #new and #initialize methods (I'm tired of typing)" |
3712 | 114 |
|
6718 | 115 |
^ self new createInitializedInstanceCreationMethodsIn:aClass |
116 |
! |
|
117 |
||
13627 | 118 |
createIsAbstractMethodIn:aClass |
119 |
"create a #isABstract query method (I'm tired of typing)" |
|
120 |
||
121 |
^ self new createIsAbstractMethodIn:aClass |
|
122 |
! |
|
123 |
||
6718 | 124 |
createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
125 |
"create a #selector instance creation method (I'm tired of typing)" |
|
126 |
||
127 |
^ self new createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
|
3712 | 128 |
! |
129 |
||
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
130 |
createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
131 |
"create a redefined #new method" |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
132 |
|
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
133 |
^ self new createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
134 |
! |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
135 |
|
9757
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
136 |
createSingletonPatternInstanceCreationMethodsIn:aClass usingVariable:varName |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
137 |
"create redefined #new method for singleton pattern" |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
138 |
|
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
139 |
^ self new createSingletonPatternInstanceCreationMethodsIn:aClass usingVariable:varName |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
140 |
|
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
141 |
"Created: / 10-02-2011 / 16:32:43 / cg" |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
142 |
! |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
143 |
|
10592 | 144 |
createStandaloneStartupCodeFor:aClass |
145 |
"create an empty console application framework" |
|
146 |
||
147 |
^ self new createStandaloneStartupCodeFor:aClass |
|
148 |
||
149 |
"Created: / 19-08-2011 / 01:58:57 / cg" |
|
150 |
! |
|
151 |
||
9081 | 152 |
createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
153 |
"create standAloneStartup code" |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
154 |
|
9081 | 155 |
^ self new createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
156 |
! |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
157 |
|
3712 | 158 |
createTestCaseSampleCodeFor:aClass |
4590 | 159 |
"create an (almost) empty testCase class" |
3712 | 160 |
|
5758 | 161 |
^ self new createTestCaseSampleCodeFor:aClass |
3712 | 162 |
! |
163 |
||
164 |
createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
165 |
"create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)" |
3712 | 166 |
|
5758 | 167 |
^ self new createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
3712 | 168 |
! |
169 |
||
6050 | 170 |
createWebApplicationCodeFor:aClass |
171 |
"create an empty webApplication framework" |
|
172 |
||
173 |
^ self new createWebApplicationCodeFor:aClass |
|
174 |
! |
|
175 |
||
7973 | 176 |
createWebServiceCodeFor:aClass |
177 |
"create an empty webService framework" |
|
178 |
||
179 |
^ self new createWebServiceCodeFor:aClass |
|
180 |
! |
|
181 |
||
8572 | 182 |
createWidgetCodeFor:aClass |
183 |
"create usually required widget code (redraw, model update, event handling)" |
|
184 |
||
185 |
^ self new createWidgetCodeFor:aClass |
|
186 |
! |
|
187 |
||
3712 | 188 |
initialMenuSpecMethodSourceForApplications |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
189 |
"return code for a menuSpec with typical stuff in it" |
3712 | 190 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
191 |
self subclassResponsibility |
7973 | 192 |
! |
193 |
||
194 |
initialPageMenuSpecMethodSourceForWebApplications |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
195 |
"return code for a menuSpec with typical stuff in it" |
7973 | 196 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
197 |
self subclassResponsibility |
7973 | 198 |
|
199 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
200 |
SmalltalkCodeGeneratorTool initialPageMenuSpecMethodSourceForWebApplications |
7973 | 201 |
" |
202 |
! |
|
203 |
||
204 |
initialPageSpecMethodSourceForWebApplications |
|
205 |
"return an empty pageSpec" |
|
206 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
207 |
self subclassResponsibility |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
208 |
! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
209 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
210 |
initialToolbarMenuSpecMethodSource |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
211 |
"return a menuSpec with typical stuff in it" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
212 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
213 |
self subclassResponsibility |
9054 | 214 |
|
215 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
216 |
SmalltalkCodeGenerator initialToolbarMenuSpecMethodSource |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
217 |
" |
9054 | 218 |
! |
219 |
||
3712 | 220 |
initialWindowSpecMethodSourceForApplications |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
221 |
"return an empty windowSpec with an initial menubar in it" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
222 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
223 |
self subclassResponsibility |
3712 | 224 |
|
225 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
226 |
SmalltalkCodeGeneraotTool initialWindowSpecMethodSourceForApplications |
9054 | 227 |
" |
3712 | 228 |
! |
229 |
||
230 |
initialWindowSpecMethodSourceForDialogs |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
231 |
"return an empty windowSpec for dialogs" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
232 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
233 |
self subclassResponsibility |
3712 | 234 |
|
235 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
236 |
SmalltalkCodeGeneraotTool initialWindowSpecMethodSourceForDialogs |
3712 | 237 |
" |
238 |
! ! |
|
239 |
||
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
240 |
!CodeGeneratorTool class methodsFor:'code generation-basic'! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
241 |
|
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
242 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly lazyInitialization:lazyInitialization |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
243 |
"workhorse for creating access methods for instvars." |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
244 |
|
5758 | 245 |
^ self new |
246 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly lazyInitialization:lazyInitialization |
|
247 |
! ! |
|
248 |
||
249 |
!CodeGeneratorTool class methodsFor:'code generation-individual methods'! |
|
250 |
||
251 |
createAcceptVisitorMethod:selector in:aClass |
|
252 |
"create an acceptVisitor: method |
|
253 |
(I'm tired of typing)" |
|
254 |
||
255 |
^ self new createAcceptVisitorMethod:selector in:aClass |
|
256 |
! |
|
257 |
||
258 |
createAcceptVisitorMethodIn:aClass |
|
259 |
"create an acceptVisitor: method |
|
260 |
(I'm tired of typing)" |
|
261 |
||
262 |
^ self new createAcceptVisitorMethodIn:aClass |
|
263 |
! |
|
264 |
||
12877 | 265 |
createAspectMethodFor:anAspectSymbol in:aClass |
266 |
"create an aspect method." |
|
267 |
||
268 |
^ self new createAspectMethodFor:anAspectSymbol in:aClass |
|
269 |
! |
|
270 |
||
5758 | 271 |
createCopyrightMethodFor:aClass |
272 |
"add copyright method containing your/your companies |
|
273 |
copyright template but only if not already present. |
|
274 |
this is only added, if specified in the |
|
275 |
COPYRIGHT_TEMPLATE_FILE resources." |
|
276 |
||
277 |
^ self new createCopyrightMethodFor:aClass |
|
278 |
! |
|
279 |
||
280 |
createDocumentationMethodFor:aClass |
|
281 |
"add documentation method containing doc template |
|
282 |
but only if not already present." |
|
283 |
||
284 |
^ self new createDocumentationMethodFor:aClass |
|
285 |
! |
|
286 |
||
287 |
createExamplesMethodFor:aClass |
|
288 |
"add examples method containing examples template |
|
289 |
but only if not already present." |
|
290 |
||
291 |
^ self new createExamplesMethodFor:aClass |
|
292 |
! |
|
293 |
||
11842
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
294 |
createFalseReturnMethodFor:aSelector category:cat in:aClass |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
295 |
"add a ^ false method; |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
296 |
but only if not already present." |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
297 |
|
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
298 |
^ self new createFalseReturnMethodFor:aSelector category:cat in:aClass |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
299 |
! |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
300 |
|
5758 | 301 |
createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel |
302 |
^ self new createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel |
|
303 |
! |
|
304 |
||
305 |
createInitialHistoryMethodFor:aClass |
|
306 |
"add history method containing created-entry |
|
307 |
but only if not already present." |
|
308 |
||
309 |
^ self new createInitialHistoryMethodFor:aClass |
|
310 |
! |
|
311 |
||
312 |
createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
|
313 |
"add an inst-creation method" |
|
314 |
||
315 |
^ self new createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
|
316 |
! |
|
317 |
||
16248 | 318 |
createMultiSetterInstanceCreationMethodFor:aCollectionOfVarNames in:aClass |
319 |
"create a multi-setter instance creator method for instvars. |
|
320 |
This creates a multi setter method (a:val1 b:val2 c:val3...) |
|
321 |
and a corresponding new method on the class side." |
|
322 |
||
323 |
^ self new createMultiSetterInstanceCreationMethodFor:aCollectionOfVarNames in:aClass |
|
324 |
! |
|
325 |
||
5758 | 326 |
createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
16248 | 327 |
"create a multi-setter method (a:val1 b:val2 c:val3...) for instvars." |
5758 | 328 |
|
329 |
^ self new createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
|
330 |
! |
|
331 |
||
332 |
createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
|
333 |
"add a subclassResponsibility method; |
|
334 |
but only if not already present." |
|
335 |
||
336 |
^ self new createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
|
337 |
! |
|
338 |
||
339 |
createUpdateMethodIn:aClass |
|
340 |
"create an update:with:from:-method |
|
341 |
(I'm tired of typing)" |
|
342 |
||
343 |
^ self new createUpdateMethodIn:aClass |
|
344 |
! |
|
345 |
||
346 |
createVersionMethodFor:aClass |
|
11758
531b78e53e8f
comment/format in: #createVersionMethodFor:
Claus Gittinger <cg@exept.de>
parents:
11718
diff
changeset
|
347 |
"add a version method containing RCS template |
531b78e53e8f
comment/format in: #createVersionMethodFor:
Claus Gittinger <cg@exept.de>
parents:
11718
diff
changeset
|
348 |
but only if not already present and it's not a private class." |
5758 | 349 |
|
350 |
^ self new createVersionMethodFor:aClass |
|
11758
531b78e53e8f
comment/format in: #createVersionMethodFor:
Claus Gittinger <cg@exept.de>
parents:
11718
diff
changeset
|
351 |
|
531b78e53e8f
comment/format in: #createVersionMethodFor:
Claus Gittinger <cg@exept.de>
parents:
11718
diff
changeset
|
352 |
"Modified (comment): / 21-08-2012 / 11:55:15 / cg" |
5758 | 353 |
! ! |
354 |
||
7973 | 355 |
!CodeGeneratorTool class methodsFor:'code generation-menus'! |
356 |
||
357 |
createActionMethodFor:aSelector in:aClass category:aCategory redefine:redefine |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
358 |
self subclassResponsibility |
7973 | 359 |
! |
360 |
||
361 |
createAspectMethodFor:aSelector in:aClass category:aCategory redefine:redefine |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
362 |
self subclassResponsibility |
7973 | 363 |
! ! |
364 |
||
5758 | 365 |
!CodeGeneratorTool class methodsFor:'compilation'! |
366 |
||
367 |
compile:theCode forClass:aClass inCategory:cat |
|
368 |
"install some code for a class. |
|
369 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
370 |
||
16429 | 371 |
self new compile:theCode forClass:aClass inCategory:cat |
5758 | 372 |
! ! |
373 |
||
8258 | 374 |
!CodeGeneratorTool class methodsFor:'defaults'! |
375 |
||
376 |
copyrightTemplate |
|
377 |
"return the contents of COPYRIGHT_TEMPLATE_FILE resources |
|
378 |
or a standard template" |
|
379 |
||
14425 | 380 |
|fn copyrightHolder| |
8258 | 381 |
|
382 |
CopyrightTemplate notNil ifTrue:[^ CopyrightTemplate]. |
|
383 |
||
384 |
fn := SystemBrowser classResources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil. |
|
385 |
fn notNil ifTrue:[ |
|
386 |
fn := fn asFilename. |
|
387 |
fn exists ifTrue:[ |
|
8488 | 388 |
^ fn contentsAsString. |
8258 | 389 |
]. |
390 |
]. |
|
14425 | 391 |
(OperatingSystem getDomainName endsWith:'exept.de') ifTrue:[ |
392 |
copyrightHolder := 'eXept Sofware AG'. |
|
393 |
] ifFalse:[ |
|
394 |
copyrightHolder := '>>your company<<'. |
|
395 |
]. |
|
396 |
||
397 |
^ ' COPYRIGHT (c) %1 by %2 |
|
8258 | 398 |
All Rights Reserved |
399 |
||
400 |
This software is furnished under a license and may be used |
|
401 |
only in accordance with the terms of that license and with the |
|
16737 | 402 |
inclusion of the above copyright notice. This software may not |
8258 | 403 |
be provided or otherwise made available to, or used by, any |
404 |
other person. No title to or ownership of the software is |
|
17269 | 405 |
hereby transferred.' bindWith:(Date today year) with:copyrightHolder. |
8258 | 406 |
! |
407 |
||
408 |
copyrightTemplate:aString |
|
8488 | 409 |
"set the COPYRIGHT_TEMPLATE_FILE" |
410 |
||
8258 | 411 |
CopyrightTemplate := aString. |
412 |
! ! |
|
413 |
||
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
414 |
!CodeGeneratorTool class methodsFor:'interface specs'! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
415 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
416 |
initialMenuSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
417 |
"return a menuSpec with typical stuff in it" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
418 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
419 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
420 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
421 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
422 |
the MenuEditor may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
423 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
424 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
425 |
MenuEditor new openOnClass:self andSelector:#initialMenuSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
426 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
427 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
428 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
429 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
430 |
^ #(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
431 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
432 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
433 |
#label: 'File' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
434 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
435 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
436 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
437 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
438 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
439 |
#label: 'New' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
440 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
441 |
#value: #menuNew |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
442 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
443 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
444 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
445 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
446 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
447 |
#label: 'Open...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
448 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
449 |
#value: #menuOpen |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
450 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
451 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
452 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
453 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
454 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
455 |
#label: 'Save' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
456 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
457 |
#value: #menuSave |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
458 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
459 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
460 |
#label: 'Save As...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
461 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
462 |
#value: #menuSaveAs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
463 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
464 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
465 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
466 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
467 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
468 |
#label: 'Exit' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
469 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
470 |
#value: #closeRequest |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
471 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
472 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
473 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
474 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
475 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
476 |
#(#MenuItem |
15399 | 477 |
#label: 'MENU_Help' |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
478 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
479 |
#startGroup: #right |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
480 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
481 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
482 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
483 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
484 |
#label: 'Documentation' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
485 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
486 |
#value: #openDocumentation |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
487 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
488 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
489 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
490 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
491 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
492 |
#label: 'About this Application...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
493 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
494 |
#value: #openAboutThisApplication |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
495 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
496 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
497 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
498 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
499 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
500 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
501 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
502 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
503 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
504 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
505 |
initialPageMenuSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
506 |
"return a menuSpec with typical stuff in it" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
507 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
508 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
509 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
510 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
511 |
the MenuEditor may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
512 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
513 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
514 |
MenuEditor new openOnClass:self andSelector:#initialPageMenuSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
515 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
516 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
517 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
518 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
519 |
^ #(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
520 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
521 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
522 |
#label: 'File' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
523 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
524 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
525 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
526 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
527 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
528 |
#label: 'New' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
529 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
530 |
#value: #menuNew |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
531 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
532 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
533 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
534 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
535 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
536 |
#label: 'Open...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
537 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
538 |
#value: #menuOpen |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
539 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
540 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
541 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
542 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
543 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
544 |
#label: 'Save' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
545 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
546 |
#value: #menuSave |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
547 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
548 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
549 |
#label: 'Save As...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
550 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
551 |
#value: #menuSaveAs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
552 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
553 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
554 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
555 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
556 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
557 |
#label: 'Exit' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
558 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
559 |
#value: #closeRequest |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
560 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
561 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
562 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
563 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
564 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
565 |
#(#MenuItem |
15399 | 566 |
#label: 'MENU_Help' |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
567 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
568 |
#startGroup: #right |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
569 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
570 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
571 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
572 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
573 |
#label: 'Documentation' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
574 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
575 |
#value: #openDocumentation |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
576 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
577 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
578 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
579 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
580 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
581 |
#label: 'About this Application...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
582 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
583 |
#value: #openAboutThisApplication |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
584 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
585 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
586 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
587 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
588 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
589 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
590 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
591 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
592 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
593 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
594 |
initialPageSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
595 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
596 |
the UIPainter may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
597 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
598 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
599 |
UIPainter new openOnClass:self andSelector:#initialPageSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
600 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
601 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
602 |
<resource: #canvas> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
603 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
604 |
^ #(#FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
605 |
#window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
606 |
#(#WindowSpec |
10319
c374ffaf0ec3
changed: #initialPageSpecForWebApplications
Claus Gittinger <cg@exept.de>
parents:
10284
diff
changeset
|
607 |
#name: '%1' |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
608 |
#layout: #(#LayoutFrame 204 0 162 0 503 0 461 0) |
10319
c374ffaf0ec3
changed: #initialPageSpecForWebApplications
Claus Gittinger <cg@exept.de>
parents:
10284
diff
changeset
|
609 |
#label: '%1' |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
610 |
#min: #(#Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
611 |
#max: #(#Point 1024 768) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
612 |
#bounds: #(#Rectangle 204 162 504 462) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
613 |
#menu: #pageMenu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
614 |
#usePreferredExtent: false |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
615 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
616 |
#component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
617 |
#(#SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
618 |
#collection: #() |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
619 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
620 |
) |
10319
c374ffaf0ec3
changed: #initialPageSpecForWebApplications
Claus Gittinger <cg@exept.de>
parents:
10284
diff
changeset
|
621 |
|
c374ffaf0ec3
changed: #initialPageSpecForWebApplications
Claus Gittinger <cg@exept.de>
parents:
10284
diff
changeset
|
622 |
"Modified: / 14-07-2011 / 16:44:20 / cg" |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
623 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
624 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
625 |
initialToolbarMenuSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
626 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
627 |
by the MenuEditor of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
628 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
629 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
630 |
the MenuEditor may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
631 |
|
11041
4b9586c63c4a
changed: #initialToolbarMenuSpec
Claus Gittinger <cg@exept.de>
parents:
10594
diff
changeset
|
632 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
633 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
634 |
MenuEditor new openOnClass:CodeGeneratorTool andSelector:#initialToolbarMenuSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
635 |
(Menu new fromLiteralArrayEncoding:(CodeGeneratorTool initialToolbarMenuSpec)) startUp |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
636 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
637 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
638 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
639 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
640 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
641 |
#(Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
642 |
( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
643 |
(MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
644 |
label: 'Reload' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
645 |
itemValue: menuReload |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
646 |
translateLabel: true |
11041
4b9586c63c4a
changed: #initialToolbarMenuSpec
Claus Gittinger <cg@exept.de>
parents:
10594
diff
changeset
|
647 |
isButton: true |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
648 |
labelImage: (ResourceRetriever ToolbarIconLibrary reload24x24Icon) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
649 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
650 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
651 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
652 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
653 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
654 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
655 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
656 |
initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
657 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
658 |
by the UIPainter of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
659 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
660 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
661 |
the UIPainter may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
662 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
663 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
664 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
665 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
666 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
667 |
<resource: #canvas> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
668 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
669 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
670 |
#(FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
671 |
name: initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
672 |
window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
673 |
(WindowSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
674 |
label: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
675 |
name: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
676 |
min: (Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
677 |
bounds: (Rectangle 0 0 300 300) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
678 |
menu: mainMenu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
679 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
680 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
681 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
682 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
683 |
(LabelSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
684 |
label: 'Hello World' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
685 |
name: 'Label1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
686 |
layout: (LayoutFrame 0 0.0 60 0 0 1.0 219 0) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
687 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
688 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
689 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
690 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
691 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
692 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
693 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
694 |
"Modified: / 07-05-2010 / 14:21:48 / cg" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
695 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
696 |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
697 |
initialWindowSpecForApplications2 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
698 |
"This resource specification was automatically generated |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
699 |
by the UIPainter of ST/X." |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
700 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
701 |
"Do not manually edit this!! If it is corrupted, |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
702 |
the UIPainter may not be able to read the specification." |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
703 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
704 |
" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
705 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForApplications2 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
706 |
" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
707 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
708 |
<resource: #canvas> |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
709 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
710 |
^ |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
711 |
#(FullSpec |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
712 |
name: initialWindowSpecForApplications2 |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
713 |
window: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
714 |
(WindowSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
715 |
label: '%1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
716 |
name: '%1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
717 |
min: (Point 10 10) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
718 |
bounds: (Rectangle 0 0 300 300) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
719 |
menu: mainMenu |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
720 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
721 |
component: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
722 |
(SpecCollection |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
723 |
collection: ( |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
724 |
(MenuPanelSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
725 |
name: 'ToolBar1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
726 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 36 0) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
727 |
menu: toolbarMenu |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
728 |
textDefault: true |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
729 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
730 |
(ViewSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
731 |
name: 'Box1' |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
732 |
layout: (LayoutFrame 1 0 36 0 0 1 -26 1) |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
733 |
level: 1 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
734 |
component: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
735 |
(SpecCollection |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
736 |
collection: ( |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
737 |
(LabelSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
738 |
label: 'Hello World' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
739 |
name: 'Contents' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
740 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
741 |
translateLabel: true |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
742 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
743 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
744 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
745 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
746 |
) |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
747 |
(ViewSpec |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
748 |
name: 'Box2' |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
749 |
layout: (LayoutFrame 0 0 -26 1 0 1 0 1) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
750 |
level: 1 |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
751 |
component: |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
752 |
(SpecCollection |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
753 |
collection: ( |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
754 |
(LabelSpec |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
755 |
label: 'InfoLabel' |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
756 |
name: 'Label2' |
9261
5d817a638b5d
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9236
diff
changeset
|
757 |
layout: (LayoutFrame 0 0 -26 1 -1 1 0 1) |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
758 |
level: -1 |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
759 |
translateLabel: true |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
760 |
labelChannel: infoLabelHolder |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
761 |
adjust: left |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
762 |
) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
763 |
) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
764 |
|
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
765 |
) |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
766 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
767 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
768 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
769 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
770 |
) |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
771 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
772 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
773 |
initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
774 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
775 |
by the UIPainter of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
776 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
777 |
"Do not manually edit this!! If it is corrupted, |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
778 |
the UIPainter may not be able to read the specification." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
779 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
780 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
781 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
782 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
783 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
784 |
<resource: #canvas> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
785 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
786 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
787 |
#(FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
788 |
name: initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
789 |
window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
790 |
(WindowSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
791 |
label: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
792 |
name: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
793 |
min: (Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
794 |
bounds: (Rectangle 0 0 300 300) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
795 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
796 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
797 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
798 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
799 |
(HorizontalPanelViewSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
800 |
name: 'buttonPanel' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
801 |
layout: (LayoutFrame 0 0.0 -40 1 0 1.0 0 1.0) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
802 |
horizontalLayout: spreadSpaceMax |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
803 |
verticalLayout: center |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
804 |
horizontalSpace: 3 |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
805 |
verticalSpace: 3 |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
806 |
reverseOrderIfOKAtLeft: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
807 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
808 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
809 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
810 |
(ActionButtonSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
811 |
label: 'Cancel' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
812 |
name: 'cancelButton' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
813 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
814 |
tabable: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
815 |
model: cancel |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
816 |
extent: (Point 125 22) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
817 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
818 |
(ActionButtonSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
819 |
label: 'OK' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
820 |
name: 'okButton' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
821 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
822 |
tabable: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
823 |
model: accept |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
824 |
isDefault: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
825 |
extent: (Point 125 22) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
826 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
827 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
828 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
829 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
830 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
831 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
832 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
833 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
834 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
835 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
836 |
"Modified: / 07-05-2010 / 14:21:55 / cg" |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
837 |
! ! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
838 |
|
5758 | 839 |
!CodeGeneratorTool class methodsFor:'private'! |
840 |
||
841 |
canUseRefactoringSupport |
|
842 |
"check if refactory browser stuff is avaliable" |
|
843 |
||
16116
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
844 |
^ (Smalltalk at: #'stx_goodies_refactoryBrowser_changes') notNil |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
845 |
and:[ (Smalltalk at: #'stx_goodies_refactoryBrowser_browser') notNil |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
846 |
and:[ UserPreferences current useRefactoringSupport ] ] |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
847 |
|
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
848 |
" |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
849 |
CodeGeneratorTool canUseRefactoringSupport |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
850 |
" |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
851 |
|
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
852 |
"Modified: / 13-02-2016 / 15:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7973 | 853 |
! |
854 |
||
855 |
methodNameTemplateFor:aSelector |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
856 |
self subclassResponsibility |
5758 | 857 |
! ! |
858 |
||
16194 | 859 |
!CodeGeneratorTool class methodsFor:'queries'! |
14702
bdad8f638ac6
Marked CodeGeneratorTool as abstract
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14701
diff
changeset
|
860 |
|
bdad8f638ac6
Marked CodeGeneratorTool as abstract
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14701
diff
changeset
|
861 |
isAbstract |
bdad8f638ac6
Marked CodeGeneratorTool as abstract
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14701
diff
changeset
|
862 |
^ self == CodeGeneratorTool |
bdad8f638ac6
Marked CodeGeneratorTool as abstract
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14701
diff
changeset
|
863 |
! ! |
bdad8f638ac6
Marked CodeGeneratorTool as abstract
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14701
diff
changeset
|
864 |
|
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
865 |
!CodeGeneratorTool class methodsFor:'utilities'! |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
866 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
867 |
missingRequiredProtocolFor:aClass |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
868 |
"return the missing required protocol; |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
869 |
that is the set of selectors which send #subclassResponsibility in a superclass and |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
870 |
have no implementation in aClass or in any class between aClass and that superclass" |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
871 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
872 |
|requiredSelectors implementedSelectors| |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
873 |
|
14966 | 874 |
aClass isAbstract ifTrue:[ |
875 |
"abstract classes are not responsible for methods to be defined in subclasses" |
|
15085
dac5a348dd09
class: CodeGeneratorTool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14966
diff
changeset
|
876 |
^ #(). |
14966 | 877 |
]. |
878 |
||
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
879 |
requiredSelectors := IdentitySet new. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
880 |
implementedSelectors := IdentitySet withAll:(aClass methodDictionary keys). |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
881 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
882 |
aClass allSuperclassesDo:[:eachSuperClass | |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
883 |
eachSuperClass methodDictionary keysAndValuesDo:[:eachSelector :eachMethod | |
19595
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
884 |
(eachMethod sendsAnySelector:#( #subclassResponsibility #subclassResponsibility: )) ifTrue:[ |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
885 |
(implementedSelectors includes:eachSelector) ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
886 |
requiredSelectors add:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
887 |
] |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
888 |
] ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
889 |
(requiredSelectors includes:eachSelector) ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
890 |
implementedSelectors add:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
891 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
892 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
893 |
] |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
894 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
895 |
^ requiredSelectors |
10553
7ff71943e4b4
changed: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
10466
diff
changeset
|
896 |
|
7ff71943e4b4
changed: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
10466
diff
changeset
|
897 |
"Modified: / 08-08-2011 / 18:44:58 / cg" |
15085
dac5a348dd09
class: CodeGeneratorTool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14966
diff
changeset
|
898 |
"Modified: / 10-01-2015 / 06:46:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
899 |
! ! |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
900 |
|
16356 | 901 |
!CodeGeneratorTool class methodsFor:'utilities - source code'! |
902 |
||
903 |
methodTemplate |
|
904 |
"return a method definition template string" |
|
905 |
||
906 |
^ '' |
|
907 |
! |
|
908 |
||
909 |
methodTemplateForDocumentation |
|
910 |
"return a method definition template string for a documentation method" |
|
911 |
||
912 |
^ self methodTemplate |
|
17079 | 913 |
! |
914 |
||
915 |
methodTemplateForPackageDocumentation |
|
916 |
"return a documentation method definition template string for a package" |
|
917 |
||
918 |
^ self methodTemplateForDocumentation |
|
919 |
||
920 |
"Created: / 18-11-2016 / 10:51:39 / cg" |
|
16356 | 921 |
! ! |
922 |
||
10466
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
923 |
!CodeGeneratorTool methodsFor:'bulk changes'! |
5759 | 924 |
|
5763 | 925 |
addChange:aChange |
926 |
compositeChangeCollector addChange:aChange |
|
927 |
! |
|
928 |
||
5759 | 929 |
executeCollectedChangesNamed:name |
10466
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
930 |
"if both the compositeChangeCollector and I myself think, that it should be confirmed, |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
931 |
the let user do it - I am not sure, if the heuristics here is useful; |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
932 |
it might be better to let the generator decide (for example, if it does high-impact |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
933 |
changes, as opposed to simple ones)" |
10256 | 934 |
|
5759 | 935 |
compositeChangeCollector notNil ifTrue:[ |
936 |
compositeChangeNesting := compositeChangeNesting - 1. |
|
937 |
compositeChangeNesting == 0 ifTrue:[ |
|
938 |
compositeChangeCollector name:name. |
|
939 |
compositeChangeCollector changesSize == 0 ifTrue:[ |
|
940 |
self information:'Nothing generated.'. |
|
941 |
] ifFalse:[ |
|
13817 | 942 |
"JV@2012-04-04: Here used to be a code for confirming changes. |
943 |
The has moved to RefactoryChangeManager so all refactorings |
|
944 |
are also subject to confirmation (is enabled in UserPreferences)" |
|
945 |
RefactoryChangeManager instance performChange: compositeChangeCollector |
|
5759 | 946 |
]. |
947 |
compositeChangeCollector := nil. |
|
948 |
] |
|
949 |
] |
|
10284
8cbf4cd11c2f
changed: #executeCollectedChangesNamed: fix in change confirmation code
vrany
parents:
10256
diff
changeset
|
950 |
|
13817 | 951 |
"Modified (comment): / 04-08-2011 / 17:30:27 / cg" |
952 |
"Modified (format): / 04-04-2012 / 16:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5759 | 953 |
! |
954 |
||
955 |
startCollectChanges |
|
956 |
(self canUseRefactoringSupport) ifTrue:[ |
|
957 |
compositeChangeCollector isNil ifTrue:[ |
|
958 |
compositeChangeCollector := CompositeRefactoryChange new. |
|
959 |
compositeChangeNesting := 0. |
|
960 |
]. |
|
961 |
compositeChangeNesting := compositeChangeNesting + 1. |
|
962 |
] |
|
963 |
! ! |
|
964 |
||
5758 | 965 |
!CodeGeneratorTool methodsFor:'code generation'! |
966 |
||
967 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly |
|
968 |
"create accessors in aClass" |
|
969 |
||
970 |
self |
|
971 |
createAccessMethodsFor:aCollectionOfVarNames |
|
972 |
in:aClass |
|
973 |
withChange:withChange |
|
974 |
asValueHolder:asValueHolder |
|
975 |
readersOnly:readersOnly |
|
976 |
writersOnly:writersOnly |
|
977 |
lazyInitialization:false |
|
978 |
! |
|
979 |
||
980 |
createApplicationCodeFor:aClass |
|
981 |
"create an empty application framework" |
|
982 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
983 |
|nonMetaClass metaClass className txt isDialog |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
984 |
categoryForMenuActionsMethods compileTemplateAction| |
5758 | 985 |
|
986 |
self startCollectChanges. |
|
987 |
||
8572 | 988 |
categoryForMenuActionsMethods := userPreferences categoryForMenuActionsMethods. |
5758 | 989 |
|
990 |
nonMetaClass := aClass theNonMetaclass. |
|
991 |
metaClass := aClass theMetaclass. |
|
992 |
className := nonMetaClass name. |
|
993 |
||
994 |
isDialog := (nonMetaClass isSubclassOf:SimpleDialog). |
|
995 |
||
996 |
"/ add a windowSpec method for an empty applicationWindow, |
|
997 |
"/ with a menuPanel. |
|
998 |
||
999 |
(metaClass includesSelector:#windowSpec) ifFalse:[ |
|
1000 |
isDialog ifTrue:[ |
|
1001 |
txt := self class initialWindowSpecMethodSourceForDialogs. |
|
1002 |
] ifFalse:[ |
|
1003 |
txt := self class initialWindowSpecMethodSourceForApplications. |
|
1004 |
]. |
|
1005 |
self |
|
1006 |
compile:(txt bindWith:className) |
|
1007 |
forClass:metaClass |
|
1008 |
inCategory:'interface specs'. |
|
1009 |
]. |
|
1010 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1011 |
compileTemplateAction := |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1012 |
[:selector :category | |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1013 |
(nonMetaClass includesSelector:selector) ifFalse:[ |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1014 |
|codeTemplateSelector| |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1015 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1016 |
codeTemplateSelector := ('codeFor_',(selector upTo:$:)) asSymbol. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1017 |
txt := self perform:codeTemplateSelector. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1018 |
self |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1019 |
compile:txt |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1020 |
forClass:nonMetaClass |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1021 |
inCategory:(category = '*' ifTrue:categoryForMenuActionsMethods ifFalse:category). |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1022 |
] |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1023 |
]. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1024 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1025 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1026 |
#'postBuildWith:' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1027 |
#'postOpenWith:' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1028 |
) pairWiseDo:compileTemplateAction. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1029 |
|
5758 | 1030 |
isDialog ifFalse:[ |
1031 |
"/ add a topMenu method |
|
1032 |
||
1033 |
(metaClass includesSelector:#mainMenu) ifFalse:[ |
|
1034 |
txt := self class initialMenuSpecMethodSourceForApplications. |
|
1035 |
self |
|
1036 |
compile:(txt bindWith:className) |
|
1037 |
forClass:metaClass |
|
1038 |
inCategory:'menu specs'. |
|
1039 |
]. |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1040 |
(metaClass includesSelector:#toolbarMenu) ifFalse:[ |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1041 |
txt := self class initialToolbarMenuSpecMethodSource. |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1042 |
self |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1043 |
compile:(txt bindWith:className) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1044 |
forClass:metaClass |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1045 |
inCategory:'menu specs'. |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1046 |
]. |
5758 | 1047 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1048 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1049 |
#'hasUnsavedChanges' 'private queries' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1050 |
#'closeRequest' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1051 |
#'closeDownViews' 'initialization & release' |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1052 |
#'menuReload' '*' |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1053 |
#'menuSaveAs' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1054 |
#'menuNew' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1055 |
#'menuOpen' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1056 |
#'menuSave' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1057 |
#'doSaveAs' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1058 |
#'openDocumentation' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1059 |
#'openAboutThisApplication' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1060 |
) pairWiseDo:compileTemplateAction. |
5758 | 1061 |
]. |
1062 |
||
1063 |
isDialog ifTrue:[ |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1064 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1065 |
#'closeAccept' 'user actions' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1066 |
) pairWiseDo:compileTemplateAction. |
5758 | 1067 |
]. |
1068 |
||
6050 | 1069 |
self executeCollectedChangesNamed:('Add Application Code for ' , className). |
5758 | 1070 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1071 |
"Modified: / 27-10-2006 / 10:21:58 / cg" |
5758 | 1072 |
! |
1073 |
||
8987 | 1074 |
createClassInitializeMethodIn:aClass |
1075 |
"create a #initialize method on the class side (I'm tired of typing)" |
|
1076 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1077 |
self subclassResponsibility |
8987 | 1078 |
! |
1079 |
||
5758 | 1080 |
createClassResponsibleProtocolFor:aClass |
1081 |
"create stubs for the required protocol" |
|
1082 |
||
6050 | 1083 |
|nonMetaClass metaClass className| |
1084 |
||
1085 |
nonMetaClass := aClass theNonMetaclass. |
|
1086 |
metaClass := aClass theMetaclass. |
|
1087 |
className := nonMetaClass name. |
|
1088 |
||
5758 | 1089 |
self startCollectChanges. |
1090 |
||
6050 | 1091 |
self privCreateClassResponsibleProtocolFor:nonMetaClass. |
1092 |
self privCreateClassResponsibleProtocolFor:metaClass. |
|
5758 | 1093 |
|
6050 | 1094 |
self executeCollectedChangesNamed:('Add Required Protocol to ' , className). |
5758 | 1095 |
! |
1096 |
||
1097 |
createClassTypeTestMethodsIn:aClass forClasses:subClasses |
|
1098 |
"create a #isXXX test methods (I'm tired of typing)" |
|
1099 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1100 |
self subclassResponsibility |
5758 | 1101 |
! |
1102 |
||
1103 |
createDocumentationMethodsFor:aClass |
|
1104 |
"create empty documentation methods" |
|
1105 |
||
6050 | 1106 |
|nonMetaClass metaClass className| |
5758 | 1107 |
|
6050 | 1108 |
nonMetaClass := aClass theNonMetaclass. |
1109 |
metaClass := aClass theMetaclass. |
|
1110 |
className := nonMetaClass name. |
|
5758 | 1111 |
|
1112 |
self startCollectChanges. |
|
1113 |
||
8890 | 1114 |
"/ self createVersionMethodFor:metaClass. |
6050 | 1115 |
self createCopyrightMethodFor:metaClass. |
1116 |
self createDocumentationMethodFor:metaClass. |
|
8572 | 1117 |
self createExamplesMethodFor:metaClass. |
1118 |
"/ self createInitialHistoryMethodFor:metaClass. |
|
5758 | 1119 |
|
6050 | 1120 |
self executeCollectedChangesNamed:('Add Documentation to ' , className). |
5758 | 1121 |
! |
1122 |
||
6313 | 1123 |
createEnumTypeCodeFor:aClass |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1124 |
self subclassResponsibility |
6313 | 1125 |
! |
1126 |
||
8572 | 1127 |
createExamplesMethodForViewClass:aClass |
1128 |
"create an examples method" |
|
1129 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1130 |
self subclassResponsibility |
8572 | 1131 |
! |
1132 |
||
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1133 |
createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1134 |
"create a #initialize methods (I'm tired of typing)" |
5758 | 1135 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1136 |
self subclassResponsibility |
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1137 |
! |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1138 |
|
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1139 |
createInitializedInstanceCreationMethodsIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1140 |
"create a #new and #initialize methods (I'm tired of typing)" |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1141 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1142 |
self subclassResponsibility |
6718 | 1143 |
! |
1144 |
||
13627 | 1145 |
createIsAbstractMethodIn:aClass |
1146 |
"create a #isAbstract query method (I'm tired of typing)" |
|
1147 |
||
1148 |
self subclassResponsibility |
|
1149 |
! |
|
1150 |
||
6718 | 1151 |
createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
1152 |
"create a #selector instance creation method (I'm tired of typing)" |
|
1153 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1154 |
self subclassResponsibility |
5758 | 1155 |
! |
1156 |
||
7470 | 1157 |
createPoolInitializationCodeFor:aClass |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1158 |
self subclassResponsibility |
7470 | 1159 |
! |
1160 |
||
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1161 |
createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1162 |
"create a redefined #new methods" |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1163 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1164 |
self subclassResponsibility |
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1165 |
! |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1166 |
|
9757
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1167 |
createSingletonPatternInstanceCreationMethodsIn:aClass usingVariable:varName |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1168 |
"create redefined #new methods for a singleton pattern" |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1169 |
|
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1170 |
self subclassResponsibility |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1171 |
|
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1172 |
"Created: / 10-02-2011 / 16:32:36 / cg" |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1173 |
! |
3530070667d5
added: #classMenuGenerateSingletonPatternInstanceCreationMethods
Claus Gittinger <cg@exept.de>
parents:
9705
diff
changeset
|
1174 |
|
16695
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1175 |
createStandaloneStartupCodeFor:arg |
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1176 |
"raise an error: must be redefined in concrete subclass(es)" |
10592 | 1177 |
|
16695
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1178 |
^ self subclassResponsibility |
10592 | 1179 |
|
1180 |
! |
|
1181 |
||
5953 | 1182 |
createStandardPrintOnMethodIn:aClass |
1183 |
"create a #printOn: method (I'm tired of typing)" |
|
1184 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1185 |
self subclassResponsibility |
5953 | 1186 |
! |
1187 |
||
9081 | 1188 |
createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1189 |
"create startup code (main)" |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1190 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1191 |
self subclassResponsibility |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1192 |
! |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1193 |
|
5758 | 1194 |
createTestCaseSampleCodeFor:aClass |
1195 |
"create an (almost) empty testCase class" |
|
1196 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1197 |
self subclassResponsibility |
5758 | 1198 |
! |
1199 |
||
10256 | 1200 |
createVisitorMethodsIn:visitedClass andCompilerClass:visitorClass |
1201 |
" |
|
1202 |
This is much like createVisitorMethodsIn:andVisitorClass:, |
|
1203 |
but generates |
|
1204 |
acceptVisitor:forEffect: |
|
1205 |
and |
|
1206 |
visit<NODE>:forEffect: |
|
1207 |
in visit* methods. |
|
1208 |
" |
|
1209 |
||
1210 |
|sel superSel | |
|
1211 |
||
1212 |
self assert:( visitedClass isMeta not ). |
|
1213 |
self assert:( visitorClass isMeta not ). |
|
1214 |
||
1215 |
self startCollectChanges. |
|
1216 |
||
1217 |
sel := ('visit' , visitedClass nameWithoutPrefix , ':'). |
|
1218 |
superSel := ('visit' , visitedClass superclass nameWithoutPrefix , ':'). |
|
1219 |
||
1220 |
(visitedClass includesSelector:#acceptVisitor:forEffect:) ifFalse: |
|
1221 |
[self addChange: |
|
19607
f9108fde4972
Move `CodeGenerator` and `CodeGeneratorTests` to namespace `Tools`
Jan Vrany <jan.vrany@labware.com>
parents:
19595
diff
changeset
|
1222 |
(Tools::CodeGenerator new |
10256 | 1223 |
class: visitedClass; |
1224 |
protocol: 'visiting'; |
|
1225 |
source: ('acceptVisitor: visitor forEffect: effect |
|
1226 |
"Double dispatch back to the visitor, passing my type encoded in |
|
1227 |
the selector (visitor pattern) and given effect" |
|
1228 |
||
1229 |
"stub code automatically generated - please change if required" |
|
1230 |
||
1231 |
^visitor `@sel: self forEffect: effect'); |
|
1232 |
replace: '`@sel:' with: sel asSymbol; |
|
1233 |
change) |
|
1234 |
]. |
|
1235 |
||
1236 |
||
1237 |
||
1238 |
||
1239 |
(visitorClass includesSelector:(sel, 'forEffect:') asSymbol) ifFalse:[ |
|
1240 |
self addChange: |
|
19607
f9108fde4972
Move `CodeGenerator` and `CodeGeneratorTests` to namespace `Tools`
Jan Vrany <jan.vrany@labware.com>
parents:
19595
diff
changeset
|
1241 |
(Tools::CodeGenerator new |
10256 | 1242 |
class: visitorClass; |
1243 |
protocol: 'visiting'; |
|
1244 |
source: ('`@sel: anObject forEffect: effect |
|
1245 |
"dispatched back from the visited object (visitor pattern)" |
|
1246 |
||
1247 |
^ self `@superSel: anObject forEffect: effect'); |
|
1248 |
replace: '`@sel:' with: sel asSymbol; |
|
1249 |
replace: '`@superSel:' with: superSel asSymbol; |
|
1250 |
change) |
|
1251 |
]. |
|
1252 |
||
1253 |
||
1254 |
(visitorClass includesSelector:#'visit:') ifFalse:[ |
|
1255 |
self |
|
1256 |
compile: |
|
1257 |
('visit:anObject |
|
1258 |
"visit anObject (visitor pattern). |
|
1259 |
The object should call back one of my visitXXXX methods." |
|
1260 |
||
1261 |
^ anObject acceptVisitor:self |
|
1262 |
') |
|
1263 |
forClass:visitorClass |
|
1264 |
inCategory:'visiting'. |
|
1265 |
]. |
|
1266 |
||
1267 |
self executeCollectedChangesNamed:('Create Compiler Visiting Methods'). |
|
1268 |
||
1269 |
"Created: / 20-03-2010 / 10:49:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1270 |
! |
|
1271 |
||
1272 |
createVisitorMethodsIn:visitedClass andVisitorClass2:visitorClass |
|
1273 |
" |
|
1274 |
This is much like createVisitorMethodsIn:andVisitorClass:, |
|
1275 |
but generates |
|
1276 |
self visitSuperclass: anObject |
|
1277 |
in visit* methods. |
|
1278 |
" |
|
1279 |
||
1280 |
|sel superSel | |
|
1281 |
||
1282 |
self assert:( visitedClass isMeta not ). |
|
1283 |
self assert:( visitorClass isMeta not ). |
|
1284 |
||
1285 |
self startCollectChanges. |
|
1286 |
||
1287 |
sel := ('visit' , visitedClass nameWithoutPrefix , ':'). |
|
1288 |
superSel := ('visit' , visitedClass superclass nameWithoutPrefix , ':'). |
|
1289 |
self createAcceptVisitorMethod:sel in:visitedClass. |
|
1290 |
||
1291 |
(visitorClass includesSelector:sel) ifFalse:[ |
|
1292 |
self addChange: |
|
19607
f9108fde4972
Move `CodeGenerator` and `CodeGeneratorTests` to namespace `Tools`
Jan Vrany <jan.vrany@labware.com>
parents:
19595
diff
changeset
|
1293 |
(Tools::CodeGenerator new |
10256 | 1294 |
class: visitorClass; |
1295 |
protocol: 'visiting'; |
|
1296 |
source: ('`@sel: anObject |
|
1297 |
"dispatched back from the visited %2-object (visitor pattern)" |
|
1298 |
||
1299 |
^ self `@superSel: anObject'); |
|
1300 |
replace: '`@sel:' with: sel asSymbol; |
|
1301 |
replace: '`@superSel:' with: superSel asSymbol; |
|
1302 |
change) |
|
1303 |
]. |
|
1304 |
||
1305 |
||
1306 |
(visitorClass includesSelector:#'visit:') ifFalse:[ |
|
1307 |
self |
|
1308 |
compile: |
|
1309 |
('visit:anObject |
|
1310 |
"visit anObject (visitor pattern). |
|
1311 |
The object should call back one of my visitXXXX methods." |
|
1312 |
||
1313 |
^ anObject acceptVisitor:self |
|
1314 |
') |
|
1315 |
forClass:visitorClass |
|
1316 |
inCategory:'visiting'. |
|
1317 |
]. |
|
1318 |
||
1319 |
self executeCollectedChangesNamed:('Add Visitor Pattern'). |
|
1320 |
||
1321 |
"Created: / 07-07-2009 / 19:53:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1322 |
! |
|
1323 |
||
5758 | 1324 |
createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
1325 |
"create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)" |
|
1326 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1327 |
self subclassResponsibility |
6050 | 1328 |
! |
1329 |
||
13817 | 1330 |
createVisitorMethodsIn:arg1 andVisitorClass:arg2 withParameter:arg3 withSuper:arg4 |
1331 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1332 |
||
1333 |
^ self subclassResponsibility |
|
1334 |
! |
|
1335 |
||
6050 | 1336 |
createWebApplicationCodeFor:aClass |
1337 |
"create an empty webApplication framework" |
|
1338 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1339 |
self subclassResponsibility |
7973 | 1340 |
! |
1341 |
||
1342 |
createWebServiceCodeFor:aClass |
|
1343 |
"create an empty webService framework" |
|
1344 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1345 |
self subclassResponsibility |
8572 | 1346 |
! |
1347 |
||
1348 |
createWidgetCodeFor:aClass |
|
1349 |
"create usually required widget code (redraw, model update, event handling)" |
|
1350 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1351 |
self subclassResponsibility |
5758 | 1352 |
! ! |
1353 |
||
1354 |
!CodeGeneratorTool methodsFor:'code generation-basic'! |
|
1355 |
||
1356 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly lazyInitialization:lazyInitialization |
|
1357 |
"workhorse for creating access methods for instvars." |
|
1358 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1359 |
self subclassResponsibility |
5763 | 1360 |
! |
1361 |
||
7615 | 1362 |
createCollectionAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1363 |
self subclassResponsibility |
7615 | 1364 |
! |
1365 |
||
13409 | 1366 |
createGetterFor:aVarName in:aClass |
1367 |
self |
|
1368 |
createAccessMethodsFor:{ aVarName} in:aClass |
|
1369 |
withChange:false asValueHolder:false readersOnly:true writersOnly:false |
|
1370 |
lazyInitialization:false |
|
1371 |
! |
|
1372 |
||
1373 |
createSetterFor:aVarName in:aClass |
|
1374 |
self |
|
1375 |
createAccessMethodsFor:{ aVarName} in:aClass |
|
1376 |
withChange:false asValueHolder:false readersOnly:false writersOnly:true |
|
1377 |
lazyInitialization:false |
|
1378 |
||
1379 |
" |
|
1380 |
||
1381 |
" |
|
1382 |
! |
|
1383 |
||
5763 | 1384 |
createValueHoldersFor:aCollectionOfVarNames in:aClass lazyInitialization:lazyInitialization |
1385 |
"workhorse for creating access methods for instvars." |
|
1386 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1387 |
self subclassResponsibility |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1388 |
! ! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1389 |
|
5758 | 1390 |
!CodeGeneratorTool methodsFor:'code generation-individual methods'! |
3712 | 1391 |
|
1392 |
createAcceptVisitorMethod:selector in:aClass |
|
1393 |
"create an acceptVisitor: method |
|
1394 |
(I'm tired of typing)" |
|
1395 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1396 |
self subclassResponsibility |
3712 | 1397 |
! |
1398 |
||
1399 |
createAcceptVisitorMethodIn:aClass |
|
1400 |
"create an acceptVisitor: method |
|
1401 |
(I'm tired of typing)" |
|
1402 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1403 |
self subclassResponsibility |
3712 | 1404 |
! |
1405 |
||
12877 | 1406 |
createAspectMethodFor:anAspectSymbol in:aClass |
1407 |
"create an aspect method." |
|
1408 |
||
1409 |
self subclassResponsibility |
|
1410 |
! |
|
1411 |
||
3712 | 1412 |
createCopyrightMethodFor:aClass |
1413 |
"add copyright method containing your/your companies |
|
1414 |
copyright template but only if not already present. |
|
1415 |
this is only added, if specified in the |
|
1416 |
COPYRIGHT_TEMPLATE_FILE resources." |
|
1417 |
||
8258 | 1418 |
|fn copyRightText| |
3712 | 1419 |
|
1420 |
(aClass includesSelector:#copyright) ifFalse:[ |
|
1421 |
fn := SystemBrowser classResources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil. |
|
1422 |
fn notNil ifTrue:[ |
|
1423 |
fn := fn asFilename. |
|
1424 |
fn exists ifTrue:[ |
|
8488 | 1425 |
copyRightText := fn contentsAsString. |
8258 | 1426 |
self createCopyrightMethodFor:copyRightText for:aClass |
3712 | 1427 |
] |
1428 |
]. |
|
8258 | 1429 |
]. |
1430 |
! |
|
1431 |
||
1432 |
createCopyrightMethodFor:copyRightText for:aClass |
|
1433 |
"add copyright method containing text, |
|
1434 |
but only if not already present." |
|
1435 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1436 |
self subclassResponsibility |
3712 | 1437 |
! |
1438 |
||
1439 |
createDocumentationMethodFor:aClass |
|
1440 |
"add documentation method containing doc template |
|
1441 |
but only if not already present." |
|
1442 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1443 |
self subclassResponsibility |
3712 | 1444 |
! |
1445 |
||
1446 |
createExamplesMethodFor:aClass |
|
1447 |
"add examples method containing examples template |
|
1448 |
but only if not already present." |
|
1449 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1450 |
self subclassResponsibility |
3712 | 1451 |
! |
1452 |
||
11842
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1453 |
createFalseReturnMethodFor:aSelector category:cat in:aClass |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1454 |
"add a ^false method; |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1455 |
but only if not already present." |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1456 |
|
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1457 |
self subclassResponsibility |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1458 |
! |
70180ac9f3bf
+generate false return method
Claus Gittinger <cg@exept.de>
parents:
11758
diff
changeset
|
1459 |
|
3822
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1460 |
createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1461 |
self subclassResponsibility |
3822
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1462 |
! |
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1463 |
|
3712 | 1464 |
createInitialHistoryMethodFor:aClass |
1465 |
"add history method containing created-entry |
|
1466 |
but only if not already present." |
|
1467 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1468 |
self subclassResponsibility |
3712 | 1469 |
! |
1470 |
||
4512 | 1471 |
createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
1472 |
"add an inst-creation method" |
|
1473 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1474 |
self subclassResponsibility |
4512 | 1475 |
! |
1476 |
||
16248 | 1477 |
createMultiSetterInstanceCreationMethodFor:aCollectionOfVarNames in:aClass |
1478 |
"create a multi-setter instance creator method for instvars. |
|
1479 |
This creates a multi setter method (a:val1 b:val2 c:val3...) |
|
1480 |
and a corresponding new method on the class side." |
|
1481 |
||
1482 |
self subclassResponsibility |
|
1483 |
! |
|
1484 |
||
3712 | 1485 |
createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
16248 | 1486 |
"create a multi-setter method (a:val1 b:val2 c:val3...) for instvars." |
3712 | 1487 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1488 |
self subclassResponsibility |
3712 | 1489 |
! |
1490 |
||
13590 | 1491 |
createShouldImplementMethodFor:aSelector category:cat in:aClass |
1492 |
"add a shouldImplement method; |
|
1493 |
but only if not already present." |
|
1494 |
||
1495 |
self subclassResponsibility |
|
1496 |
! |
|
1497 |
||
3800
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1498 |
createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1499 |
"add a subclassResponsibility method; |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1500 |
but only if not already present." |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1501 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1502 |
self subclassResponsibility |
3800
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1503 |
! |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1504 |
|
3712 | 1505 |
createUpdateMethodIn:aClass |
1506 |
"create an update:with:from:-method |
|
1507 |
(I'm tired of typing)" |
|
1508 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1509 |
self subclassResponsibility |
3712 | 1510 |
! |
1511 |
||
1512 |
createVersionMethodFor:aClass |
|
8890 | 1513 |
<resource: #obsolete> |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1514 |
|
3712 | 1515 |
"add version method containing RCS template |
1516 |
but only if not already present and its not a private class." |
|
1517 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1518 |
self subclassResponsibility |
3712 | 1519 |
! ! |
1520 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1521 |
!CodeGeneratorTool methodsFor:'code templates'! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1522 |
|
8987 | 1523 |
codeFor_classInitialize |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1524 |
self subclassResponsibility |
8987 | 1525 |
! |
1526 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1527 |
codeFor_closeAccept |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1528 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1529 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1530 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1531 |
codeFor_closeDownViews |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1532 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1533 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1534 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1535 |
codeFor_closeRequest |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1536 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1537 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1538 |
"Created: / 27-10-2006 / 10:01:06 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1539 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1540 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1541 |
codeFor_doSaveAs |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1542 |
^ self codeFor_emptyMenuActionCodeFor:#doSaveAs menuItem:'save/saveAs' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1543 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1544 |
"Created: / 27-10-2006 / 10:22:06 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1545 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1546 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1547 |
codeFor_emptyMenuActionCodeFor:selector menuItem:item |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1548 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1549 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1550 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1551 |
codeFor_hasUnsavedChanges |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1552 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1553 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1554 |
"Created: / 27-10-2006 / 10:00:36 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1555 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1556 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1557 |
codeFor_menuNew |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1558 |
^ self codeFor_emptyMenuActionCodeFor:#menuNew menuItem:'new' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1559 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1560 |
"Created: / 27-10-2006 / 10:17:08 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1561 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1562 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1563 |
codeFor_menuOpen |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1564 |
^ self codeFor_emptyMenuActionCodeFor:#menuOpen menuItem:'open' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1565 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1566 |
"Created: / 27-10-2006 / 10:17:18 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1567 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1568 |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1569 |
codeFor_menuReload |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1570 |
^ self codeFor_emptyMenuActionCodeFor:#menuReload menuItem:'reload' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1571 |
! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1572 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1573 |
codeFor_menuSave |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1574 |
^ self codeFor_emptyMenuActionCodeFor:#menuSave menuItem:'save' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1575 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1576 |
"Created: / 27-10-2006 / 10:17:25 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1577 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1578 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1579 |
codeFor_menuSaveAs |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1580 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1581 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1582 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1583 |
codeFor_openAboutThisApplication |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1584 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1585 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1586 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1587 |
codeFor_openDocumentation |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1588 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1589 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1590 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1591 |
codeFor_postBuildWith |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1592 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1593 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1594 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1595 |
codeFor_postOpenWith |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1596 |
self subclassResponsibility |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1597 |
! |
8572 | 1598 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1599 |
codeFor_shouldImplementFor:selector inClass:aClass |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1600 |
"used in the 'generate required protocol' to generate a shouldImplement-sending |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1601 |
method for each subclassClassresponsibility method above aClass." |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1602 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1603 |
self subclassResponsibility |
8572 | 1604 |
! |
1605 |
||
10592 | 1606 |
codeFor_standAloneApplicationRegistryPath |
11170 | 1607 |
^ self codeFor_standAloneApplicationRegistryPathFor:nil |
1608 |
||
1609 |
"Created: / 19-08-2011 / 02:13:14 / cg" |
|
1610 |
! |
|
1611 |
||
1612 |
codeFor_standAloneApplicationRegistryPathFor:aClass |
|
10592 | 1613 |
self subclassResponsibility |
1614 |
||
11170 | 1615 |
"Created: / 21-01-2012 / 11:23:47 / cg" |
10592 | 1616 |
! |
1617 |
||
1618 |
codeFor_standAloneApplicationUUID |
|
1619 |
self subclassResponsibility |
|
1620 |
||
1621 |
"Created: / 19-08-2011 / 02:12:51 / cg" |
|
1622 |
! |
|
1623 |
||
16695
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1624 |
codeFor_standAloneMainFor:arg |
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1625 |
"raise an error: must be redefined in concrete subclass(es)" |
10592 | 1626 |
|
16695
a8eda516effa
Use new CmdLineParser when generating initial application startup code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16445
diff
changeset
|
1627 |
^ self subclassResponsibility |
11170 | 1628 |
! |
1629 |
||
10592 | 1630 |
codeFor_standAloneUsage |
1631 |
self subclassResponsibility |
|
1632 |
||
1633 |
"Created: / 19-08-2011 / 02:21:52 / cg" |
|
1634 |
! |
|
1635 |
||
8572 | 1636 |
code_forWidget_buttonPress |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1637 |
self subclassResponsibility |
8572 | 1638 |
! |
1639 |
||
1640 |
code_forWidget_initialize |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1641 |
self subclassResponsibility |
8572 | 1642 |
! |
1643 |
||
1644 |
code_forWidget_keyPress |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1645 |
self subclassResponsibility |
8572 | 1646 |
! |
1647 |
||
1648 |
code_forWidget_redraw |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1649 |
self subclassResponsibility |
8572 | 1650 |
! |
1651 |
||
1652 |
code_forWidget_sizeChanged |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1653 |
self subclassResponsibility |
8572 | 1654 |
! |
1655 |
||
1656 |
code_forWidget_update |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1657 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1658 |
! ! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1659 |
|
6938 | 1660 |
!CodeGeneratorTool methodsFor:'compilation'! |
1661 |
||
1662 |
compile:theCode forClass:aClass inCategory:cat |
|
1663 |
"install some code for a class. |
|
1664 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
1665 |
||
7037 | 1666 |
self |
1667 |
compile:theCode forClass:aClass inCategory:cat |
|
1668 |
skipIfSame:true |
|
1669 |
! |
|
6938 | 1670 |
|
13590 | 1671 |
compile:theCode forClass:aClass inCategory:categoryOrNil skipIfSame:skipIfSame |
7037 | 1672 |
"install some code for a class. |
1673 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
1674 |
||
16429 | 1675 |
|change compiler selector oldMethod category| |
6938 | 1676 |
|
16429 | 1677 |
category := categoryOrNil. |
13590 | 1678 |
|
7037 | 1679 |
skipIfSame ifTrue:[ |
14701
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1680 |
"JV: Do not use class's compilerClass, it may differ from |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1681 |
the compiler of this generator's language. For instance, |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1682 |
when compiling Smalltalk extension to Java or JavaScript class. |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1683 |
So, use proper compiler for language the receiver is generator for, |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1684 |
i.e., Compiler for SmalltalkCodeGenerator, JavaScriptCompiler for |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1685 |
JavaScriptCodeGenerator..." |
16392 | 1686 |
|
1687 |
"/ this is not the real compilation - but a prescan for the selector |
|
14701
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1688 |
compiler := self compilerClass new. |
7037 | 1689 |
compiler parseMethod:theCode in:aClass ignoreErrors:true ignoreWarnings:true. |
1690 |
||
1691 |
selector := compiler selector. |
|
1692 |
selector notNil ifTrue:[ |
|
13590 | 1693 |
oldMethod := aClass compiledMethodAt:selector. |
1694 |
oldMethod notNil ifTrue:[ |
|
16429 | 1695 |
oldMethod source = theCode ifTrue:[^ self ]. "/ the same. |
1696 |
||
1697 |
categoryOrNil isNil ifTrue:[ |
|
1698 |
"/ if no category given, take the existing one. |
|
1699 |
category := oldMethod category. |
|
1700 |
]. |
|
13590 | 1701 |
]. |
6938 | 1702 |
]. |
1703 |
]. |
|
1704 |
||
16429 | 1705 |
category isNil ifTrue:[ |
1706 |
category := Compiler defaultMethodCategory. |
|
1707 |
]. |
|
1708 |
||
6938 | 1709 |
self canUseRefactoringSupport ifFalse:[ |
1710 |
"/ compile immediately |
|
16429 | 1711 |
^ aClass compile:theCode classified:category. |
6938 | 1712 |
]. |
1713 |
||
13590 | 1714 |
change := InteractiveAddMethodChange compile:(theCode asString) in:aClass classified:category. |
16392 | 1715 |
change controller:(CompilationErrorHandlerQuery query). |
6938 | 1716 |
|
1717 |
compositeChangeCollector notNil ifTrue:[ |
|
16429 | 1718 |
"/ if collecting, add to changes, to be executed as one change at the end. |
1719 |
"/ In order to have only one change in the undo-list (instead of many) |
|
1720 |
compositeChangeCollector addChange:change. |
|
6938 | 1721 |
] ifFalse:[ |
16429 | 1722 |
"/ do it now. |
7037 | 1723 |
RefactoryChangeManager performChange:change. |
16429 | 1724 |
]. |
1725 |
||
6938 | 1726 |
"Modified: / 21-08-2006 / 18:39:06 / cg" |
11170 | 1727 |
"Modified (format): / 21-01-2012 / 10:40:59 / cg" |
14701
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1728 |
"Modified (format): / 05-08-2014 / 21:06:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1729 |
! |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1730 |
|
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1731 |
compilerClass |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1732 |
"Return a real compiler classto use to compile code" |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1733 |
|
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1734 |
^ self subclassResponsibility |
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1735 |
|
a10c86eb7b9c
Fixes in CodeGeneatorTool for to handle properly mixed-language classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14425
diff
changeset
|
1736 |
"Created: / 05-08-2014 / 21:01:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6938 | 1737 |
! ! |
3712 | 1738 |
|
8572 | 1739 |
!CodeGeneratorTool methodsFor:'initialization'! |
1740 |
||
10466
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1741 |
confirmChanges |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1742 |
"if true, let user confirm complicated changes; if false, just do it" |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1743 |
|
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1744 |
^ confirmChanges ? true |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1745 |
|
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1746 |
"Created: / 04-08-2011 / 17:31:45 / cg" |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1747 |
! |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1748 |
|
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1749 |
confirmChanges:aBoolean |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1750 |
"if true, let user confirm complicated changes; if false, just do it" |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1751 |
|
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1752 |
confirmChanges := aBoolean |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1753 |
|
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1754 |
"Created: / 04-08-2011 / 17:26:47 / cg" |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1755 |
! |
4b42e5a1f395
added a hook to turn off confirmations
Claus Gittinger <cg@exept.de>
parents:
10319
diff
changeset
|
1756 |
|
8572 | 1757 |
initialize |
1758 |
userPreferences := UserPreferences current. |
|
1759 |
generateComments := userPreferences generateComments. |
|
1760 |
! ! |
|
1761 |
||
19595
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1762 |
!CodeGeneratorTool methodsFor:'inspecting'! |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1763 |
|
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1764 |
inspector2TabBrowser |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1765 |
<inspector2Tab> |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1766 |
|
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1767 |
^self newInspector2Tab |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1768 |
label: 'Changes'; |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1769 |
priority: 35; |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1770 |
application: (Tools::ChangeSetBrowser2 on: (ChangeSet with:compositeChangeCollector)) |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1771 |
|
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1772 |
"Created: / 01-02-2021 / 08:35:45 / Jan Vrany <jan.vrany@labware.com>" |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1773 |
! ! |
2c27552f5d76
Add `CodeGeneratorTool >> #inspector2TabBrowser` to see collected changes
Jan Vrany <jan.vrany@labware.com>
parents:
18226
diff
changeset
|
1774 |
|
5758 | 1775 |
!CodeGeneratorTool methodsFor:'private'! |
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1776 |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1777 |
canUseRefactoringSupport |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1778 |
"check if refactory browser stuff is avaliable" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1779 |
|
5758 | 1780 |
^ self class canUseRefactoringSupport |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1781 |
! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1782 |
|
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1783 |
privCreateClassResponsibleProtocolFor:aClass |
6791
6559c9ebb561
Keep method argument names when generating required methods
Stefan Vogel <sv@exept.de>
parents:
6718
diff
changeset
|
1784 |
"create stubs for the required protocol. |
6559c9ebb561
Keep method argument names when generating required methods
Stefan Vogel <sv@exept.de>
parents:
6718
diff
changeset
|
1785 |
aClass may be a a MetaClass or a non-MetaClass" |
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1786 |
|
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1787 |
|requiredProtocol| |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1788 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1789 |
requiredProtocol := self class missingRequiredProtocolFor:aClass. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1790 |
requiredProtocol do:[:eachSelector | |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1791 |
|code implClass| |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1792 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1793 |
implClass := aClass whichClassImplements:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1794 |
implClass == Object ifFalse:[ |
9027
f2edc1bca4de
added: #codeFor_shouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9025
diff
changeset
|
1795 |
code := self codeFor_shouldImplementFor:eachSelector inClass:aClass. |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1796 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1797 |
self |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1798 |
compile:code |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1799 |
forClass:aClass |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1800 |
inCategory:(implClass compiledMethodAt:eachSelector) category. |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1801 |
] |
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1802 |
]. |
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1803 |
! ! |
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1804 |
|
3712 | 1805 |
!CodeGeneratorTool class methodsFor:'documentation'! |
1806 |
||
10594
362f9b437426
changed: #createStandaloneStartupCodeFor:
Claus Gittinger <cg@exept.de>
parents:
10592
diff
changeset
|
1807 |
version |
16194 | 1808 |
^ '$Header$' |
10594
362f9b437426
changed: #createStandaloneStartupCodeFor:
Claus Gittinger <cg@exept.de>
parents:
10592
diff
changeset
|
1809 |
! |
362f9b437426
changed: #createStandaloneStartupCodeFor:
Claus Gittinger <cg@exept.de>
parents:
10592
diff
changeset
|
1810 |
|
8890 | 1811 |
version_CVS |
16194 | 1812 |
^ '$Header$' |
16116
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
1813 |
! |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
1814 |
|
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
1815 |
version_HG |
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
1816 |
|
1e20be47b2a4
Fixed CodeGeneratorTool class>>canUseRefactoringSupport
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
1817 |
^ '$Changeset: <not expanded> $' |
3712 | 1818 |
! ! |
12877 | 1819 |