How to Generate State Machine Code from UML?
Once the controller class and state machine are modeled, you can generate state machine code for the controller and state machine. With the generated state machine, you can run instant generator to produce other classes, like the model and view classes, and incooperate with the state machine code.
To generate state machine code:
- Select Tools > Code > Generate State Machine Code... frrom the toolbar.
- In the Generate State Machine dialog box, select the controller class for generating state machine.
- Select the state machine in the drop down menu State Diagram for generating code.
- Select the programming language of the code.
- Specify the output path to save the generated code to.
- Optionally configure the generator options.
- Click OK to generate.
|NOTE:||There must be at least one class that contain sub state machine diagram in order to open the Generate State Machine Code dialog box.
An overview of Generate State Machine Code dialog box
|An overview of Generate State Machine Code dialog box
|A description of Generate State Machine Code dialog box
The following resources may help you to learn more about the topic discussed in this page.
|1. Modeling guidelines||Table of Contents||3. Reverse state machine code|