Visualizing EMF models with Graphviz
and I have built an integration (currently proof of concept) between EMF and Graphviz
. Actually, this is especially relevant for textual models (created via Xtext) since GraphViz has very good auto-layout facilities; so it becomes realistic and useful to automatically render a diagram from a specification (textual model) that has no layout information in it.
Here's the way it works: Michael has created an EMF representation of the dot language (GraphViz's language for describing the to-be-rendered graph). He has also built a generator (using oAW's Xpand) that actually generates the dot file. This can then be rendered by the GraphViz dot renderer.
Here's how you render your own model: you write a model-to-model transformation that maps you meta model onto the dot meta model. To do that, I wrote a bunch of oAW extension functions that make this job easy.
To render the example picture above from my textual spec, I had to write about 30 lines of Xtend code -- not much.
If you're interested, we're currently in the process of figuring out where and how to make it available.