After you generate the transformation
source code, you can run the generated model-to-model transformation.
Preserving changes to transformation source code When
you change the Java™ elements in the generated transformation source
code, you must edit or remove the corresponding @generated tags. If you edit
or remove an @generated tag, the next time that you generate transformation
code, your changes are preserved.
Specifying merge options for model-to-model transformation output The
output that a transformation generates can replace or merge with an existing
model. You must specify the merge properties in the transformation configuration
that you create before you run the transformation. The availability of a merge
depends on the specification of a merge strategy for the output metamodel.
Adding merge support for models generated by model-to-model transformation mapping projects If
merge support is not specified for the type of metamodel that the transformation
generates, or if you want to override the merge support that is specified
for that type of metamodel, you can specify a merge extension in the mapping
project or in the project that defines the target metamodel.
Linking transformation output to other transformations You
can link output from a transformation to with another transformation to create
combinations of model-to-model transformations and Java Emitter Templates (JET) model-to-text
transformations. This functionality enables you to create more complex transformations,
such as the UML-to-Java transformation.
Creating transformation configurations
To run a transformation, you can create
a transformation configuration. A transformation configuration contains the
information that the transformation uses to generate the output that you expect.
A transformation configuration also contains information that is specific
to a particular type of transformation.
Generating debugging information for transformations If
a transformation does not generate the output that you expect, you can specify
that the transformation generate a log file. A log file provides information
about the source elements, the target elements, and the rules that the transformation
applies to transform the source elements. If the transformation transforms
many elements, you might experience decreased performance while the transformation
generates the log file; therefore, you should only generate a log file for
debugging purposes.
Running and rerunning model-to-model transformations
You can run a model-to-model transformation by applying a transformation
configuration, by using command-line syntax, or by invoking the transformation
API in application source code.
Managing unresolved references to previously generated objects in model-to-model transformations
When a model-to-model transformation runs, it generates either
objects or references to generated objects, depending on the feature settings
in the metamodel. If the transformation generates objects, it records identifying
information about those objects in a hash map. The transformation resolves
references to objects during post-processing, based on the hash map. However,
if the hash map does not contain sufficient information, you must manage the
references.