Skip to main content



      Home
Home » Eclipse Projects » Sirius » Custom routing edges (position)
Custom routing edges (position) [message #1730074] Thu, 21 April 2016 05:28 Go to next message
Eclipse UserFriend
Hello,

I have a question about programmatically routing settings (location) edges


  • I use the type of edge Manhattan
  • I want to determine routing edges from where to where (position), for example, one edge:

    • vertical edge: x1 = 100, y1 = 100 => x2 = 100, y2 = 200
    • from vertical to horizontal right: x1 = 100, y1 = 200 => x2 = 200, y2 = 200
    • from horizontal to vertical down: x1 = 200, y1 = 200 => x2 = 200, y2 = 300

  • I want to determine the position and direction routing edges
  • see figure


It is possible to set this? If so, how?

Thank you very much.

Martin
Re: Custom routing edges (position) [message #1730402 is a reply to message #1730074] Mon, 25 April 2016 09:30 Go to previous message
Eclipse UserFriend
Hi,

Does this problem follows up the thread named "Programmatically create
nodes" [1]? If it is the case, you can also layout edge with
AbstractLayoutEditPartProvider.
But the layout constraint for edges in GMF metamodel is "a bit" more
complex than layout of nodes. It does not use a list of {x, y} Point but
a notion of RelativeBendpoints for the points of the edge (associated to
a source anchor and a target anchor).
It is not simple to explain, too complex to explain on this forum. You
can seach org.eclipse.gmf.runtime.notation.Edge.getBendpoints()
references in Sirius source code as strating point. But I fear this is
not enough.

[1] https://www.eclipse.org/forums/index.php/t/1076373/

regards,

--
Julien - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Adding Button on toolbar of diagram editor
Next Topic:Programmatically access to the EAttributes
Goto Forum:
  


Current Time: Mon Mar 24 10:22:13 EDT 2025

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

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

Back to the top