You can create a mapping model to specify an alternate
name for each file or folder that a transformation generates. A mapping
model is separate from the source model and contains an artifact
for each source model element that corresponds to a generated file
or folder. Each artifact has the same name as the element it represents.
You can specify an alternate name for each source element by changing
the artifact’s file name property. Changing the file name property of
an artifact that represents a generated folder such as UML package
element, affects all resources that are generated into that folder.
After a mapping model is created, you can apply it the next time
that you run a transformation on your model.
To create a mapping model:
- In the Model Explorer view,
select model elements.
- Click .
- In the Configure Transformations window,
in the Transformations/Configurations list, complete one of the following
steps:
- To edit an existing transformation configuration,
select a transformation configuration.
- To create a new transformation configuration, select a transformation;
then click New, in the Name box,
type a name.
- Click the Mapping tab.
- On the Mapping page, click Only
create mapping model (no transformation).
- Specify a name and the current workspace and project.
- Click Run. The
generated mapping model is displayed in the Model Explorer view
in the current project.
- In the Model Explorer view, in the
mapping model, select an artifact.
- In the Properties view, click the General tab.
- On the Properties page, in the File
Name field, type a name.
- Right-click the model (.emx) file; then click .
- Repeat steps 8 through 11 as necessary for each artifact. The mapping model you created is available when you run a
transformation on your model.