1

I wrote an graphical Editor with GEF which is layouted with XYLayout. But now I have a Problem...

My GEF-Model referes to another Model (created by another perspective) I have, so the two models can differ from each other. The synchronisation form GEF-Model to second Model way is easy -> creating a new Modelelement when creating a GEF-Modelelement.

But the other way...

  1. Is there a way to auto-generate Figurepositions like in ZEST (without overlapping Elements or Connections) and have a graphical Editor that you can create more Elements? (Like Loading a Configuration)

  2. Is this auto-layouting also usable when a Editor with a Graph exists(after loading) and some Elements with Connections (the difference between the Models) should be added without overlapping Elements or Connections?

Thanks in advance

-DarkPhoenix-

1 Answers1

2

GEF does not deal with layout. It is up to YOU to handle it. You can probably plug a layout algorithm form Zest and use it to layout your diagram after a change is done on the external model.

vainolo
  • 6,907
  • 4
  • 24
  • 47
  • vainolo is correct. Also, for checking and avoiding overlapping, have a look at [hit testing](http://help.eclipse.org/juno/topic/org.eclipse.draw2d.doc.isv/guide/hittest.html). The [KIELER project](http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/KIELER+Layout) offers automated layout for GEF editors. I haven't worked with it, but it looks very promising. – s.d May 14 '13 at 15:00