Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
When subgraphs (more than two levels) will be supported?

Thanks.
Re: [GEF4] Subgraphs in Graphviz DOT [message #1695737 is a reply to message #1307297] Mon, 18 May 2015 13:41 Go to previous message
Eclipse UserFriend
Support for this has been added in 3.10.0 M6 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438734) and is thus available in the 3.10.0 Mars release.

[Updated on: Mon, 18 May 2015 13:41] by Moderator

Previous Topic:Child elements not selected when parent is selected in a tree
Next Topic:as change a EditPart, or change a figure in GEF
Goto Forum:
  


Current Time: Wed Jul 23 12:55:05 EDT 2025

Powered by FUDForum. Page generated in 0.09115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top