This repository contains an example for using the ELK Libavoid Eclipse plug-in. The example uses one of the Eclipse plug-in templates with a command handler.
In this example, layout is invoked via the RecursiveGraphLayoutEngine. For other ways to use ELK layouts, see the ELK documentation.
The basic usage is very simple:
var engine = new RecursiveGraphLayoutEngine();
var graph = createGraph();
engine.layout(graph, new BasicProgressMonitor());The following steps are important when creating the graph:
- Set the
ALGORITHMoption of the graph to"de.cau.cs.kieler.kiml.libavoid" - Assign positions and sizes to all nodes and ports
- Set the
PORT_CONSTRAINTSoption of nodes toFIXED_POS - Set the
PORT_SIDEoption of every port to one of the valuesNORTH,EAST,SOUTHorWEST
The resulting edge routing can be read from the edge layout sections.