A mapping project is a standard
plug-in that specifies a transformation provider, which is the mechanism
that defines transformations. A mapping project also contains at least
one mapping model. When you create a mapping project, a mapping model
is created in the project, based on the input and output models that
you specify.
Before you begin
To create transformations, you must install
the extensibility features, which are packaged as an optional product
component. You must enable the Modeling and
XML Developer capabilities.
You can specify one or more source and target
metamodels when you create a mapping project. You can specify metamodels,
which have .ecore as a file name extension, or UML profiles, which
have .epx or .uml as a file name extension.
Procedure
- Click .
- In the New Project wizard, on the Select
a wizard page, expand Transformation Authoring and
click Model to Model Mapping Transformation Project.
- Click Next.
- On the Plug-in Project page, in the Project
name field, specify a project name. You can accept the
default values for the other fields on the page.
- Click Next.
- On the Plug-in Content page, review
the values and click Next.
- On the Templates page, from the Available
Templates list, select Plug-in with Transformation
Mapping.
- Click Next.
- On the Create a Mapping Model for a New Model-to-Model
Transformation page, complete the following steps:
- In the Mapping model name field,
specify a name for the transformation mapping file.
- Specify at least one input model and one output model. If you specify source and target metamodels
when you create a project, the necessary dependencies are added to
the plug-in manifest file automatically. If you add the metamodels
by using the commands in the editor area after you create the mapping
project, you must add any new required dependencies to the plug-in
manifest file.
- Click Next.
- On the Specify the Properties of the New Model-to-Model
Transformation page, complete the following steps:
- Specify values for the properties that are common to
transformations, such as the transformation ID and name.
- In the Properties section, specify the properties that
transformation users can configure. When a user creates a transformation
configuration for this transformation, these key-value pairs appear
on the Properties page of the New Transformation Configuration wizard
or editor.
- Click Next.
- On the Specify Code-Generation Properties for
the Transformation page, specify the classes that generate
the transformation source code. The values that you specify on this
page override the workspace preferences, and apply only to the current
model-to-model transformation project.
- Click Finish.
Results
The generated mapping project contains a mapping model.
A mapping project can contain multiple mapping models.