This shows you the differences between two versions of the page.
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).jar, that comes with the txtUML installation. It is not yet functional and integrated with the rest of the txtUML Eclipse GUI. We expect it to be fixed and integrated in a later release. | + | **Note:** The generated C++ code is incomplete. It contains structure (classes, attributes, methods, state machine elements) only, the behaviors (method bodies, instructions of state machine entries etc.) are not generated. Complete 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}} | ||