fsteeg.com | notes | tags

∞ /notes/diagrams-in-wiki-markup-with-mylyn-wikitext-dot-and-zest | 2010-02-07 | eclipse graphviz soc zest

Diagrams in wiki markup with Mylyn WikiText, DOT, and Zest

Cross-posted to: https://fsteeg.wordpress.com/2010/02/07/diagrams-in-wiki-markup-with-mylyn-wikitext-dot-and-zest/

I'm continuing on my ancient quest for Graphviz DOT support in Eclipse: after implementing initial support for rendering DOT with Zest in Eclipse through dot4zest and some early tinkering with dynamically drawing DOT embedded in wiki markup with Zest, I have now started to approach the next step: integrating the Graphviz export into the Mylyn WikiText editor.

Say we are editing embedded DOT in wiki markup with the Mylyn WikiText editor and have an open dot4zest Zest graph view, which displays a Zest representation of the DOT graph (powered by the EMF model visualizer and Xtext - vote Xtext!):

Mylyn Wikitext editor and Zest Graph View

Now upon saving, dot4zest asksĀ if we want to add a reference to the Graphviz image export to our wiki markup file (requires a local Graphviz installation, for which we are prompted the first time the export happens):

Dialog

If we say yes, dot4zest puts a reference to the exported image file into our plain text wiki markup file. This adds an image representation of the Zest graph displayed in the view to output generated from the plain text - like HTML export or the preview tab of the Mylyn WikiText editor:

WikiText editor including exported image

Being sort of pre-incubation, this is all still fairly restricted and experimental, e.g. it currently supports only a single graph per file and only Textile markup. I've added these latest changes to the update site, so if you want to check it out update your existing dot4zest installation or install it from the update site at http://quui.com/updates (category Zest -> feature dot4zest).