Specifying sources and targets for UML-to-Java transformations

You can select the source model or model elements on which to run a transformation, and specify a location where the transformation generates target elements or files.
The UML-to-Java transformation generates Java™ classes from the following UML sources:
  • UML models
  • Packages and their contents
  • Non-nested classes and their contents
  • Non-nested interfaces and their contents
  • Non-nested enumerations

You can select other elements, but they will not be transformed.

If you select a model or model elements in the Project Explorer view instead of using the Transformation Configuration editor, the model or elements that you select override the source model or elements that you specify in the transformation configuration.
Note: If you enable the reverse transformation, you must specify a model as the transformation source. The reverse transformation transforms Java source objects into UML objects and stores these objects in the UML model that you specify.

You can specify a Java project, or a source folder in a Java project, as the destination for the output of the UML-to-Java transformation.

To specify the source and target of a transformation:

  1. In the navigation view, right-click a transformation configuration file; then click Open.
  2. Click the Source and Target tab.
  3. In the Selected source pane, select a valid source model or model elements for the transformation.
  4. In the Selected target pane, select a valid target location for the artifacts that the transformation generates.
    Note: To create a new target location, click Create New Target Container and complete the pages in the wizard.
  5. Click File > Save.
The options are applied the next time that you run the transformation.
Note: If you create a new transformation configuration, you can specify this information on the Source and Target page of the New Transformation Configuration wizard.
Related concepts
UML-to-Java transformations
Related reference
Interpretation of UML elements by UML-to-Java transformations

Feedback