Setup instructions for a model-to-model transformation for models that contain cross-references

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 a runtime workbench, and import the sample models.

About this task

Note: The projects that you import for this sample are also used for the sample named "Model-to-model transformation that generates multiple objects from a single input object." If you worked with that sample and made any changes in the projects, import the projects again to ensure that they work 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 is a mapping project that contains the following items:
  • In the model 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 sample 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 for models that contain cross-references.
  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 the sample transforms cross-references. For more information, see "Sample configuration for a model-to-model transformation for models that contain cross-references."

Feedback