Return to TouchCORE User Guide

Exporting

TouchCORE supports to generate code and other models from your model. Currently, code generation for Java, as well as Ecore models generation/exporting is supported. The generation uses the class diagram (structural view of a design realization model or woven design model) as input and produces the equivalent in the target format.

Ecore Model

The Ecore Generator supports classes, attributes, associations and enums. The result will contain one package whose name is that of the design model you are generating from. The namespace URI will have the format “http://<modelName>“.

To generate an Ecore model, select the “Generate” button and then choose “Ecore Model”. Then. specify the target .ecore file.

Currently, the Ecore Generator has the following limitations:

  • one-to-many associations will only be generated for those association ends, where no selection was made
  • the properties unique and ordered are not set according to your model (based in the feature selection)
  • the package name, namespace name and URI cannot be¬†specified, but you can change them in the generated .ecore file

Java Code

The Java Code Generator creates a Java class for each class in your design. Methods are implemented based on their corresponding message view (sequence diagram). Implementation classes are imported in those classes that they are used in.

To generate Java code, select the “Generate” button and then choose “Java Code”. Then, specify the target folder.