3

I've developed an eclipse plugin for generating Graph using GEF-Zest. I'm using SpringLayoutAlgorithm as the layout algorithm(I've also tried the other layouts), but still the nodes and edges overlap each other which creates a noisy graph. I need help in solving this problem.

  • Which version of GEF / Zest are you using? Can you share your code? What have you tried? – Matthias Apr 20 '18 at 12:21
  • @Matthias I'm using GEF 5.0. Regarding the code, I've extended the `ZestFxUiView` view class which comes with Zest, such that I just give my graph to the public method of `ZestFxUiView` i.e., `setGraph`. – Aravinthsamy Sekar May 03 '18 at 14:18

1 Answers1

0

You can have a look at Eclipse Layout Kernel (ELK), they do provide sophisticated layout algorithms. Moreover, you can have a look at Graphviz. Both can be integrated as layout engines with GEF Zest. However, you need to implement GraphvizLayoutAlgorithm (delegating to Graphviz) or ElkLayoutAlgorithm (delegating to ELK).

There is an example of how to delegate layout to Graphviz dot in the official GEF repository: https://github.com/eclipse/gef/blob/master/org.eclipse.gef.dot.examples/src/org/eclipse/gef/dot/examples/DotLayoutExample.java

Apart from that, the SpringLayoutAlgorithm should not place nodes on top of each other, as can be seen when running the example: https://github.com/eclipse/gef/blob/master/org.eclipse.gef.layout.examples/src/org/eclipse/gef/layout/examples/SpringLayoutExample.java

If you want to resolve your problem with SpringLayoutAlgorithm, you need to share more insights w.r.t. your data and code. It would be best to have a short, self-contained, correct (compilable) example (SSCCE).

Matthias
  • 1,005
  • 7
  • 20