Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
GEF/GEF4/DOT
Note to non-wiki readers: This documentation is generated from the Eclipse wiki - if you have corrections or additions it would be awesome if you added them in the original wiki page.
Introduction
The GEF4 DOT component is intended to deliver Graphviz DOT support. It bundles a Xtext-based DOT-editor, as well as import/export functionality from/to GEF4 Graph.
UI
In Zest 2, graphs can be created from DOT input. For instance, for the following DOT input, the Zest graph below is drawn, see also the complete documentation. The Zest graph view can be used with the included DOT editor to visualize a DOT file or to display embedded DOT in other files, e.g. in source code comments or in wiki markup.
digraph simple { n1[label="Node 1"] n2[label="Node 2"] n1 -> n2[style=dotted label="A dotted edge"] }
API
Using the API, DOT can be imported to Zest graphs, and Zest graphs can be exported to DOT (see below). To use the API, create a new Plug-in project and add org.eclipse.gef4.zest.core to the MANIFEST.MF dependencies.
Graph graph = new DotImport("digraph{ 1->2; 2->3; 2->4 }").newGraphInstance(); GraphWidget widget = new GraphWidget(graph, shell, SWT.NONE); System.out.println(new DotExport(graph).toDotString());
The complete sample usage is available in the repository, as well as DOT input samples.