Applicability of the Model to Java Transformation to IBM Rational Software Modeler
The simplest and in most situations usually recommended way to adapt or reuse the described model-to-code transformation concept, or to implement a different one, is to take the Model-to-Text Transformation template project from a list of demonstrations projects included in RSM. Creating a new project from the template project has several advantages as for example a proper project setting or immediately executable pre-implemented demonstration of a model-to-text transformation.
In the case of the model-to-code transformation plug-in that transforms a UML 2.0 model to Java code the following modifications had to be performed:
-
To modify default JET files (a part of the default project) in order to process UML 2.0 elements and generate Java or other source code format. In the case of the model to Java it was to find and implement a suitable mapping for UML 2.0 class elements with associated state machines and interface elements to Java representation.
-
Most likely an implementation of a helper class that exposes operations facilitating manipulation with a UML model and its parts.
-
There are also a few but important modifications of files that are generated together with the whole model-to-text transformation project. It is difficult from this perspective to point to files that need to be modify because of variety of possible transformations. As an inspiration can be used the model to Java transformation plug-in that includes also complete source code.