Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [GEF4] Subgraphs in Graphviz DOT
[GEF4] Subgraphs in Graphviz DOT [message #1272560] Tue, 18 March 2014 03:52 Go to next message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
Registered: August 2009
Senior Member
Hello,

I am testing the GraphWidget from GEF4 and was able to display some graphs using the DOT language. However, when I try to create subgraphs, they are not displayed. I am using the example shown on this page but subgraphs are not displayed (the nodes are all displayed, on the other hand).

The graph that I want to display:
digraph subgraphs {
  subgraph cluster1 { 1 -> 2; 2 -> 3; 2 -> 4 }
  subgraph cluster2 { a -> b; a -> c; a -> d }
}


The full code to create the graph widget:
		String dotGraph = "digraph subgraphs {"
				+ "subgraph cluster1 { 1 -> 2; 2 -> 3; 2 -> 4 }"
				+ "subgraph cluster2 { a -> b; a -> c; a -> d }" + "}";
		Graph.Builder graph = new Graph.Builder(dotGraph);

		GraphWidget widget = new GraphWidget(graph.build(), mainComposite,
				SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);


Why is this not showing the clusters ? It is the same dot string that is used in the example page and there the clusters are properly displayed. Do I need to do something special to make the subgraphs visible ?

Thanks,
Cédric
Re: [GEF4] Subgraphs in Graphviz DOT [message #1272668 is a reply to message #1272560] Tue, 18 March 2014 09:08 Go to previous messageGo to next message
Fabian Steeg is currently offline Fabian Steeg
Messages: 72
Registered: July 2009
Member
Hi Cédric! Sorry, that documentation page is outdated. The DOT component in GEF4 is undergoing some major refactoring (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=372365 for details) and the subgraph rendering is currently not supported. I will update the wiki page. Cheers, Fabian
Re: [GEF4] Subgraphs in Graphviz DOT [message #1272718 is a reply to message #1272668] Tue, 18 March 2014 11:30 Go to previous messageGo to next message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
Registered: August 2009
Senior Member
Hi Fabian,

Thanks for the reply. Do you have any idea when this would be supported again ?

The strange thing is that the sub graph rendering is possible, but only through direct API calls (e.g. creating instances of GraphContainer, as shown here: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/swt/NestedGraphSnippet.java). This example code actually works and displays subgraphs (that you can collapse).

Cédric
Re: [GEF4] Subgraphs in Graphviz DOT [message #1272758 is a reply to message #1272718] Tue, 18 March 2014 13:41 Go to previous messageGo to next message
Fabian Steeg is currently offline Fabian Steeg
Messages: 72
Registered: July 2009
Member
Yes, the problem is not in the widget part but in the mapping of the DOT input to the new internal data structure which is independent of the rendering. Our current efforts focus on providing a new JavaFX-based presentation layer for Zest, so I'm not sure if we are going to implement DOT subgraph rendering anytime soon.
Re: [GEF4] Subgraphs in Graphviz DOT [message #1272972 is a reply to message #1272758] Wed, 19 March 2014 03:51 Go to previous messageGo to next message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
Registered: August 2009
Senior Member
Ok, thanks for the reply.
I'm looking to adapt my code to use the API instead but I didn't find a way to have a GraphContainer nested inside another GraphContainer (the ctor accepts a GraphWidget, and the ctot accepting a GraphContainer is deprecated).

Is this feature not supported ?

Thanks,
Cédric
Re: [GEF4] Subgraphs in Graphviz DOT [message #1307297 is a reply to message #1272972] Mon, 21 April 2014 09:15 Go to previous message
Jingang Zhou is currently offline Jingang Zhou
Messages: 18
Registered: August 2010
Junior Member
When subgraphs (more than two levels) will be supported?

Thanks.
Previous Topic:[Zest] Center label in a node
Next Topic:Change Palette background color?
Goto Forum:
  


Current Time: Thu Jul 31 05:32:12 EDT 2014

Powered by FUDForum. Page generated in 0.01652 seconds