Generate production quality code from state diagrams created with StarUML#
The StarUML parser is experimental and under active development. The existing feature set already supports a useful subset for code generation.
Key Features#
- Robustness checks before generation
- No runtime framework required
- Suitable for embedded and non-embedded targets
Drawing the State Machine Diagram#

Creating Code#
Export from StarUML via File -> Export -> XMI and run:
java -cp "/path to codegen jar file/*" codegen.Main -l cx -p StarUML -o testcase -t "Model:class1" testcase.xmiSupported Elements#
- Hierarchical states
- Signal events with guard/action
- Initial and final pseudo states
- History states
- Choices