hierarchical statecharts designer with code generation [closed]
What is the best free and the best commercial tool that lets me draw uml hierarchical statechats like in the picture below. It would also be cool if it could generate the c# source code stubs.
Take a look at the Domain-Specific Languages tools in the Visual Studio SDK. They include a DSL for state charts.
You can generate any code you need from one of these DSLs by using T4 Templates.
Some resources:
- Visual Studio Visualization and Modeling SDK (was DSL SDK)
- Getting Started with Visualization and Modeling SDK
- Visualization and Modeling SDK - Domain-Specific Languages
Note that these links are all for VS2010. That's because I can no longer find the VS2008 links, but the DSL Toolkit has a State Chart template in VS2008 as well.
I didn't see the "best commercial" part of your question.
I use Sparx Enterprise Architect. It can do full UML statecharts, and I believe it can generate code from just about any model, or transform one model into another. You might have to transform a state model into a model of the classes representing your states before then generating code from the classes, but that's the worst you'd have to do.
My UML-based case tool lets you create and inherit hierarchical state charts. It has full code generation and can import beans.
http://www.intrinsarc.com/evolve
However, the presentation and sophistication of the state charts are perhaps not as rich as you have drawn above. The tool is based around hierarchical components, and aligns component creation, reuse and evolution.
精彩评论