Specifying delete options for obsolete UML-to-Java transformation output

If you delete source model elements, you can specify whether or not the corresponding Java™ files that the transformation generates should be deleted when you rerun the transformation.

When the UML-to-Java transformation generates classes, operations, and fields, it assigns the @generated tag to these elements. The next time that you run the transformation, the transformation overwrites these elements. When you delete elements from the source model and rerun the UML-to-Java transformation, the transformation deletes previously generated fields and methods that still have the @generated tag and that no longer have a corresponding source model element. However, for files that the transformation generates, you can specify whether or not to delete files.

To specify delete options for the UML-to-Java transformation output:

  1. In the Project Explorer view, right-click a transformation configuration file; then click Open.
  2. Complete one of the following steps:
    • If you are editing a UML-to-Java transformation configuration, click the UML to Java Options tab.
    • If you are editing a UML-to-Java (deprecated) transformation configuration, click the Properties tab.
  3. On the tab, complete one of the following steps:
    • Click Ask before deleting obsolete generated files.
    • Click Always delete obsolete generated files.
    • Click Never delete obsolete generated files.
  4. Click File > Save.
The options are applied the next time that you run the transformation.
Note: If you create a new UML-to-Java transformation configuration, you can specify this information on the UML to Java Options page of the New Transformation Configuration wizard. If you create a new UML-to-Java (deprecated) transformation configuration, you can specify this information on the Properties page of the New Transformation Configuration wizard.

Feedback