views:

30

answers:

1

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.

alt text

A: 

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:

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.

John Saunders
The code generation is more a secondary feature. I need to create good looking true UML statecharts. At first sight it seems to me that the look is rather homegrown and does not look like the "standard" UML diagrams (as in the pic).
bitbonk