Creating and editing transformation mapping models

A mapping model can help you manage the files that a UML transformation generates. You can create a mapping model if you want to specify an alternate name for any of the files or folders that a transformation generates. After you create a mapping model, you can select and apply it the next time that you run a transformation on your model. You must create a mapping model in the same workspace as the selected source model elements.

You must be in the Modeling perspective.
To create a mapping model:
  1. In the Model Explorer view, select the top-level model elements that you want to include in the mapping model.
  2. Click Modeling > Transform > Configure Transformations.
  3. In the Configure Transformations window, from the Transformations/Configurations list, select a transformation configuration.
  4. Click the Mapping tab.
  5. On the Mapping page, select the Enable mapping check box.
  6. Click New.
  7. In the Create Mapping Model window, in the File name field, type a name.
  8. Click Save. The new mapping model is displayed in the Model Explorer view in a directory called Mapping Models.
  9. On the Mapping page, click Edit Mapping.
  10. In the Edit window, select a model element.
    Note: If you specify an alternate file name for a folder such as a UML package element, the change affects all resources that the transformation generates in that folder.
  11. To specify an alternate name for the generated element, in the Mapped Name field, type a name.
  12. Click Apply.
  13. To specify an alternate name for another generated element, repeat steps 11 and 12.
  14. Click OK.
  15. Click Apply.
  16. Click Close.
The first time that you create a mapping model, the transformation creates a directory in the current project called Mapping Models.
Related concepts
About mapping models
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.