Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DirectedGraph: nodes out of order
DirectedGraph: nodes out of order [message #1720769] Wed, 20 January 2016 20:12 Go to next message
Chris Domin is currently offline Chris DominFriend
Messages: 2
Registered: January 2016
Junior Member
I have a program where I have a tree. I place the nodes and their edges in NodeList and EdgeList. Then put the lists in a DirectedGraph which I then run through DirectedGraphLayout.visit().

I now place the nodes and edges on the screen. The diagram is almost perfect but there are some inconsistencies with nodes being out of order.

The first one is shown in the following picture. As you can see it places a few children of parent1, then places some nodes from parent2. Then for some reason that I can't figure out it places the last child from parent1 to the right of parent2's children.

index.php/fa/24710/0/

The next problem are the children of a parent being out of order. When the children should be placed in the order: 1 2 3 4, they are instead placed in different orders such as: 2 3 1 4.

I have tried adding the nodes to NodeList is different orders, trying post and pre order recursion to parse my tree. I end up getting the exact same positioning.

I'm at a loss on how to fix this. Any tips about how DirectedGraph works and why it's placing nodes like this is appreciated.
Re: DirectedGraph: nodes out of order [message #1723446 is a reply to message #1720769] Mon, 15 February 2016 17:56 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: L√ľnen
Senior Member
You will probably have to debug this. I would recommend to disable individual steps of the algorithm so that you can see which step actually causes the re-ordering.
Previous Topic:draw2d: How to get the height of word wrapped text
Next Topic:Adding another GraphicalViewer in GraphicalEditorWithFlyoutPalette
Goto Forum:
  


Current Time: Fri Nov 16 05:51:00 GMT 2018

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

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

Back to the top