use of org.eclipse.elk.core.UnsupportedConfigurationException in project elk by eclipse.
the class Issue562Test method test.
@Test
public void test() {
// Create the basic graph structure
ElkNode graph = ElkGraphUtil.createGraph();
ElkNode n1 = ElkGraphUtil.createNode(graph);
ElkPort p1 = ElkGraphUtil.createPort(n1);
ElkPort p2 = ElkGraphUtil.createPort(n1);
ElkEdge e = ElkGraphUtil.createSimpleEdge(p1, p2);
// Create a layout configurator to apply options, just as it would happen in the DiagramLayoutEngine
LayoutConfigurator config = new LayoutConfigurator();
config.configure(n1).setProperty(CoreOptions.INSIDE_SELF_LOOPS_ACTIVATE, true);
config.configure(e).setProperty(CoreOptions.INSIDE_SELF_LOOPS_YO, true);
// Apply the configurator and a layout algorithm resolver, just like the DiagramLayoutEngine does
ElkUtil.applyVisitors(graph, config, new LayoutAlgorithmResolver());
// Apply layout. We don't want an UnsupportedConfigurationException to be thrown
try {
new RecursiveGraphLayoutEngine().layout(graph, new NullElkProgressMonitor());
} catch (UnsupportedConfigurationException ex) {
fail(ex.toString());
}
}
Aggregations