author | Claus Gittinger <cg@exept.de> |
Wed, 09 Feb 2011 14:03:29 +0100 | |
changeset 9750 | 1b2ef761d2d0 |
parent 9705 | 3c29845b149d |
child 9757 | 3530070667d5 |
permissions | -rw-r--r-- |
5141 | 1 |
" |
2 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
3712 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
14 |
Object subclass:#CodeGeneratorTool |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
15 |
instanceVariableNames:'compositeChangeCollector compositeChangeNesting userPreferences |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
16 |
generateComments' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
17 |
classVariableNames:'GenerateCommentsForGetters GenerateCommentsForSetters |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
18 |
CopyrightTemplate' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
19 |
poolDictionaries:'' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
20 |
category:'Interface-Browsers' |
3712 | 21 |
! |
22 |
||
3719 | 23 |
!CodeGeneratorTool class methodsFor:'documentation'! |
24 |
||
5141 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
3719 | 39 |
documentation |
40 |
" |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
41 |
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
|
42 |
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
|
43 |
There is probably more to come... |
3719 | 44 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
45 |
Note: being refactored into separate per-language generators |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
46 |
|
3719 | 47 |
[author:] |
48 |
Claus Gittiner |
|
49 |
" |
|
50 |
! ! |
|
3712 | 51 |
|
8572 | 52 |
!CodeGeneratorTool class methodsFor:'instance creation'! |
53 |
||
54 |
new |
|
55 |
^ self basicNew initialize. |
|
56 |
! ! |
|
57 |
||
3712 | 58 |
!CodeGeneratorTool class methodsFor:'code generation'! |
59 |
||
60 |
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
|
61 |
"create accessors in aClass" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
62 |
|
5758 | 63 |
^ self new |
6313 | 64 |
createAccessMethodsFor:aCollectionOfVarNames |
65 |
in:aClass |
|
66 |
withChange:withChange |
|
67 |
asValueHolder:asValueHolder |
|
68 |
readersOnly:readersOnly |
|
69 |
writersOnly:writersOnly |
|
4444
6b077945517c
generate instvar accessors with lazy-init
Claus Gittinger <cg@exept.de>
parents:
4351
diff
changeset
|
70 |
! |
6b077945517c
generate instvar accessors with lazy-init
Claus Gittinger <cg@exept.de>
parents:
4351
diff
changeset
|
71 |
|
3712 | 72 |
createApplicationCodeFor:aClass |
73 |
"create an empty application framework" |
|
74 |
||
5758 | 75 |
^ self new createApplicationCodeFor:aClass |
3712 | 76 |
! |
77 |
||
3804 | 78 |
createClassResponsibleProtocolFor:aClass |
79 |
"create stubs for the required protocol" |
|
80 |
||
5758 | 81 |
^ self new createClassResponsibleProtocolFor:aClass |
3804 | 82 |
! |
83 |
||
5124 | 84 |
createClassTypeTestMethodsIn:aClass forClasses:subClasses |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
85 |
"create a #isXXX test methods (I'm tired of typing)" |
4351 | 86 |
|
5758 | 87 |
^ self new createClassTypeTestMethodsIn:aClass forClasses:subClasses |
4351 | 88 |
! |
89 |
||
3712 | 90 |
createDocumentationMethodsFor:aClass |
91 |
"create empty documentation methods" |
|
92 |
||
5758 | 93 |
^ self new createDocumentationMethodsFor:aClass |
3712 | 94 |
! |
95 |
||
6313 | 96 |
createEnumTypeCodeFor:aClass |
97 |
^ self new createEnumTypeCodeFor:aClass |
|
98 |
! |
|
99 |
||
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
100 |
createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
101 |
"create a #initialize methods (I'm tired of typing)" |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
102 |
|
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
103 |
^ self new createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
104 |
! |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
105 |
|
6718 | 106 |
createInitializedInstanceCreationMethodsIn:aClass |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
107 |
"create a #new and #initialize methods (I'm tired of typing)" |
3712 | 108 |
|
6718 | 109 |
^ self new createInitializedInstanceCreationMethodsIn:aClass |
110 |
! |
|
111 |
||
112 |
createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
|
113 |
"create a #selector instance creation method (I'm tired of typing)" |
|
114 |
||
115 |
^ self new createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
|
3712 | 116 |
! |
117 |
||
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
118 |
createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
119 |
"create a redefined #new method" |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
120 |
|
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
121 |
^ self new createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
122 |
! |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
123 |
|
9081 | 124 |
createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
125 |
"create standAloneStartup code" |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
126 |
|
9081 | 127 |
^ self new createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
128 |
! |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
129 |
|
3712 | 130 |
createTestCaseSampleCodeFor:aClass |
4590 | 131 |
"create an (almost) empty testCase class" |
3712 | 132 |
|
5758 | 133 |
^ self new createTestCaseSampleCodeFor:aClass |
3712 | 134 |
! |
135 |
||
136 |
createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
137 |
"create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)" |
3712 | 138 |
|
5758 | 139 |
^ self new createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
3712 | 140 |
! |
141 |
||
6050 | 142 |
createWebApplicationCodeFor:aClass |
143 |
"create an empty webApplication framework" |
|
144 |
||
145 |
^ self new createWebApplicationCodeFor:aClass |
|
146 |
! |
|
147 |
||
7973 | 148 |
createWebServiceCodeFor:aClass |
149 |
"create an empty webService framework" |
|
150 |
||
151 |
^ self new createWebServiceCodeFor:aClass |
|
152 |
! |
|
153 |
||
8572 | 154 |
createWidgetCodeFor:aClass |
155 |
"create usually required widget code (redraw, model update, event handling)" |
|
156 |
||
157 |
^ self new createWidgetCodeFor:aClass |
|
158 |
! |
|
159 |
||
3712 | 160 |
initialMenuSpecMethodSourceForApplications |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
161 |
"return code for a menuSpec with typical stuff in it" |
3712 | 162 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
163 |
self subclassResponsibility |
7973 | 164 |
! |
165 |
||
166 |
initialPageMenuSpecMethodSourceForWebApplications |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
167 |
"return code for a menuSpec with typical stuff in it" |
7973 | 168 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
169 |
self subclassResponsibility |
7973 | 170 |
|
171 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
172 |
SmalltalkCodeGeneratorTool initialPageMenuSpecMethodSourceForWebApplications |
7973 | 173 |
" |
174 |
! |
|
175 |
||
176 |
initialPageSpecMethodSourceForWebApplications |
|
177 |
"return an empty pageSpec" |
|
178 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
179 |
self subclassResponsibility |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
180 |
! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
181 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
182 |
initialToolbarMenuSpecMethodSource |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
183 |
"return a menuSpec with typical stuff in it" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
184 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
185 |
self subclassResponsibility |
9054 | 186 |
|
187 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
188 |
SmalltalkCodeGenerator initialToolbarMenuSpecMethodSource |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
189 |
" |
9054 | 190 |
! |
191 |
||
3712 | 192 |
initialWindowSpecMethodSourceForApplications |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
193 |
"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
|
194 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
195 |
self subclassResponsibility |
3712 | 196 |
|
197 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
198 |
SmalltalkCodeGeneraotTool initialWindowSpecMethodSourceForApplications |
9054 | 199 |
" |
3712 | 200 |
! |
201 |
||
202 |
initialWindowSpecMethodSourceForDialogs |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
203 |
"return an empty windowSpec for dialogs" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
204 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
205 |
self subclassResponsibility |
3712 | 206 |
|
207 |
" |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
208 |
SmalltalkCodeGeneraotTool initialWindowSpecMethodSourceForDialogs |
3712 | 209 |
" |
210 |
! ! |
|
211 |
||
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
212 |
!CodeGeneratorTool class methodsFor:'code generation-basic'! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
213 |
|
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
214 |
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
|
215 |
"workhorse for creating access methods for instvars." |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
216 |
|
5758 | 217 |
^ self new |
218 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly lazyInitialization:lazyInitialization |
|
219 |
! ! |
|
220 |
||
221 |
!CodeGeneratorTool class methodsFor:'code generation-individual methods'! |
|
222 |
||
223 |
createAcceptVisitorMethod:selector in:aClass |
|
224 |
"create an acceptVisitor: method |
|
225 |
(I'm tired of typing)" |
|
226 |
||
227 |
^ self new createAcceptVisitorMethod:selector in:aClass |
|
228 |
! |
|
229 |
||
230 |
createAcceptVisitorMethodIn:aClass |
|
231 |
"create an acceptVisitor: method |
|
232 |
(I'm tired of typing)" |
|
233 |
||
234 |
^ self new createAcceptVisitorMethodIn:aClass |
|
235 |
! |
|
236 |
||
237 |
createCopyrightMethodFor:aClass |
|
238 |
"add copyright method containing your/your companies |
|
239 |
copyright template but only if not already present. |
|
240 |
this is only added, if specified in the |
|
241 |
COPYRIGHT_TEMPLATE_FILE resources." |
|
242 |
||
243 |
^ self new createCopyrightMethodFor:aClass |
|
244 |
! |
|
245 |
||
246 |
createDocumentationMethodFor:aClass |
|
247 |
"add documentation method containing doc template |
|
248 |
but only if not already present." |
|
249 |
||
250 |
^ self new createDocumentationMethodFor:aClass |
|
251 |
! |
|
252 |
||
253 |
createExamplesMethodFor:aClass |
|
254 |
"add examples method containing examples template |
|
255 |
but only if not already present." |
|
256 |
||
257 |
^ self new createExamplesMethodFor:aClass |
|
258 |
! |
|
259 |
||
260 |
createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel |
|
261 |
^ self new createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel |
|
262 |
! |
|
263 |
||
264 |
createInitialHistoryMethodFor:aClass |
|
265 |
"add history method containing created-entry |
|
266 |
but only if not already present." |
|
267 |
||
268 |
^ self new createInitialHistoryMethodFor:aClass |
|
269 |
! |
|
270 |
||
271 |
createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
|
272 |
"add an inst-creation method" |
|
273 |
||
274 |
^ self new createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
|
275 |
! |
|
276 |
||
277 |
createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
|
278 |
"create a multi-setter method for instvars." |
|
279 |
||
280 |
^ self new createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
|
281 |
! |
|
282 |
||
283 |
createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
|
284 |
"add a subclassResponsibility method; |
|
285 |
but only if not already present." |
|
286 |
||
287 |
^ self new createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
|
288 |
! |
|
289 |
||
290 |
createUpdateMethodIn:aClass |
|
291 |
"create an update:with:from:-method |
|
292 |
(I'm tired of typing)" |
|
293 |
||
294 |
^ self new createUpdateMethodIn:aClass |
|
295 |
! |
|
296 |
||
297 |
createVersionMethodFor:aClass |
|
298 |
"add version method containing RCS template |
|
299 |
but only if not already present and its not a private class." |
|
300 |
||
301 |
^ self new createVersionMethodFor:aClass |
|
302 |
! ! |
|
303 |
||
7973 | 304 |
!CodeGeneratorTool class methodsFor:'code generation-menus'! |
305 |
||
306 |
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
|
307 |
self subclassResponsibility |
7973 | 308 |
! |
309 |
||
310 |
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
|
311 |
self subclassResponsibility |
7973 | 312 |
! ! |
313 |
||
5758 | 314 |
!CodeGeneratorTool class methodsFor:'compilation'! |
315 |
||
316 |
compile:theCode forClass:aClass inCategory:cat |
|
317 |
"install some code for a class. |
|
318 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
319 |
||
320 |
^ self new compile:theCode forClass:aClass inCategory:cat |
|
321 |
! ! |
|
322 |
||
8258 | 323 |
!CodeGeneratorTool class methodsFor:'defaults'! |
324 |
||
325 |
copyrightTemplate |
|
326 |
"return the contents of COPYRIGHT_TEMPLATE_FILE resources |
|
327 |
or a standard template" |
|
328 |
||
329 |
|fn| |
|
330 |
||
331 |
CopyrightTemplate notNil ifTrue:[^ CopyrightTemplate]. |
|
332 |
||
333 |
fn := SystemBrowser classResources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil. |
|
334 |
fn notNil ifTrue:[ |
|
335 |
fn := fn asFilename. |
|
336 |
fn exists ifTrue:[ |
|
8488 | 337 |
^ fn contentsAsString. |
8258 | 338 |
]. |
339 |
]. |
|
340 |
^ ' COPYRIGHT (c) %1 by >>yourCompany<< |
|
341 |
All Rights Reserved |
|
342 |
||
343 |
This software is furnished under a license and may be used |
|
344 |
only in accordance with the terms of that license and with the |
|
345 |
inclusion of the above copyright notice. This software may not |
|
346 |
be provided or otherwise made available to, or used by, any |
|
347 |
other person. No title to or ownership of the software is |
|
348 |
hereby transferred. |
|
349 |
'. |
|
350 |
! |
|
351 |
||
352 |
copyrightTemplate:aString |
|
8488 | 353 |
"set the COPYRIGHT_TEMPLATE_FILE" |
354 |
||
8258 | 355 |
CopyrightTemplate := aString. |
356 |
! ! |
|
357 |
||
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
358 |
!CodeGeneratorTool class methodsFor:'interface specs'! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
359 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
360 |
initialMenuSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
361 |
"return a menuSpec with typical stuff in it" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
362 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
363 |
"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
|
364 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
365 |
"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
|
366 |
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
|
367 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
368 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
369 |
MenuEditor new openOnClass:self andSelector:#initialMenuSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
370 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
371 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
372 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
373 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
374 |
^ #(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
375 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
376 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
377 |
#label: 'File' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
378 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
379 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
380 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
381 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
382 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
383 |
#label: 'New' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
384 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
385 |
#value: #menuNew |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
386 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
387 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
388 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
389 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
390 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
391 |
#label: 'Open...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
392 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
393 |
#value: #menuOpen |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
394 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
395 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
396 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
397 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
398 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
399 |
#label: 'Save' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
400 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
401 |
#value: #menuSave |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
402 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
403 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
404 |
#label: 'Save As...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
405 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
406 |
#value: #menuSaveAs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
407 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
408 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
409 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
410 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
411 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
412 |
#label: 'Exit' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
413 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
414 |
#value: #closeRequest |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
415 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
416 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
417 |
nil |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
420 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
421 |
#label: 'Help' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
422 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
423 |
#startGroup: #right |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
424 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
425 |
#(#Menu |
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 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
428 |
#label: 'Documentation' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
429 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
430 |
#value: #openDocumentation |
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: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
434 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
435 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
436 |
#label: 'About this Application...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
437 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
438 |
#value: #openAboutThisApplication |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
439 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
440 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
441 |
nil |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
444 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
445 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
446 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
447 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
448 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
449 |
initialPageMenuSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
450 |
"return a menuSpec with typical stuff in it" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
451 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
452 |
"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
|
453 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
454 |
"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
|
455 |
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
|
456 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
457 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
458 |
MenuEditor new openOnClass:self andSelector:#initialPageMenuSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
459 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
460 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
461 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
462 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
463 |
^ #(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
464 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
465 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
466 |
#label: 'File' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
467 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
468 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
469 |
#(#Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
470 |
#( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
471 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
472 |
#label: 'New' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
473 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
474 |
#value: #menuNew |
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 |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
477 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
478 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
479 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
480 |
#label: 'Open...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
481 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
482 |
#value: #menuOpen |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
483 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
484 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
485 |
#label: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
486 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
487 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
488 |
#label: 'Save' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
489 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
490 |
#value: #menuSave |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
491 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
492 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
493 |
#label: 'Save As...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
494 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
495 |
#value: #menuSaveAs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
496 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
497 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
498 |
#label: '-' |
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 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
501 |
#label: 'Exit' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
502 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
503 |
#value: #closeRequest |
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 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
506 |
nil |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
509 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
510 |
#label: 'Help' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
511 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
512 |
#startGroup: #right |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
513 |
#submenu: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
514 |
#(#Menu |
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 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
517 |
#label: 'Documentation' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
518 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
519 |
#value: #openDocumentation |
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: '-' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
523 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
524 |
#(#MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
525 |
#label: 'About this Application...' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
526 |
#translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
527 |
#value: #openAboutThisApplication |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
528 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
529 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
530 |
nil |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
533 |
) nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
534 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
535 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
536 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
537 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
538 |
initialPageSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
539 |
"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
|
540 |
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
|
541 |
|
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 |
UIPainter new openOnClass:self andSelector:#initialPageSpecForWebApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
544 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
545 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
546 |
<resource: #canvas> |
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 |
^ #(#FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
549 |
#window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
550 |
#(#WindowSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
551 |
#name: ''%1'' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
552 |
#layout: #(#LayoutFrame 204 0 162 0 503 0 461 0) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
553 |
#label: ''%1'' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
554 |
#min: #(#Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
555 |
#max: #(#Point 1024 768) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
556 |
#bounds: #(#Rectangle 204 162 504 462) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
557 |
#menu: #pageMenu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
558 |
#usePreferredExtent: false |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
559 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
560 |
#component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
561 |
#(#SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
562 |
#collection: #() |
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 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
566 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
567 |
initialToolbarMenuSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
568 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
569 |
by the MenuEditor of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
570 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
571 |
"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
|
572 |
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
|
573 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
574 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
575 |
MenuEditor new openOnClass:CodeGeneratorTool andSelector:#initialToolbarMenuSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
576 |
(Menu new fromLiteralArrayEncoding:(CodeGeneratorTool initialToolbarMenuSpec)) startUp |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
577 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
578 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
579 |
<resource: #menu> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
580 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
581 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
582 |
#(Menu |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
583 |
( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
584 |
(MenuItem |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
585 |
label: 'Reload' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
586 |
itemValue: menuReload |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
587 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
588 |
labelImage: (ResourceRetriever ToolbarIconLibrary reload24x24Icon) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
589 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
590 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
591 |
nil |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
592 |
nil |
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 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
595 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
596 |
initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
597 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
598 |
by the UIPainter of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
599 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
600 |
"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
|
601 |
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
|
602 |
|
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 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
605 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
606 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
607 |
<resource: #canvas> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
608 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
609 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
610 |
#(FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
611 |
name: initialWindowSpecForApplications |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
612 |
window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
613 |
(WindowSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
614 |
label: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
615 |
name: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
616 |
min: (Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
617 |
bounds: (Rectangle 0 0 300 300) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
618 |
menu: mainMenu |
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 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
621 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
622 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
623 |
(LabelSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
624 |
label: 'Hello World' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
625 |
name: 'Label1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
626 |
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
|
627 |
translateLabel: true |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
630 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
631 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
632 |
) |
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 |
"Modified: / 07-05-2010 / 14:21:48 / cg" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
635 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
636 |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
637 |
initialWindowSpecForApplications2 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
638 |
"This resource specification was automatically generated |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
639 |
by the UIPainter of ST/X." |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
640 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
641 |
"Do not manually edit this!! If it is corrupted, |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
642 |
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
|
643 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
644 |
" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
645 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForApplications2 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
646 |
" |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
647 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
648 |
<resource: #canvas> |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
649 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
650 |
^ |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
651 |
#(FullSpec |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
652 |
name: initialWindowSpecForApplications2 |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
653 |
window: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
654 |
(WindowSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
655 |
label: '%1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
656 |
name: '%1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
657 |
min: (Point 10 10) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
658 |
bounds: (Rectangle 0 0 300 300) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
659 |
menu: mainMenu |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
660 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
661 |
component: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
662 |
(SpecCollection |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
663 |
collection: ( |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
664 |
(MenuPanelSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
665 |
name: 'ToolBar1' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
666 |
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
|
667 |
menu: toolbarMenu |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
668 |
textDefault: true |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
669 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
670 |
(ViewSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
671 |
name: 'Box1' |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
672 |
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
|
673 |
level: 1 |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
674 |
component: |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
675 |
(SpecCollection |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
676 |
collection: ( |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
677 |
(LabelSpec |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
678 |
label: 'Hello World' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
679 |
name: 'Contents' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
680 |
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
|
681 |
translateLabel: true |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
682 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
683 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
684 |
|
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
685 |
) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
686 |
) |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
687 |
(ViewSpec |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
688 |
name: 'Box2' |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
689 |
layout: (LayoutFrame 0 0 -26 1 0 1 0 1) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
690 |
level: 1 |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
691 |
component: |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
692 |
(SpecCollection |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
693 |
collection: ( |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
694 |
(LabelSpec |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
695 |
label: 'InfoLabel' |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
696 |
name: 'Label2' |
9261
5d817a638b5d
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9236
diff
changeset
|
697 |
layout: (LayoutFrame 0 0 -26 1 -1 1 0 1) |
9100
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
698 |
level: -1 |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
699 |
translateLabel: true |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
700 |
labelChannel: infoLabelHolder |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
701 |
adjust: left |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
702 |
) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
703 |
) |
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
704 |
|
885eaa429d6f
changed: #initialWindowSpecForApplications2
Claus Gittinger <cg@exept.de>
parents:
9099
diff
changeset
|
705 |
) |
9099
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 |
|
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 |
) |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
711 |
! |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
712 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
713 |
initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
714 |
"This resource specification was automatically generated |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
715 |
by the UIPainter of ST/X." |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
716 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
717 |
"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
|
718 |
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
|
719 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
720 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
721 |
UIPainter new openOnClass:CodeGeneratorTool andSelector:#initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
722 |
" |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
723 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
724 |
<resource: #canvas> |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
725 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
726 |
^ |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
727 |
#(FullSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
728 |
name: initialWindowSpecForDialogs |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
729 |
window: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
730 |
(WindowSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
731 |
label: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
732 |
name: '%1' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
733 |
min: (Point 10 10) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
734 |
bounds: (Rectangle 0 0 300 300) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
735 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
736 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
737 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
738 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
739 |
(HorizontalPanelViewSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
740 |
name: 'buttonPanel' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
741 |
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
|
742 |
horizontalLayout: spreadSpaceMax |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
743 |
verticalLayout: center |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
744 |
horizontalSpace: 3 |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
745 |
verticalSpace: 3 |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
746 |
reverseOrderIfOKAtLeft: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
747 |
component: |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
748 |
(SpecCollection |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
749 |
collection: ( |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
750 |
(ActionButtonSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
751 |
label: 'Cancel' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
752 |
name: 'cancelButton' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
753 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
754 |
tabable: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
755 |
model: cancel |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
756 |
extent: (Point 125 22) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
757 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
758 |
(ActionButtonSpec |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
759 |
label: 'OK' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
760 |
name: 'okButton' |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
761 |
translateLabel: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
762 |
tabable: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
763 |
model: accept |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
764 |
isDefault: true |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
765 |
extent: (Point 125 22) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
766 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
767 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
768 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
769 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
770 |
) |
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 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
774 |
) |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
775 |
|
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
776 |
"Modified: / 07-05-2010 / 14:21:55 / cg" |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
777 |
! ! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
778 |
|
5758 | 779 |
!CodeGeneratorTool class methodsFor:'private'! |
780 |
||
781 |
canUseRefactoringSupport |
|
782 |
"check if refactory browser stuff is avaliable" |
|
783 |
||
784 |
^ RefactoryChangeManager notNil |
|
785 |
and:[RefactoryChangeManager isLoaded |
|
786 |
and:[UserPreferences current useRefactoringSupport]] |
|
7973 | 787 |
! |
788 |
||
789 |
methodNameTemplateFor:aSelector |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
790 |
self subclassResponsibility |
5758 | 791 |
! ! |
792 |
||
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
793 |
!CodeGeneratorTool class methodsFor:'utilities'! |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
794 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
795 |
missingRequiredProtocolFor:aClass |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
796 |
"return the missing required protocol; |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
797 |
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
|
798 |
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
|
799 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
800 |
|requiredSelectors implementedSelectors| |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
801 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
802 |
requiredSelectors := IdentitySet new. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
803 |
implementedSelectors := IdentitySet withAll:(aClass methodDictionary keys). |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
804 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
805 |
aClass allSuperclassesDo:[:eachSuperClass | |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
806 |
eachSuperClass methodDictionary keysAndValuesDo:[:eachSelector :eachMethod | |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
807 |
((eachMethod sends:#subclassResponsibility) or:[eachMethod sends:#subclassResponsibility:]) ifTrue:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
808 |
(implementedSelectors includes:eachSelector) ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
809 |
requiredSelectors add:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
810 |
] |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
811 |
] ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
812 |
(requiredSelectors includes:eachSelector) ifFalse:[ |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
813 |
implementedSelectors add:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
814 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
815 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
816 |
] |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
817 |
]. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
818 |
^ requiredSelectors |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
819 |
! ! |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
820 |
|
5759 | 821 |
!CodeGeneratorTool methodsFor:'buld changes'! |
822 |
||
5763 | 823 |
addChange:aChange |
824 |
compositeChangeCollector addChange:aChange |
|
825 |
! |
|
826 |
||
5759 | 827 |
executeCollectedChangesNamed:name |
828 |
compositeChangeCollector notNil ifTrue:[ |
|
829 |
compositeChangeNesting := compositeChangeNesting - 1. |
|
830 |
compositeChangeNesting == 0 ifTrue:[ |
|
831 |
compositeChangeCollector name:name. |
|
832 |
compositeChangeCollector changesSize == 0 ifTrue:[ |
|
833 |
self information:'Nothing generated.'. |
|
834 |
] ifFalse:[ |
|
7037 | 835 |
RefactoryChangeManager performChange:compositeChangeCollector. |
5759 | 836 |
]. |
837 |
compositeChangeCollector := nil. |
|
838 |
] |
|
839 |
] |
|
840 |
! |
|
841 |
||
842 |
startCollectChanges |
|
843 |
(self canUseRefactoringSupport) ifTrue:[ |
|
844 |
compositeChangeCollector isNil ifTrue:[ |
|
845 |
compositeChangeCollector := CompositeRefactoryChange new. |
|
846 |
compositeChangeNesting := 0. |
|
847 |
]. |
|
848 |
compositeChangeNesting := compositeChangeNesting + 1. |
|
849 |
] |
|
850 |
! ! |
|
851 |
||
5758 | 852 |
!CodeGeneratorTool methodsFor:'code generation'! |
853 |
||
854 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly |
|
855 |
"create accessors in aClass" |
|
856 |
||
857 |
self |
|
858 |
createAccessMethodsFor:aCollectionOfVarNames |
|
859 |
in:aClass |
|
860 |
withChange:withChange |
|
861 |
asValueHolder:asValueHolder |
|
862 |
readersOnly:readersOnly |
|
863 |
writersOnly:writersOnly |
|
864 |
lazyInitialization:false |
|
865 |
! |
|
866 |
||
867 |
createApplicationCodeFor:aClass |
|
868 |
"create an empty application framework" |
|
869 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
870 |
|nonMetaClass metaClass className txt isDialog |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
871 |
categoryForMenuActionsMethods compileTemplateAction| |
5758 | 872 |
|
873 |
self startCollectChanges. |
|
874 |
||
8572 | 875 |
categoryForMenuActionsMethods := userPreferences categoryForMenuActionsMethods. |
5758 | 876 |
|
877 |
nonMetaClass := aClass theNonMetaclass. |
|
878 |
metaClass := aClass theMetaclass. |
|
879 |
className := nonMetaClass name. |
|
880 |
||
881 |
isDialog := (nonMetaClass isSubclassOf:SimpleDialog). |
|
882 |
||
883 |
"/ add a windowSpec method for an empty applicationWindow, |
|
884 |
"/ with a menuPanel. |
|
885 |
||
886 |
(metaClass includesSelector:#windowSpec) ifFalse:[ |
|
887 |
isDialog ifTrue:[ |
|
888 |
txt := self class initialWindowSpecMethodSourceForDialogs. |
|
889 |
] ifFalse:[ |
|
890 |
txt := self class initialWindowSpecMethodSourceForApplications. |
|
891 |
]. |
|
892 |
self |
|
893 |
compile:(txt bindWith:className) |
|
894 |
forClass:metaClass |
|
895 |
inCategory:'interface specs'. |
|
896 |
]. |
|
897 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
898 |
compileTemplateAction := |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
899 |
[:selector :category | |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
900 |
(nonMetaClass includesSelector:selector) ifFalse:[ |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
901 |
|codeTemplateSelector| |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
902 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
903 |
codeTemplateSelector := ('codeFor_',(selector upTo:$:)) asSymbol. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
904 |
txt := self perform:codeTemplateSelector. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
905 |
self |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
906 |
compile:txt |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
907 |
forClass:nonMetaClass |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
908 |
inCategory:(category = '*' ifTrue:categoryForMenuActionsMethods ifFalse:category). |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
909 |
] |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
910 |
]. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
911 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
912 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
913 |
#'postBuildWith:' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
914 |
#'postOpenWith:' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
915 |
) pairWiseDo:compileTemplateAction. |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
916 |
|
5758 | 917 |
isDialog ifFalse:[ |
918 |
"/ add a topMenu method |
|
919 |
||
920 |
(metaClass includesSelector:#mainMenu) ifFalse:[ |
|
921 |
txt := self class initialMenuSpecMethodSourceForApplications. |
|
922 |
self |
|
923 |
compile:(txt bindWith:className) |
|
924 |
forClass:metaClass |
|
925 |
inCategory:'menu specs'. |
|
926 |
]. |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
927 |
(metaClass includesSelector:#toolbarMenu) ifFalse:[ |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
928 |
txt := self class initialToolbarMenuSpecMethodSource. |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
929 |
self |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
930 |
compile:(txt bindWith:className) |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
931 |
forClass:metaClass |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
932 |
inCategory:'menu specs'. |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
933 |
]. |
5758 | 934 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
935 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
936 |
#'hasUnsavedChanges' 'private queries' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
937 |
#'closeRequest' 'initialization & release' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
938 |
#'closeDownViews' 'initialization & release' |
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
939 |
#'menuReload' '*' |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
940 |
#'menuSaveAs' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
941 |
#'menuNew' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
942 |
#'menuOpen' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
943 |
#'menuSave' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
944 |
#'doSaveAs' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
945 |
#'openDocumentation' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
946 |
#'openAboutThisApplication' '*' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
947 |
) pairWiseDo:compileTemplateAction. |
5758 | 948 |
]. |
949 |
||
950 |
isDialog ifTrue:[ |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
951 |
#( |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
952 |
#'closeAccept' 'user actions' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
953 |
) pairWiseDo:compileTemplateAction. |
5758 | 954 |
]. |
955 |
||
6050 | 956 |
self executeCollectedChangesNamed:('Add Application Code for ' , className). |
5758 | 957 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
958 |
"Modified: / 27-10-2006 / 10:21:58 / cg" |
5758 | 959 |
! |
960 |
||
8987 | 961 |
createClassInitializeMethodIn:aClass |
962 |
"create a #initialize method on the class side (I'm tired of typing)" |
|
963 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
964 |
self subclassResponsibility |
8987 | 965 |
! |
966 |
||
5758 | 967 |
createClassResponsibleProtocolFor:aClass |
968 |
"create stubs for the required protocol" |
|
969 |
||
6050 | 970 |
|nonMetaClass metaClass className| |
971 |
||
972 |
nonMetaClass := aClass theNonMetaclass. |
|
973 |
metaClass := aClass theMetaclass. |
|
974 |
className := nonMetaClass name. |
|
975 |
||
5758 | 976 |
self startCollectChanges. |
977 |
||
6050 | 978 |
self privCreateClassResponsibleProtocolFor:nonMetaClass. |
979 |
self privCreateClassResponsibleProtocolFor:metaClass. |
|
5758 | 980 |
|
6050 | 981 |
self executeCollectedChangesNamed:('Add Required Protocol to ' , className). |
5758 | 982 |
! |
983 |
||
984 |
createClassTypeTestMethodsIn:aClass forClasses:subClasses |
|
985 |
"create a #isXXX test methods (I'm tired of typing)" |
|
986 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
987 |
self subclassResponsibility |
5758 | 988 |
! |
989 |
||
990 |
createDocumentationMethodsFor:aClass |
|
991 |
"create empty documentation methods" |
|
992 |
||
6050 | 993 |
|nonMetaClass metaClass className| |
5758 | 994 |
|
6050 | 995 |
nonMetaClass := aClass theNonMetaclass. |
996 |
metaClass := aClass theMetaclass. |
|
997 |
className := nonMetaClass name. |
|
5758 | 998 |
|
999 |
self startCollectChanges. |
|
1000 |
||
8890 | 1001 |
"/ self createVersionMethodFor:metaClass. |
6050 | 1002 |
self createCopyrightMethodFor:metaClass. |
1003 |
self createDocumentationMethodFor:metaClass. |
|
8572 | 1004 |
self createExamplesMethodFor:metaClass. |
1005 |
"/ self createInitialHistoryMethodFor:metaClass. |
|
5758 | 1006 |
|
6050 | 1007 |
self executeCollectedChangesNamed:('Add Documentation to ' , className). |
5758 | 1008 |
! |
1009 |
||
6313 | 1010 |
createEnumTypeCodeFor:aClass |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1011 |
self subclassResponsibility |
6313 | 1012 |
! |
1013 |
||
8572 | 1014 |
createExamplesMethodForViewClass:aClass |
1015 |
"create an examples method" |
|
1016 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1017 |
self subclassResponsibility |
8572 | 1018 |
! |
1019 |
||
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1020 |
createInitializationMethodIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1021 |
"create a #initialize methods (I'm tired of typing)" |
5758 | 1022 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1023 |
self subclassResponsibility |
9125
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1024 |
! |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1025 |
|
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1026 |
createInitializedInstanceCreationMethodsIn:aClass |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1027 |
"create a #new and #initialize methods (I'm tired of typing)" |
aaacd37a90b0
added: #createInitializationMethodIn:
Claus Gittinger <cg@exept.de>
parents:
9100
diff
changeset
|
1028 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1029 |
self subclassResponsibility |
6718 | 1030 |
! |
1031 |
||
1032 |
createParametrizedInstanceCreationMethodsNamed:selector in:aClass |
|
1033 |
"create a #selector instance creation method (I'm tired of typing)" |
|
1034 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1035 |
self subclassResponsibility |
5758 | 1036 |
! |
1037 |
||
7470 | 1038 |
createPoolInitializationCodeFor:aClass |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1039 |
self subclassResponsibility |
7470 | 1040 |
! |
1041 |
||
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1042 |
createRedefinedInstanceCreationMethodsIn:aClass |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1043 |
"create a redefined #new methods" |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1044 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1045 |
self subclassResponsibility |
8344
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1046 |
! |
efda36a55d02
changed #createRedefinedInstanceCreationMethodsIn:
Claus Gittinger <cg@exept.de>
parents:
8258
diff
changeset
|
1047 |
|
5953 | 1048 |
createStandardPrintOnMethodIn:aClass |
1049 |
"create a #printOn: method (I'm tired of typing)" |
|
1050 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1051 |
self subclassResponsibility |
5953 | 1052 |
! |
1053 |
||
9081 | 1054 |
createStartupCodeFor:aClass forStartOf:anApplicationClassOrNil |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1055 |
"create startup code (main)" |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1056 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1057 |
self subclassResponsibility |
9049
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1058 |
! |
9a2003a4fef3
added: #createStartupCodeFor:forStartOf:
Claus Gittinger <cg@exept.de>
parents:
9044
diff
changeset
|
1059 |
|
5758 | 1060 |
createTestCaseSampleCodeFor:aClass |
1061 |
"create an (almost) empty testCase class" |
|
1062 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1063 |
self subclassResponsibility |
5758 | 1064 |
! |
1065 |
||
1066 |
createVisitorMethodsIn:visitedClass andVisitorClass:visitorClass |
|
1067 |
"create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)" |
|
1068 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1069 |
self subclassResponsibility |
6050 | 1070 |
! |
1071 |
||
1072 |
createWebApplicationCodeFor:aClass |
|
1073 |
"create an empty webApplication framework" |
|
1074 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1075 |
self subclassResponsibility |
7973 | 1076 |
! |
1077 |
||
1078 |
createWebServiceCodeFor:aClass |
|
1079 |
"create an empty webService framework" |
|
1080 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1081 |
self subclassResponsibility |
8572 | 1082 |
! |
1083 |
||
1084 |
createWidgetCodeFor:aClass |
|
1085 |
"create usually required widget code (redraw, model update, event handling)" |
|
1086 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1087 |
self subclassResponsibility |
5758 | 1088 |
! ! |
1089 |
||
1090 |
!CodeGeneratorTool methodsFor:'code generation-basic'! |
|
1091 |
||
1092 |
createAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange asValueHolder:asValueHolder readersOnly:readersOnly writersOnly:writersOnly lazyInitialization:lazyInitialization |
|
1093 |
"workhorse for creating access methods for instvars." |
|
1094 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1095 |
self subclassResponsibility |
5763 | 1096 |
! |
1097 |
||
7615 | 1098 |
createCollectionAccessMethodsFor:aCollectionOfVarNames in:aClass withChange:withChange |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1099 |
self subclassResponsibility |
7615 | 1100 |
! |
1101 |
||
5763 | 1102 |
createValueHoldersFor:aCollectionOfVarNames in:aClass lazyInitialization:lazyInitialization |
1103 |
"workhorse for creating access methods for instvars." |
|
1104 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1105 |
self subclassResponsibility |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1106 |
! ! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1107 |
|
5758 | 1108 |
!CodeGeneratorTool methodsFor:'code generation-individual methods'! |
3712 | 1109 |
|
1110 |
createAcceptVisitorMethod:selector in:aClass |
|
1111 |
"create an acceptVisitor: method |
|
1112 |
(I'm tired of typing)" |
|
1113 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1114 |
self subclassResponsibility |
3712 | 1115 |
! |
1116 |
||
1117 |
createAcceptVisitorMethodIn:aClass |
|
1118 |
"create an acceptVisitor: method |
|
1119 |
(I'm tired of typing)" |
|
1120 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1121 |
self subclassResponsibility |
3712 | 1122 |
! |
1123 |
||
1124 |
createCopyrightMethodFor:aClass |
|
1125 |
"add copyright method containing your/your companies |
|
1126 |
copyright template but only if not already present. |
|
1127 |
this is only added, if specified in the |
|
1128 |
COPYRIGHT_TEMPLATE_FILE resources." |
|
1129 |
||
8258 | 1130 |
|fn copyRightText| |
3712 | 1131 |
|
1132 |
(aClass includesSelector:#copyright) ifFalse:[ |
|
1133 |
fn := SystemBrowser classResources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil. |
|
1134 |
fn notNil ifTrue:[ |
|
1135 |
fn := fn asFilename. |
|
1136 |
fn exists ifTrue:[ |
|
8488 | 1137 |
copyRightText := fn contentsAsString. |
8258 | 1138 |
self createCopyrightMethodFor:copyRightText for:aClass |
3712 | 1139 |
] |
1140 |
]. |
|
8258 | 1141 |
]. |
1142 |
! |
|
1143 |
||
1144 |
createCopyrightMethodFor:copyRightText for:aClass |
|
1145 |
"add copyright method containing text, |
|
1146 |
but only if not already present." |
|
1147 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1148 |
self subclassResponsibility |
3712 | 1149 |
! |
1150 |
||
1151 |
createDocumentationMethodFor:aClass |
|
1152 |
"add documentation method containing doc template |
|
1153 |
but only if not already present." |
|
1154 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1155 |
self subclassResponsibility |
3712 | 1156 |
! |
1157 |
||
1158 |
createExamplesMethodFor:aClass |
|
1159 |
"add examples method containing examples template |
|
1160 |
but only if not already present." |
|
1161 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1162 |
self subclassResponsibility |
3712 | 1163 |
! |
1164 |
||
3822
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1165 |
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
|
1166 |
self subclassResponsibility |
3822
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1167 |
! |
4e9f2f69875f
code generation for icons moved from ImageEditor
Claus Gittinger <cg@exept.de>
parents:
3804
diff
changeset
|
1168 |
|
3712 | 1169 |
createInitialHistoryMethodFor:aClass |
1170 |
"add history method containing created-entry |
|
1171 |
but only if not already present." |
|
1172 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1173 |
self subclassResponsibility |
3712 | 1174 |
! |
1175 |
||
4512 | 1176 |
createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass |
1177 |
"add an inst-creation method" |
|
1178 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1179 |
self subclassResponsibility |
4512 | 1180 |
! |
1181 |
||
3712 | 1182 |
createMultiSetterMethodFor:aCollectionOfVarNames in:aClass |
1183 |
"create a multi-setter method for instvars." |
|
1184 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1185 |
self subclassResponsibility |
3712 | 1186 |
! |
1187 |
||
3800
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1188 |
createSubclassResponsibilityMethodFor:aSelector category:cat in:aClass |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1189 |
"add a subclassResponsibility method; |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1190 |
but only if not already present." |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1191 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1192 |
self subclassResponsibility |
3800
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1193 |
! |
a5c75c369855
added generateSubclassResponsibility
Claus Gittinger <cg@exept.de>
parents:
3719
diff
changeset
|
1194 |
|
3712 | 1195 |
createUpdateMethodIn:aClass |
1196 |
"create an update:with:from:-method |
|
1197 |
(I'm tired of typing)" |
|
1198 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1199 |
self subclassResponsibility |
3712 | 1200 |
! |
1201 |
||
1202 |
createVersionMethodFor:aClass |
|
8890 | 1203 |
<resource: #obsolete> |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1204 |
|
3712 | 1205 |
"add version method containing RCS template |
1206 |
but only if not already present and its not a private class." |
|
1207 |
||
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1208 |
self subclassResponsibility |
3712 | 1209 |
! ! |
1210 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1211 |
!CodeGeneratorTool methodsFor:'code templates'! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1212 |
|
8987 | 1213 |
codeFor_classInitialize |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1214 |
self subclassResponsibility |
8987 | 1215 |
! |
1216 |
||
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1217 |
codeFor_closeAccept |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1218 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1219 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1220 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1221 |
codeFor_closeDownViews |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1222 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1223 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1224 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1225 |
codeFor_closeRequest |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1226 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1227 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1228 |
"Created: / 27-10-2006 / 10:01:06 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1229 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1230 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1231 |
codeFor_doSaveAs |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1232 |
^ self codeFor_emptyMenuActionCodeFor:#doSaveAs menuItem:'save/saveAs' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1233 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1234 |
"Created: / 27-10-2006 / 10:22:06 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1235 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1236 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1237 |
codeFor_emptyMenuActionCodeFor:selector menuItem:item |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1238 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1239 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1240 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1241 |
codeFor_hasUnsavedChanges |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1242 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1243 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1244 |
"Created: / 27-10-2006 / 10:00:36 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1245 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1246 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1247 |
codeFor_menuNew |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1248 |
^ self codeFor_emptyMenuActionCodeFor:#menuNew menuItem:'new' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1249 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1250 |
"Created: / 27-10-2006 / 10:17:08 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1251 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1252 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1253 |
codeFor_menuOpen |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1254 |
^ self codeFor_emptyMenuActionCodeFor:#menuOpen menuItem:'open' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1255 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1256 |
"Created: / 27-10-2006 / 10:17:18 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1257 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1258 |
|
9099
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1259 |
codeFor_menuReload |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1260 |
^ self codeFor_emptyMenuActionCodeFor:#menuReload menuItem:'reload' |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1261 |
! |
2729600bb93c
include toolbar for new apps
Claus Gittinger <cg@exept.de>
parents:
9081
diff
changeset
|
1262 |
|
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1263 |
codeFor_menuSave |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1264 |
^ self codeFor_emptyMenuActionCodeFor:#menuSave menuItem:'save' |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1265 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1266 |
"Created: / 27-10-2006 / 10:17:25 / cg" |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1267 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1268 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1269 |
codeFor_menuSaveAs |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1270 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1271 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1272 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1273 |
codeFor_openAboutThisApplication |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1274 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1275 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1276 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1277 |
codeFor_openDocumentation |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1278 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1279 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1280 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1281 |
codeFor_postBuildWith |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1282 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1283 |
! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1284 |
|
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1285 |
codeFor_postOpenWith |
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1286 |
self subclassResponsibility |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1287 |
! |
8572 | 1288 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1289 |
codeFor_shouldImplementFor:selector inClass:aClass |
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1290 |
"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
|
1291 |
method for each subclassClassresponsibility method above aClass." |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1292 |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1293 |
self subclassResponsibility |
8572 | 1294 |
! |
1295 |
||
1296 |
code_forWidget_buttonPress |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1297 |
self subclassResponsibility |
8572 | 1298 |
! |
1299 |
||
1300 |
code_forWidget_initialize |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1301 |
self subclassResponsibility |
8572 | 1302 |
! |
1303 |
||
1304 |
code_forWidget_keyPress |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1305 |
self subclassResponsibility |
8572 | 1306 |
! |
1307 |
||
1308 |
code_forWidget_redraw |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1309 |
self subclassResponsibility |
8572 | 1310 |
! |
1311 |
||
1312 |
code_forWidget_sizeChanged |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1313 |
self subclassResponsibility |
8572 | 1314 |
! |
1315 |
||
1316 |
code_forWidget_update |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1317 |
self subclassResponsibility |
7480
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1318 |
! ! |
33930379ab27
code cleanup; more application code generation
Claus Gittinger <cg@exept.de>
parents:
7470
diff
changeset
|
1319 |
|
6938 | 1320 |
!CodeGeneratorTool methodsFor:'compilation'! |
1321 |
||
1322 |
compile:theCode forClass:aClass inCategory:cat |
|
1323 |
"install some code for a class. |
|
1324 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
1325 |
||
7037 | 1326 |
self |
1327 |
compile:theCode forClass:aClass inCategory:cat |
|
1328 |
skipIfSame:true |
|
1329 |
! |
|
6938 | 1330 |
|
7037 | 1331 |
compile:theCode forClass:aClass inCategory:cat skipIfSame:skipIfSame |
1332 |
"install some code for a class. |
|
1333 |
If refactory browser stuff is avaliable the refactory tools are used to support undo" |
|
1334 |
||
1335 |
|change compiler selector oldMthd isSame| |
|
6938 | 1336 |
|
7037 | 1337 |
isSame := false. |
1338 |
skipIfSame ifTrue:[ |
|
1339 |
compiler := aClass compilerClass new. |
|
1340 |
compiler parseMethod:theCode in:aClass ignoreErrors:true ignoreWarnings:true. |
|
1341 |
||
1342 |
selector := compiler selector. |
|
1343 |
selector notNil ifTrue:[ |
|
1344 |
oldMthd := aClass compiledMethodAt:selector. |
|
1345 |
isSame := (oldMthd notNil and:[oldMthd source = theCode]). |
|
1346 |
isSame ifTrue:[ ^ self ]. |
|
6938 | 1347 |
]. |
1348 |
]. |
|
1349 |
||
1350 |
self canUseRefactoringSupport ifFalse:[ |
|
1351 |
"/ compile immediately |
|
1352 |
aClass compile:theCode classified:cat. |
|
1353 |
^ self. |
|
1354 |
]. |
|
1355 |
||
1356 |
change := InteractiveAddMethodChange compile:(theCode asString) in:aClass classified:cat. |
|
1357 |
||
1358 |
"/ if collecting, add to changes (to be executed as one change at the end, |
|
1359 |
"/ in order to have only one change in the undo-list (instead of many) |
|
1360 |
compositeChangeCollector notNil ifTrue:[ |
|
1361 |
compositeChangeCollector addChange:change |
|
1362 |
] ifFalse:[ |
|
7037 | 1363 |
RefactoryChangeManager performChange:change. |
6938 | 1364 |
] |
1365 |
||
1366 |
"Modified: / 21-08-2006 / 18:39:06 / cg" |
|
1367 |
! ! |
|
3712 | 1368 |
|
8572 | 1369 |
!CodeGeneratorTool methodsFor:'initialization'! |
1370 |
||
1371 |
initialize |
|
1372 |
userPreferences := UserPreferences current. |
|
1373 |
generateComments := userPreferences generateComments. |
|
1374 |
! ! |
|
1375 |
||
5758 | 1376 |
!CodeGeneratorTool methodsFor:'private'! |
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1377 |
|
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1378 |
canUseRefactoringSupport |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1379 |
"check if refactory browser stuff is avaliable" |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1380 |
|
5758 | 1381 |
^ self class canUseRefactoringSupport |
5013
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1382 |
! |
0f2c39fc6e8c
comments; allow for comments to be suppressed
Claus Gittinger <cg@exept.de>
parents:
4926
diff
changeset
|
1383 |
|
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1384 |
privCreateClassResponsibleProtocolFor:aClass |
6791
6559c9ebb561
Keep method argument names when generating required methods
Stefan Vogel <sv@exept.de>
parents:
6718
diff
changeset
|
1385 |
"create stubs for the required protocol. |
6559c9ebb561
Keep method argument names when generating required methods
Stefan Vogel <sv@exept.de>
parents:
6718
diff
changeset
|
1386 |
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
|
1387 |
|
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1388 |
|requiredProtocol| |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1389 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1390 |
requiredProtocol := self class missingRequiredProtocolFor:aClass. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1391 |
requiredProtocol do:[:eachSelector | |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1392 |
|code implClass| |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1393 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1394 |
implClass := aClass whichClassImplements:eachSelector. |
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1395 |
implClass == Object ifFalse:[ |
9027
f2edc1bca4de
added: #codeFor_shouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9025
diff
changeset
|
1396 |
code := self codeFor_shouldImplementFor:eachSelector inClass:aClass. |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1397 |
|
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1398 |
self |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1399 |
compile:code |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1400 |
forClass:aClass |
9025
124489bab860
added: #codeForShouldImplementFor:inClass:
Claus Gittinger <cg@exept.de>
parents:
9022
diff
changeset
|
1401 |
inCategory:(implClass compiledMethodAt:eachSelector) category. |
9022
676088a17690
added: #missingRequiredProtocolFor:
Claus Gittinger <cg@exept.de>
parents:
8987
diff
changeset
|
1402 |
] |
4108
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1403 |
]. |
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1404 |
! ! |
19af32811dfd
Generate minimal protocol classes for metaclass.
Stefan Vogel <sv@exept.de>
parents:
3823
diff
changeset
|
1405 |
|
3712 | 1406 |
!CodeGeneratorTool class methodsFor:'documentation'! |
1407 |
||
1408 |
version |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1409 |
^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.87 2011-01-28 09:22:02 cg Exp $' |
8890 | 1410 |
! |
1411 |
||
1412 |
version_CVS |
|
9705
3c29845b149d
reorganized/refactored into language specific and
Claus Gittinger <cg@exept.de>
parents:
9503
diff
changeset
|
1413 |
^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.87 2011-01-28 09:22:02 cg Exp $' |
3712 | 1414 |
! ! |