Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Custom routing edges (position)
Custom routing edges (position) [message #1730074] Thu, 21 April 2016 09:28 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
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 13:30 Go to previous message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
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: Fri Apr 19 05:22:09 GMT 2024

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

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

Back to the top