eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CodeGeneratorTool':

Home

everywhere
www.exept.de
for:
[back]

Class: CodeGeneratorTool


Inheritance:

   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

Description:


This utility class contains various code generation facilites;
these were extracted from the old and newBrowser.
There is probably more to come...


Class protocol:

code generation
o  createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly
create accessors in aClass

o  createApplicationCodeFor: aClass
create an empty application framework

o  createClassResponsibleProtocolFor: aClass
create stubs for the required protocol

o  createClassTypeTestMethodsIn: aClass forClasses: subClasses
create a #isXXX test methods (I'm tired of typing)

o  createDocumentationMethodsFor: aClass
create empty documentation methods

o  createEnumTypeCodeFor: aClass

o  createInitializationMethodIn: aClass
create a #initialize methods (I'm tired of typing)

o  createInitializedInstanceCreationMethodsIn: aClass
create a #new and #initialize methods (I'm tired of typing)

o  createParametrizedInstanceCreationMethodsNamed: selector in: aClass
create a #selector instance creation method (I'm tired of typing)

o  createRedefinedInstanceCreationMethodsIn: aClass
create a redefined #new method

o  createStartupCodeFor: aClass forStartOf: anApplicationClassOrNil
create standAloneStartup code

o  createTestCaseSampleCodeFor: aClass
create an (almost) empty testCase class

o  createVisitorMethodsIn: visitedClass andVisitorClass: visitorClass
create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)

o  createWebApplicationCodeFor: aClass
create an empty webApplication framework

o  createWebServiceCodeFor: aClass
create an empty webService framework

o  createWidgetCodeFor: aClass
create usually required widget code (redraw, model update, event handling)

o  initialMenuSpecMethodSourceForApplications
return a menuSpec with typical stuff in it

o  initialPageMenuSpec
return a menuSpec with typical stuff in it

o  initialPageMenuSpecMethodSourceForWebApplications
return a menuSpec with typical stuff in it

o  initialPageSpecMethodSourceForWebApplications
return an empty pageSpec

o  initialToolbarMenuSpec
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  initialToolbarMenuSpecMethodSource
return a menuSpec with typical stuff in it

o  initialWindowSpecForApplications
This resource specification was automatically generated
by the UIPainter of ST/X.

o  initialWindowSpecForDialogs
This resource specification was automatically generated
by the UIPainter of ST/X.

o  initialWindowSpecMethodSourceForApplications
return an empty windowSpec with an initial menubar in it

o  initialWindowSpecMethodSourceForDialogs
return an empty windowSpec for dialogs

