Setup instructions for a model-to-model transformation that specifies
a URI as a target
To run the transformation, you must import the transformation plug-in
into your workspace, start the runtime workbench, import the UML test project,
and then invoke the transformation.
Import the sample
Procedure
On the sample overview page, click Import
the sample.
In the Sample Model-to-Model Transformations import
wizard, in the Project Name field, specify a name for
the sample project.
Click Finish.
If you are prompted to switch to the Plug-in Development perspective,
click OK. The wizard creates the
new project in your workspace. The Package Explorer view
displays the new plug-in project. You can now browse the sample transformation
mapping model and transformation source code.
Results
The imported plug-in contains the following items:
In the models folder, a transformation mapping model
named project4source.mapping
In the src folder, the transformation source code
that is generated from the mapping model
In the Project4sourceTransformationValidator and Project4sourceTransformationProvider
classes, modifications to the generated transformation source code
Run the transformation
Procedure
Start the runtime workbench.
Click Help > Help Contents.
On the Contents page, click Samples > Technology samples > UML models > Transformation that specifies a URI as a target sample.
On the sample overview page, click Import the test project.
In the Sample Transformations Test Project
import wizard, in the Project Name field, specify a
name for the test project.
Click Finish.
If you are prompted to switch to the Modeling perspective, click OK.
The wizard creates the new project in your workspace. The Package
Explorer view displays the new plug-in project. You can now browse
the test model and the transformation configuration.
In the Package Explorer view, double-click
the transformation configuration file named runtest.tc.
Optional: If you specified a project name other than
the default in step 5,
you must update the paths to the source and target models.
In the transformation configuration editor, on the Source
and Target tab, in the Selected source pane, expand the imported
test model, and click the model named Source.
Click File > Save.
On the Main tab of the transformation configuration
editor, click Run. The transformation
completes the following steps:
It creates a target model file named Target.emx. This file name is displayed
in the runtest.tc transformation configuration, on the Properties page.
It copies elements from the source model to the target model.