eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'JavaScriptCodeGeneratorTool':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: JavaScriptCodeGeneratorTool


Inheritance:

   Object
   |
   +--CodeGeneratorTool
      |
      +--JavaScriptCodeGeneratorTool

Package:
stx:libjavascript
Category:
Interface-Browsers
Version:
rev: 1.8 date: 2019/06/07 14:09:41
user: stefan
file: JavaScriptCodeGeneratorTool.st directory: libjavascript
module: stx stc-classLibrary: libjavascript
Author:
Claus Gittiner

Description:


Code generation facilites for JavaScript


Class protocol:

code generation
o  initialMenuSpecMethodSourceForApplications
return code for a menuSpec with typical stuff in it

o  initialPageMenuSpecMethodSourceForWebApplications
return code for a menuSpec with typical stuff in it

usage example(s):

     self initialPageMenuSpecMethodSourceForWebApplications

o  initialPageSpecMethodSourceForWebApplications
return an empty pageSpec

o  initialToolbarMenuSpecMethodSource
return a menuSpec with typical stuff in it

usage example(s):

     self initialToolbarMenuSpecMethodSource

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

usage example(s):

     self initialWindowSpecMethodSourceForApplications

o  initialWindowSpecMethodSourceForDialogs
return an empty windowSpec for dialogs

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

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

private
o  methodNameTemplateFor: aSelector

utilities - source code
o  methodSourceForVersionMethodCVS: versionString
careful to avoid expansion by cvs here!


Instance protocol:

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

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

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  createSingletonPatternInstanceCreationMethodsIn: aClass usingVariable: varName
create redefined #new methods for singleton pattern.
Uses varName (typically a class-instvar) to keep the singleton instance.

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
check, if method is not already present

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: 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
if that method already exists, do not overwrite the category

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 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
o  anyApplicationClassInProjectOf: aClass

o  codeFor_classInitialize

o  codeFor_closeAccept

o  codeFor_closeDownViews

o  codeFor_closeRequest

o  codeFor_emptyMenuActionCodeFor: selector menuItem: item

o  codeFor_hasUnsavedChanges

o  codeFor_menuSaveAs

o  codeFor_openAboutThisApplication

o  codeFor_openDocumentation

o  codeFor_postBuildWith

o  codeFor_postOpenWith

o  codeFor_standAloneApplicationRegistryPathFor: aClassOrNil

o  codeFor_standAloneApplicationUUID

o  codeFor_standAloneMain

o  codeFor_standAloneRealMainMethodFor: aClass

o  codeFor_standAloneUsage

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  compilerClass
Return a real compiler classto use to compile code

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



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 26 Apr 2024 06:29:12 GMT