Specifying the source and target of a UML-to-Java transformation

You can select the source model or model elements on which to run the transformation, and specify a location where the transformation generates target elements or files.

For the UML-to-Java transformation, valid UML source objects include UML 2.0 models, packages, non-nested classes, non-nested interfaces, and enumerations. You can select other elements, but they will not be transformed.

Note: If you enable the reverse transformation, you must specify a model or container 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.

A valid transformation target is a Java project that contains at least one source folder.

To specify the source and target of a transformation:

  1. In the Project Explorer 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.
    Note: A model element that is contained by another model element, such as a component or collaboration, is not transformed unless you select it.
  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 reference
Valid sources and targets for the UML-to-Java transformation
UML-to-Java transformation input

Feedback