code generation-basic
o  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
o  createAcceptVisitorMethod: selector in: aClass
create an acceptVisitor: method
(I'm tired of typing)

o  createAcceptVisitorMethodIn: aClass
create an acceptVisitor: method
(I'm tired of typing)

o  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.

o  createDocumentationMethodFor: aClass
add documentation method containing doc template
but only if not already present.

o  createExamplesMethodFor: aClass
add examples method containing examples template
but only if not already present.

o  createImageSpecMethodFor: anImage comment: comment in: aClass selector: sel

o  createInitialHistoryMethodFor: aClass
add history method containing created-entry
but only if not already present.

o  createInstanceCreationMethodWithSetupFor: selector category: category in: aMetaClass
add an inst-creation method

o  createMultiSetterMethodFor: aCollectionOfVarNames in: aClass
create a multi-setter method for instvars.

o  createSubclassResponsibilityMethodFor: aSelector category: cat in: aClass
add a subclassResponsibility method;
but only if not already present.

o  createUpdateMethodIn: aClass
create an update:with:from:-method
(I'm tired of typing)

o  createVersionMethodFor: aClass
add version method containing RCS template
but only if not already present and its not a private class.

code generation-menus
o  createActionMethodFor: aSelector in: aClass category: aCategory redefine: redefine

o  createAspectMethodFor: aSelector in: aClass category: aCategory redefine: redefine

compilation
o  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
o  copyrightTemplate
return the contents of COPYRIGHT_TEMPLATE_FILE resources
or a standard template

o  copyrightTemplate: aString
set the COPYRIGHT_TEMPLATE_FILE

instance creation
o  new

interface specs
o  initialWindowSpecForApplications2
This resource specification was automatically generated
by the UIPainter of ST/X.

private
o  canUseRefactoringSupport
check if refactory browser stuff is avaliable

o  methodNameTemplateFor: aSelector

utilities
o  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


Instance protocol:

buld changes
o  addChange: aChange

o  executeCollectedChangesNamed: name

o  startCollectChanges

code generation
o  createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly
create accessors in aClass

o  createApplicationCodeFor: aClass
create an empty application framework

o  createClassInitializeMethodIn: aClass
create a #initialize method on the class side (I'm tired of typing)

o  createClassResponsibleProtocolFor: aClass
create stubs for the required protocol

o  createClassTypeTestMethodsIn: aClass forClasses: subClasses
create a #isXXX test methods (I'm tired of typing)

o  createDocumentationMethodsFor: aClass
create empty documentation methods

o  createEnumTypeCodeFor: aClass

o  createExamplesMethodForViewClass: aClass
create an examples method

o  createInitializationMethodIn: aClass
create a #initialize methods (I'm tired of typing)

o  createInitializedInstanceCreationMethodsIn: aClass
create a #new and #initialize methods (I'm tired of typing)

o  createParametrizedInstanceCreationMethodsNamed: selector in: aClass
create a #selector instance creation method (I'm tired of typing)

o  createPoolInitializationCodeFor: aClass

o  createRedefinedInstanceCreationMethodsIn: aClass
create a redefined #new methods

o  createStandardPrintOnMethodIn: aClass
create a #printOn: method (I'm tired of typing)

o  createStartupCodeFor: aClass forStartOf: anApplicationClassOrNil
create startup code (main)

o  createTestCaseSampleCodeFor: aClass
create an (almost) empty testCase class

o  createVisitorMethodsIn: visitedClass andVisitorClass: visitorClass
create acceptVisitor: in visitedClass and acceptXXX in visitorClass. (I'm tired of typing)

o  createWebApplicationCodeFor: aClass
create an empty webApplication framework

o  createWebServiceCodeFor: aClass
create an empty webService framework

o  createWidgetCodeFor: aClass
create usually required widget code (redraw, model update, event handling)

code generation-basic
o  createAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange asValueHolder: asValueHolder readersOnly: readersOnly writersOnly: writersOnly lazyInitialization: lazyInitialization
workhorse for creating access methods for instvars.

o  createCollectionAccessMethodsFor: aCollectionOfVarNames in: aClass withChange: withChange

o  createValueHoldersFor: aCollectionOfVarNames in: aClass lazyInitialization: lazyInitialization
workhorse for creating access methods for instvars.

code generation-individual methods
o  createAcceptVisitorMethod: selector in: aClass
create an acceptVisitor: method
(I'm tired of typing)

o  createAcceptVisitorMethodIn: aClass
create an acceptVisitor: method
(I'm tired of typing)

o  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.

o  createCopyrightMethodFor: copyRightText for: aClass
add copyright method containing text,
but only if not already present.

o  createDocumentationMethodFor: aClass
add documentation method containing doc template
but only if not already present.

o  createExamplesMethodFor: aClass
add examples method containing examples template
but only if not already present.

o  createImageSpecMethodFor: anImage comment: comment in: aClass selector: sel

o  createInitialHistoryMethodFor: aClass
add history method containing created-entry
but only if not already present.

o  createInstanceCreationMethodWithSetupFor: selector category: category in: aMetaClass
add an inst-creation method

o  createMultiSetterMethodFor: aCollectionOfVarNames in: aClass
create a multi-setter method for instvars.

o  createSubclassResponsibilityMethodFor: aSelector category: cat in: aClass
add a subclassResponsibility method;
but only if not already present.

o  createUpdateMethodIn: aClass
create an update:with:from:-method
(I'm tired of typing)

o  createVersionMethodFor: aClass

** This is an obsolete interface - do not use it (it may vanish in future versions) **

code templates
o  codeFor_classInitialize

o  codeFor_closeAccept

o  codeFor_closeDownViews

o  codeFor_closeRequest

o  codeFor_doSaveAs

o  codeFor_emptyMenuActionCodeFor: selector menuItem: item

o  codeFor_hasUnsavedChanges

o  codeFor_menuNew

o  codeFor_menuOpen

o  codeFor_menuReload

o  codeFor_menuSave

o  codeFor_menuSaveAs

o  codeFor_openAboutThisApplication

o  codeFor_openDocumentation

o  codeFor_postBuildWith

o  codeFor_postOpenWith

o  code_forWidget_buttonPress

o  code_forWidget_initialize

o  code_forWidget_keyPress

o  code_forWidget_redraw

o  code_forWidget_sizeChanged

o  code_forWidget_update

compilation
o  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

o  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
o  initialize

private
o  canUseRefactoringSupport
check if refactory browser stuff is avaliable

o  codeFor_shouldImplementFor: selector inClass: aClass
used in the 'generate required protocol' to generate a shouldImplement-sending
method for each subclassClassresponsibility method above aClass.

o  privCreateClassResponsibleProtocolFor: aClass
create stubs for the required protocol.
aClass may be a a MetaClass or a non-MetaClass



ST/X 6.1.1; WebServer 1.620 at exept:8081; Thu, 17 May 2012 16:16:04 GMT