Running Java-to-UML transformations

Before you can run a transformation, you create a transformation configuration. When you apply a transformation configuration, an instance of the transformation is created and the transformation runs with the properties that the configuration defines.

The Java-to-UML transformation uses the comparing and merging functionality to determine the differences between the target model and the temporary model that the transformation generates. When you run the Java-to-UML transformation, the merge editor displays the differences between the two models. In the merge editor dialog box, you can select the changes that the transformation merges into the target model.

To run a transformation, complete one of the following steps:
  • To run the transformation on the source specified in the configuration, depending on the view that you are working in, complete one of the following steps:
    • In the navigation view, right-click a transformation configuration (.tc) file; then click Transform and click a transformation.
    • In the Pattern Explorer view, right-click a transformation; then click Run Transformation. In the Select configuration dialog box, specify the transformation configuration to run, and click OK.
    Tip: You can also run a transformation from the transformation configuration editor. On the Main page, click Run.
Tip: To run this transformation again, click Modeling > Transform > Run Last. The transformation uses the same source elements from when you last ran the transformation.
  • To run a transformation from a command line, use the following syntax:
    eclipse -data workspace-path -application com.ibm.xtools.transform.core.transformationRunner -transformConfigs "[-R]transformation-configuration-path1,[-R]transformation-configuration-path2,..." 

    In the -transformConfigs parameter, you must specify the complete workspace path and configuration file name, not the file-system path name, of one or more transformation configurations.

    Running a transformation from a command line suppresses all dialog boxes that the transformation generates.

    As an example, a transformation configuration called MyConfig.tc is in a project called MyProject in a workspace called MyWorkspace. This transformation configuration specifies the configuration information for a transformation called MyTransformation, and for a corresponding reverse transformation called MyReverseTransformation.To invoke MyTransformation, you can run the MyConfig.tc configuration by typing the following text at the command line:
    eclipse -data /MyWorkspace -application com.ibm.xtools.transform.core.transformationRunner -transformConfigs "MyProject/MyConfig.tc"  
    To run the reverse transformation, specify the -R option at the beginning of the transformation configuration path, as in this example:
    eclipse -data /MyWorkspace -application com.ibm.xtools.transform.core.transformationRunner -transformConfigs "-RMyProject/MyConfig.tc"
    To run multiple transformations, in the -transformConfigs parameter, specify a comma-separated list of transformation configurations, including the workspace path name for each configuration. You can run forward or reverse transformations, as in this example:
    eclipse -data /MyWorkspace -application com.ibm.xtools.transform.core.transformationRunner -transformConfigs "MyProject/MyConfig.tc, -RMyProject/MyConfig.tc"
Related tasks
Running Java-to-UML transformations in silent mode
Generating debugging information for Java-to-UML transformations
Related reference
Interpretation of source code by Java-to-UML transformations
Related information
Comparing and merging versions of a model

Feedback