Generating Documentation and Other Artifacts

Running JS/UML Generation

To run the generation action choose a UML model file (*.uml) and right-mouse for the context menu, choose "JS/UML Generate..", this will launch a wizard where the templates and output folders can be entered. Click "Finish" to run the generation.

Template Syntax

The templates are all written using the Velocity Template Language (VTL). The Velocity site (http://velocity.apache.org) contains documentation about VTL, including:

Template Context

Each template operates at a certain "level" within the model hierarchy - the context objects available to each template include the context object for that level as well as the objects for all higher levels. The levels are as follows:

  • Model Level: a model template is run once for the whole model, it contains the $model context object

  • Package Level: a package template is run once for each nested package in the model, context objects are $package and $model

  • Class Level: run once for each class in the model, context objects are $class, $package and $model

The model objects come from the Eclipse UML2 project:

  • $model is of type org.eclipse.uml2.uml.Model

  • $package is of type org.eclipse.uml2.uml.Package

  • $class is of type org.eclipse.uml2.uml.Class

Full API documentation can be found here

Example Project Documentation

The example project available on the download page contains a set of documentation templates. They can be used as-is or as the starting point for custom documentation.

  • if you make nice templates please consider sharing them with us