Uml2 to Java Plug-in Download
The transformation of UML 2.0 models to Java has been implemented as a plug-in (ch.ethz.codegen.modeler.uml2java) for Rational Software Modeler. The plug-in can be downloaded from here.
The ch.ethz.codegen.modeler.uml2java plug-in is freely and publicly available under the terms of the General Public License.
Where and how to install it?
The plug-in is distributed as a zip file. After unzipping it, the extracted ch.ethz.codegen.modeler.uml2java folder should be added to a destination where all plug-ins are stored. In the case of the RSM environment a repository of plug-in can be found on the following path ...\6.0\ eclipse\plugins.
How to use it?
The RSM environment provides a specialized modeling perspective allowing to design UML2 models graphically. In particular, in this view a developer has a wide selection of different UML2 diagrams and basic modeling elements. Since this view will be use by a model developer most often, the modeling has been selected for invocation of the model to code transformation process.
The following steps demonstrate how to use the plug-in transforming a UML2 model to Java code. Firstly the code generation process has to be properly configured. The configuration action can be found in the “Modeling” menu, under the “Transform” item (see figure below). In the configure transformation dialog window has to be set a transformation type (there is currently only one available “UML2->Java”) and then a source model and a target directory where the generated code will be stored.

Once the configuration is finished then the code generation can be invoked either from the main menu (Modeling – Transform – UML2->Java) or from the Model Explorer window by a right mouse click on a UML2 model to invoke a pop-up menu from where the model to code transformation can be called (see figures belows).

