Skip to content

User Guide

Tamas Borbas edited this page Jul 1, 2015 · 22 revisions

Installation

  • see Getting started
  • TODO how to check for installation problems and ensure everything is set up correctly
  • TODO: Install guide here should be minimal (download eclipse, get one or maximu two update sites next, next and it should be ok)

Opening models with Papyrus

You can open any perspective with Open Perpective button or just switch already used ones with buttons on perpective toolbar.

When you use the Papyrus perspective the "model sets" (files with same name and different extension in a directory) are collapsed into a virtual element (the virtual element's name will be the same as contained elements'). You can open this virtual element like a directory and here will be the cppmodel and the xtuml model for the original uml model.

Invoking the code generation

The model compiler is invokable using the Papyrus editor's context menu's Generate CPP code for selected UML model entry. This just appears in the main class diagram.

Context menu

This transforms the xtUML model to the CPPModel and generates the C++ code.

The following files/directories are generated:

  • .xtuml and .cppmodel with source model's name
  • directory for components
  • directory for packages in components
  • body (.cc) and header (.hh) files for classes into their owner component's/package's directory (please only use packages in components)

The followings are not generated yet:

  • body and header files for components and packages

Troubleshooting

  • TODO invalid UML model
  • TODO invalid XTUML model
  • TODO unsupported configurations causing the CPP code generation to fail

Known issues

  • TODO exceptions on save (not contained in resource)
  • TODO exception on CPP transformation (EIQ Rete add/remove during resource unload)

Checking the generated code

Sample model structure:

Sample model structure

Generated directories/files:

  • .\emdw-cpp-gen: main directory for the generated codes near the source model
  • .\emdw-cpp-gen\Comp: directory for uml component which name is "Comp"
  • .\emdw-cpp-gen\Comp\Package1: directory for uml package called "Package1"
  • .\emdw-cpp-gen\Comp\Package1\Ping.hh: header file for uml class called "Ping"
  • .\emdw-cpp-gen\Comp\Package1\Ping.cc: body file for uml class called "Ping"
  • .\emdw-cpp-gen\Comp\Package1\Pong.hh: header file for uml class called "Pong"
  • .\emdw-cpp-gen\Comp\Package1\Pong.cc: body file for uml class called "Pong"
Clone this wiki locally