User Tools

Site Tools


v040:userguide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
v040:userguide [2016/03/21 18:21]
kgabor94
v040:userguide [2016/03/24 10:38] (current)
deva [Compilation to C++]
Line 14: Line 14:
 For a quick start we recommend experimenting with the sample models. For a quick start we recommend experimenting with the sample models.
  
-  * Download and unzip the {{v040:sample_models.zip|sample models}}.+  * Download and unzip the {{v040:demo.zip|sample models}}.
   * Import them into your Eclipse workspace (''​File''​ / ''​Import''​ / ''​General''​ / ''​Existing projects into workspace''​).   * Import them into your Eclipse workspace (''​File''​ / ''​Import''​ / ''​General''​ / ''​Existing projects into workspace''​).
   * Due to a [[https://​github.com/​ELTE-Soft/​txtUML/​issues/​173|known issue]] about type resolution, you might get errors after importing the example projects. Use the ''​Project''​ / ''​Clean''​ menu to clean and rebuild the projects in this case.   * Due to a [[https://​github.com/​ELTE-Soft/​txtUML/​issues/​173|known issue]] about type resolution, you might get errors after importing the example projects. Use the ''​Project''​ / ''​Clean''​ menu to clean and rebuild the projects in this case.
Line 94: Line 94:
 Switch to Java or Debug perspective and create a new run/debug configuration. Use ''​Java Application''​ type if you only want to run or debug the model only in text. Use ''​txtUML Application''​ type if state machine animation is required as well. Switch to Java or Debug perspective and create a new run/debug configuration. Use ''​Java Application''​ type if you only want to run or debug the model only in text. Use ''​txtUML Application''​ type if state machine animation is required as well.
  
-{{v020:​debugconf.png}}+{{v040:​debugconf.png}}
  
 Breakpoints can be created and managed the same way as for Java programs. The standard debug controls (stop, pause, resume, step, step-into) work as usual. Breakpoints can be created and managed the same way as for Java programs. The standard debug controls (stop, pause, resume, step, step-into) work as usual.
Line 110: Line 110:
 Open the generated Papyrus diagram and start the model either in //run// or in //debug// mode. The current state and currently executed transition gets highlighted. Open the generated Papyrus diagram and start the model either in //run// or in //debug// mode. The current state and currently executed transition gets highlighted.
  
-{{v020:​animation.png}}+{{v040:​animation.png}}
  
 For each state machine diagram, the state changes of the first activated object of the corresponding type will be highlighted. An expected later improvement will make it possible to select the object to be animated during the debug session. For each state machine diagram, the state changes of the first activated object of the corresponding type will be highlighted. An expected later improvement will make it possible to select the object to be animated during the debug session.
 ==== Compilation to C++ === ==== Compilation to C++ ===
  
-There is an experimental ​C++ model compiler in hu.elte.txtuml.export.cpp_(version).jarthat comes with the txtUML installationIt is not yet functional and integrated with the rest of the txtUML Eclipse GUIWe expect it to be fixed and integrated ​in a later release.+**Note:** The generated ​C++ code is incompleteIt contains structure ​(classes, attributes, methods, state machine elementsonly, the behaviors (method bodies, instructions of state machine entries etc.) are not generatedComplete code generation is expected ​in a later release.
  
 +The C++ model compiler can be reached by selecting the ''​txtUML''​ / ''​Generate C++ code from txtUML''​ menu.
 +
 +{{v040:​cppgen.png}}
 +
 +The Eclipse project and the package that contains the model must be specified. The //txtUML deployment configuration//​ is a description of how the object instances will be distributed into different threads. We suggest reviewing the deployment configurations in the {{v040:​demo.zip|demo projects}}. Detailed documentation of the deployment configuration language will be available when the complete C++ code generation will be released.
 +
 +The generated C++ code is saved in the //cpp-gen// folder of the selected project. Note that you might have to //refresh// the folder so that the newly generated files become visible in Eclipse.
 +
 +{{v040:​cppfiles.png}}
  
v040/userguide.1458580897.txt.gz ยท Last modified: 2016/03/21 18:21 by kgabor94