Code Generation Overview
The fields and methods
associated with modules are predetermined by the class hierarchy.
To simplify coding within these restrictions, code generation tools
are provided.
Each tool is a JavaScript form which collects the necessary information,
then starts the Java applet which generates the
Java code that implements the module and integrates it into the
NeatTools environment. Note that no generated code is public. The
only publicly accessible interfaces are NeatToolsModule and VisualNeatToolsModule.
In the more detailed explanations, each table is implemented as a JavaScript
form the user fills out. Following each table is a description of how the
table information is used in code generation.
In some cases, a free form text area is used to collect information
that is placed in the generated code files. This is done for:
- new data fields - the fields which are unique to this module
- new field initialization in constructor
- custom startup code - straight Java code placed in the "startUp()" method,
using variable names indicated in previous forms.
- custom shutdown code -- placed in "shutDown()" method.
- custom update code -- placed in "update()" method
- additional custom code - for convenience only, any additional Java
methods required by the new class.
For the initial prototype, code generation is a one-time operation. Additional edits on the
generated code must be done manually.