Setup instructions for a model-to-model transformation that generates multiple objects from a single input object

This sample includes a mapping project, a source test project, and a target test project. To set up the sample, you must import the sample into your workspace, start the runtime workbench, and import the test projects.

About this task

Note: The project that you import for this sample is also used for the sample named "Model-to-model transformation for models that contain cross-references." If you worked with that sample and made any changes in the project, import the project again to make sure that it works correctly.

Import the sample

Procedure

  1. On the sample overview page, click Import the sample.
  2. Click Finish.
  3. If you are prompted to switch to the Plug-in Development perspective, click OK. The wizard creates a new project in your workspace. The new plug-in project is displayed in the Package Explorer view. You can now browse the sample transformation mapping model and the transformation source code.

Results

The imported plug-in contains the following items:
  • In the models folder, a transformation mapping model named Multiplemodels.mapping
  • In the src folder, the transformation source code that was generated from the mapping model
  • All additional files that are required to support the project

Import the models

Procedure

  1. In the Project Explorer view, right-click the project; then click Run as > Eclipse application to open a runtime workbench
  2. In the runtime workbench, click Help > Help Contents.
  3. In the test workbench, open this sample again: On the Contents page, click Samples > Technology samples > Transformations > Model-to-model transformation that generates multiple objects from a single input object.
  4. On the sample overview page, click Import the source project.
  5. Click Finish.
  6. If you are prompted to switch to the Modeling perspective, click OK. The wizard creates the new project in your workspace and adds it in the Package Explorer view.
  7. Click Import the target project.
  8. Click Finish. The wizard creates the new project in your workspace and adds it in the Package Explorer view.

Results

You can now investigate how to use interdependent mapping declarations to create multiple target elements from a single source element. For more information, see "Sample configuration for a model-to-model transformation that generates multiple objects from a single input object."

Feedback