|
Class: SmalltalkCodeGeneratorTool
Object
|
+--CodeGeneratorTool
|
+--SmalltalkCodeGeneratorTool
- Package:
- stx:libtool
- Category:
- Interface-Browsers
- Version:
- rev:
1.70
date: 2019/06/07 14:09:22
- user: stefan
- file: SmalltalkCodeGeneratorTool.st directory: libtool
- module: stx stc-classLibrary: libtool
- Author:
- Claus Gittiner
This utility class contains various code generation facilites;
these were extracted from the old and newBrowser.
There is probably more to come...
code generation
-
initialMenuSpecMethodSourceForApplications
-
return code for a menuSpec with typical stuff in it
-
initialPageMenuSpecMethodSourceForWebApplications
-
return code for a menuSpec with typical stuff in it
usage example(s):
self initialPageMenuSpecMethodSourceForWebApplications
|
-
initialPageSpecMethodSourceForWebApplications
-
return an empty pageSpec
-
initialToolbarMenuSpecMethodSource
-
return a menuSpec with typical stuff in it
usage example(s):
self initialToolbarMenuSpecMethodSource
|
-
initialWindowSpecMethodSourceForApplications
-
return an empty windowSpec with an initial menubar in it
usage example(s):
self initialWindowSpecMethodSourceForApplications
|
-
initialWindowSpecMethodSourceForDialogs
-
return an empty windowSpec for dialogs
code generation-menus
-
createActionMethodFor: aSelector in: aClass category: aCategory redefine: redefine
-
-
createAspectMethodFor: aSelector in: aClass category: aCategory redefine: redefine
-
compilation
-
compile: theCode forClass: aClass inCategory: cat
-
install some code for a class.
Return the new method or nil.
If refactory browser stuff is available, the refactory tools are used to support undo
-
compile: theCode forClass: aClass inCategory: cat notifying: requestor
-
install some code for a class.
Return the new method or nil.
If refactory browser stuff is available, the refactory tools are used to support undo
private
-
methodNameTemplateFor: aSelector
-
utilities - source code
-
methodSourceForVersionMethodCVS: versionString
-
careful to avoid expansion by cvs here!
-
methodTemplate
-
return a method definition template string
-
methodTemplateForDocumentation
-
return a documentation method definition template string
-
methodTemplateForPackageDocumentation
-
return a documentation-method definition template string for packages
code generation
-
createClassInitializeMethodIn: aClass
-
create a #initialize method on the class side (I'm tired of typing)
-
createClassTypeTestMethodsIn: aClass forClasses: subClasses
-
create a #isXXX test methods (I'm tired of typing)
-
createEnumTypeCodeFor: aClass
-
-
createExamplesMethodForApplicationModelClass: aClass
-
create an examples method
-
createExamplesMethodForViewClass: aClass
-
create an examples method
-
createInitializationMethodIn: aClass
-
create a #initialize methods (I'm tired of typing)
-
createInitializedInstanceCreationMethodsIn: aClass
-
create a #new and #initialize methods (I'm tired of typing)
-
createIsAbstractMethodIn: aClass
-
create a #isAbstract query method (I'm tired of typing)
-
createIsObsoleteMethodIn: aClass
-
create a #isObsolete query method (I'm tired of typing)
-
createParametrizedInstanceCreationMethodsNamed: selector in: aClass
-
create a #selector instance creation method (I'm tired of typing)
-
createPoolInitializationCodeFor: aClass
-
-
createRedefinedInstanceCreationMethodsIn: aClass
-
create a redefined #new methods
-
createSingletonPatternInstanceCreationMethodsIn: aClass usingVariable: varName
-
create redefined #new methods for singleton pattern.
Uses varName (typically a class-instvar) to keep the singleton instance.
-
createStandardPrintOnMethodIn: aClass
-
create a #printOn: method (I'm tired of typing)
-
createStartupCodeFor: aClass forStartOf: anApplicationClassOrNil
-
create startup code (main)
-
createTestCaseSampleCodeFor: aClass
-
create an (almost) empty testCase class
-
createVisitorMethodsIn: visitedClass andVisitorClass: visitorClass
-
create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)
-
createVisitorMethodsIn: visitedClass andVisitorClass: visitorClass withParameter: withParameter withSuper: withSuper
-
This is much like createVisitorMethodsIn:andVisitorClass:,
but:
- if withParameter is true, generates
#acceptVisitor:with:
and
#visit<CLASNAME>:with:
- if withSuper is true, generates
self visit<SUPERCLASSNAME>:[with:] in the visitXXX methods body
-
createWebApplicationCodeFor: aClass
-
create an empty webApplication framework
-
createWebServiceCodeFor: aClass
-
create an empty webService framework
-
createWidgetCodeFor: aClass
-
create usually required widget code (redraw, model update, event handling)
code generation-basic
-
createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly lazyInitialization: lazyInitialization
-
workhorse for creating access methods for instvars.
-
createCollectionAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange
-
check, if method is not already present
-
createValueHoldersFor: aCollectionOfVarNames in: aClass lazyInitialization: lazyInitialization
-
workhorse for creating access methods for instvars.
code generation-individual methods
-
createAcceptVisitorMethod: selector in: aClass
-
(comment from inherited method)
create an acceptVisitor: method
(I'm tired of typing)
-
createAcceptVisitorMethod: selector in: aClass withParameter: withParameter
-
create an acceptVisitor: method
(I'm tired of typing)
-
createAcceptVisitorMethodIn: aClass
-
create an acceptVisitor: method
(I'm tired of typing)
-
createAspectMethodFor: anAspectSymbol in: aClass
-
create an aspect method.
-
createCopyrightMethodFor: copyRightText for: aClass
-
add copyright method containing text,
but only if not already present.
-
createDocumentationMethodFor: aClass
-
add documentation method containing doc template
but only if not already present.
-
createExamplesMethodFor: aClass
-
add examples method containing examples template
but only if not already present.
-
createFalseReturnMethodFor: aSelector category: cat in: aClass
-
add a ^ false method;
but only if not already present.
-
createImageSpecMethodFor: anImage comment: comment in: aClass selector: sel
-
if that method already exists, do not overwrite the category
-
createInitialHistoryMethodFor: aClass
-
add history method containing created-entry
but only if not already present.
-
createInstanceCreationMethodWithSetupFor: selector category: category in: aMetaClass
-
add an inst-creation method
-
createMultiSetterInstanceCreationMethodFor: aCollectionOfVarNames in: aClass
-
create a multi-setter instance creator method for instvars.
-
createMultiSetterMethodFor: aCollectionOfVarNames in: aClass
-
create a multi-setter method for instvars.
-
createShouldImplementMethodFor: aSelector category: cat in: aClass
-
add a subclassResponsibility method;
but only if not already present.
-
createSubclassResponsibilityMethodFor: aSelector category: cat in: aClass
-
add a subclassResponsibility method;
but only if not already present.
-
createUpdateMethodIn: aClass
-
create an update:with:from:-method
(I'm tired of typing)
-
createVersionMethodFor: aClass
-
add a version method containing RCS template
but only if not already present and it's not a private class.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
code templates
-
anyApplicationClassInProjectOf: aClass
-
-
codeFor_classInitialize
-
-
codeFor_closeAccept
-
-
codeFor_closeDownViews
-
-
codeFor_closeRequest
-
-
codeFor_emptyMenuActionCodeFor: selector menuItem: item
-
-
codeFor_hasUnsavedChanges
-
-
codeFor_menuSaveAs
-
-
codeFor_openAboutThisApplication
-
-
codeFor_openDocumentation
-
-
codeFor_postBuildWith
-
-
codeFor_postOpenWith
-
-
codeFor_standAloneApplicationRegistryPathFor: aClassOrNil
-
-
codeFor_standAloneApplicationUUID
-
-
codeFor_standAloneMain
-
-
codeFor_standAloneMainOnClassSide
-
-
codeFor_standAloneRealMainMethodFor: aClass
-
-
codeFor_standAloneUsage
-
-
code_forWidget_buttonPress
-
-
code_forWidget_initialize
-
-
code_forWidget_keyPress
-
-
code_forWidget_redraw
-
-
code_forWidget_sizeChanged
-
-
code_forWidget_update
-
compilation
-
compilerClass
-
Return a real compiler classto use to compile code
private
-
codeFor_shouldImplementFor: selector inClass: aClass
-
used in the 'generate required protocol' to generate a shouldImplement-sending
method for each subclassClassresponsibility method above aClass.
|