Custom routing edges (position) [message #1730074] |
Thu, 21 April 2016 05:28  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02617 seconds