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.13 date: 2024/02/09 11:29:32
user: stefan
file: JavaScriptCodeGeneratorTool.st directory: libjavascript
module: stx stc-classLibrary: libjavascript

Description:


Code generation facilites for JavaScript

copyright

COPYRIGHT (c) 2011 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

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  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_standAloneMainOnClassSide

o  codeFor_standAloneRealMainMethodFor: aClass

o  codeFor_standAloneUsage

o  codeToAssign: what to: var

o  code_forWidget_buttonPress

o  code_forWidget_initialize

o  code_forWidget_keyPress

o  code_forWidget_redraw

o  code_forWidget_sizeChanged

o  code_forWidget_update

o  eolCommentString

o  nilValueString

o  selfValueString

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 21 Nov 2024 13:04:44 GMT