Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Adding bendpoints as part of Arrange All
Adding bendpoints as part of Arrange All [message #990886] Fri, 14 December 2012 16:26
Stephen Slaboda is currently offline Stephen SlabodaFriend
Messages: 8
Registered: November 2012
Junior Member
Hi all,

I currently have an AbstractLayoutNodeProvider that implements the arrangement of my elements on the GMF diagram. However, since I have several connections between several of the elements, I would like to programmatically add bendpoints to the connections to avoid them crossing over the layed out elements. What is the correct way to do this from within the arrange all command?

The math and arrangement logic isn't what I'm concerned about - I haven't figured out how to submit an appropriate command or use an appropriate editing domain to accomplish the addition of the bendpoint to the Edge.

A minor complication: When a new diagram of my type is created, elements are added to the model and I perform an arrange all command in the XYZDiagramEditorUtil.openDiagram method if the diagram has just been created (checked courtesy of a boolean value set from within the XYZDiagramEditorUtil.createDiagram method), but not when a diagram that already exists is opened.

Is there a better way to provide both the functionality to arrange all in an existing diagram, and to perform the same arrangement logic upon diagram creation?

I do think I understand how to add bendpoints (get the points from the edge and insert a new RelativeBendpoint), but any concrete examples of that would be appreciated, especially since it was difficult for me to find an example online at all.

Previous Topic:Default value of node attribute
Next Topic:separate property box while double clicking the node
Goto Forum:

Current Time: Mon Mar 30 20:39:09 GMT 2020

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

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

Back to the top