|
|
Class: CodeGeneratorTool
Object
|
+--CodeGeneratorTool
- Package:
- stx:libtool
- Category:
- Interface-Browsers
- Version:
- rev:
1.84
date: 2009/11/17 11:33:27
- user: stefan
- file: CodeGeneratorTool.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
-
createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly
-
create accessors in aClass
-
createApplicationCodeFor: aClass
-
create an empty application framework
-
createClassResponsibleProtocolFor: aClass
-
create stubs for the required protocol
-
createClassTypeTestMethodsIn: aClass forClasses: subClasses
-
create a #isXXX test methods (I'm tired of typing)
-
createDocumentationMethodsFor: aClass
-
create empty documentation methods
-
createEnumTypeCodeFor: aClass
-
-
createInitializationMethodIn: aClass
-
create a #initialize methods (I'm tired of typing)
-
createInitializedInstanceCreationMethodsIn: aClass
-
create a #new and #initialize methods (I'm tired of typing)
-
createParametrizedInstanceCreationMethodsNamed: selector in: aClass
-
create a #selector instance creation method (I'm tired of typing)
-
createRedefinedInstanceCreationMethodsIn: aClass
-
create a redefined #new method
-
createStartupCodeFor: aClass forStartOf: anApplicationClassOrNil
-
create standAloneStartup code
-
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)
-
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)
-
initialMenuSpecMethodSourceForApplications
-
return a menuSpec with typical stuff in it
-
initialPageMenuSpec
-
return a menuSpec with typical stuff in it
-
initialPageMenuSpecMethodSourceForWebApplications
-
return a menuSpec with typical stuff in it
-
initialPageSpecMethodSourceForWebApplications
-
return an empty pageSpec
-
initialToolbarMenuSpec
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
-
initialToolbarMenuSpecMethodSource
-
return a menuSpec with typical stuff in it
-
initialWindowSpecForApplications
-
This resource specification was automatically generated
by the UIPainter of ST/X.
-
initialWindowSpecForDialogs
-
This resource specification was automatically generated
by the UIPainter of ST/X.
-
initialWindowSpecMethodSourceForApplications
-
return an empty windowSpec with an initial menubar in it
-
initialWindowSpecMethodSourceForDialogs
-
return an empty windowSpec for dialogs
code generation-basic
-
createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly lazyInitialization: lazyInitialization
-
workhorse for creating access methods for instvars.
code generation-individual methods
-
createAcceptVisitorMethod: selector in: aClass
-
create an acceptVisitor: method
(I'm tired of typing)
-
createAcceptVisitorMethodIn: aClass
-
create an acceptVisitor: method
(I'm tired of typing)
-
createCopyrightMethodFor: aClass
-
add copyright method containing your/your companies
copyright template but only if not already present.
this is only added, if specified in the
COPYRIGHT_TEMPLATE_FILE resources.
-
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.
-
createImageSpecMethodFor: anImage comment: comment in: aClass selector: sel
-
-
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
-
createMultiSetterMethodFor: aCollectionOfVarNames in: aClass
-
create a multi-setter method for instvars.
-
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 version method containing RCS template
but only if not already present and its not a private class.
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.
If refactory browser stuff is avaliable the refactory tools are used to support undo
defaults
-
copyrightTemplate
-
return the contents of COPYRIGHT_TEMPLATE_FILE resources
or a standard template
-
copyrightTemplate: aString
-
set the COPYRIGHT_TEMPLATE_FILE
instance creation
-
new
-
interface specs
-
initialWindowSpecForApplications2
-
This resource specification was automatically generated
by the UIPainter of ST/X.
private
-
canUseRefactoringSupport
-
check if refactory browser stuff is avaliable
-
methodNameTemplateFor: aSelector
-
utilities
-
missingRequiredProtocolFor: aClass
-
return the missing required protocol;
that is the set of selectors which send #subclassResponsibility in a superclass and
have no implementation in aClass or in any class between aClass and that superclass
buld changes
-
addChange: aChange
-
-
executeCollectedChangesNamed: name
-
-
startCollectChanges
-
code generation
-
createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly
-
create accessors in aClass
-
createApplicationCodeFor: aClass
-
create an empty application framework
-
createClassInitializeMethodIn: aClass
-
create a #initialize method on the class side (I'm tired of typing)
-
createClassResponsibleProtocolFor: aClass
-
create stubs for the required protocol
-
createClassTypeTestMethodsIn: aClass forClasses: subClasses
-
create a #isXXX test methods (I'm tired of typing)
-
createDocumentationMethodsFor: aClass
-
create empty documentation methods
-
createEnumTypeCodeFor: aClass
-
-
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)
-
createParametrizedInstanceCreationMethodsNamed: selector in: aClass
-
create a #selector instance creation method (I'm tired of typing)
-
createPoolInitializationCodeFor: aClass
-
-
createRedefinedInstanceCreationMethodsIn: aClass
-
create a redefined #new methods
-
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)
-
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
-
-
createValueHoldersFor: aCollectionOfVarNames in: aClass lazyInitialization: lazyInitialization
-
workhorse for creating access methods for instvars.
code generation-individual methods
-
createAcceptVisitorMethod: selector in: aClass
-
create an acceptVisitor: method
(I'm tired of typing)
-
createAcceptVisitorMethodIn: aClass
-
create an acceptVisitor: method
(I'm tired of typing)
-
createCopyrightMethodFor: aClass
-
add copyright method containing your/your companies
copyright template but only if not already present.
this is only added, if specified in the
COPYRIGHT_TEMPLATE_FILE resources.
-
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.
-
createImageSpecMethodFor: anImage comment: comment in: aClass selector: sel
-
-
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
-
createMultiSetterMethodFor: aCollectionOfVarNames in: aClass
-
create a multi-setter method for instvars.
-
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
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
code templates
-
codeFor_classInitialize
-
-
codeFor_closeAccept
-
-
codeFor_closeDownViews
-
-
codeFor_closeRequest
-
-
codeFor_doSaveAs
-
-
codeFor_emptyMenuActionCodeFor: selector menuItem: item
-
-
codeFor_hasUnsavedChanges
-
-
codeFor_menuNew
-
-
codeFor_menuOpen
-
-
codeFor_menuReload
-
-
codeFor_menuSave
-
-
codeFor_menuSaveAs
-
-
codeFor_openAboutThisApplication
-
-
codeFor_openDocumentation
-
-
codeFor_postBuildWith
-
-
codeFor_postOpenWith
-
-
code_forWidget_buttonPress
-
-
code_forWidget_initialize
-
-
code_forWidget_keyPress
-
-
code_forWidget_redraw
-
-
code_forWidget_sizeChanged
-
-
code_forWidget_update
-
compilation
-
compile: theCode forClass: aClass inCategory: cat
-
install some code for a class.
If refactory browser stuff is avaliable the refactory tools are used to support undo
-
compile: theCode forClass: aClass inCategory: cat skipIfSame: skipIfSame
-
install some code for a class.
If refactory browser stuff is avaliable the refactory tools are used to support undo
initialization
-
initialize
-
private
-
canUseRefactoringSupport
-
check if refactory browser stuff is avaliable
-
codeFor_shouldImplementFor: selector inClass: aClass
-
used in the 'generate required protocol' to generate a shouldImplement-sending
method for each subclassClassresponsibility method above aClass.
-
privCreateClassResponsibleProtocolFor: aClass
-
create stubs for the required protocol.
aClass may be a a MetaClass or a non-MetaClass
|