Skip to main content


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 07:52 Go to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
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 13:08 Go to previous messageGo to next message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
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 15:30 Go to previous messageGo to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
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 17:41 Go to previous messageGo to next message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
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 07:51 Go to previous messageGo to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
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 13:15 Go to previous messageGo to next message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 18
Registered: August 2010
Junior Member
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 17:41 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
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 17:41]

Report message to a 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: Tue Mar 19 11:12:43 GMT 2024

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

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

Back to the top