Skip to main content



      Home
Home » Eclipse Projects » Sirius » How to let Edge end hook up to a border of a Node
How to let Edge end hook up to a border of a Node [message #1817631] Tue, 26 November 2019 22:12 Go to next message
Eclipse UserFriend
I have diagrams look like this index.php/fa/36826/0/
well, that picture looks ideal, but sometimes the layout looks like this:
index.php/fa/36827/0/
I want to make sure the end of edge connect to the left border of the node all the time, I already tried the End Centering property but that's not what I want.
thanks.
Re: How to let Edge end hook up to a border of a Node [message #1818117 is a reply to message #1817631] Fri, 06 December 2019 04:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi Qiran,


There is no direct way to achieve this with the properties of the edge mapping in the VSm editor.

One way to force this would be to provide an additional border node mapping on your white node mapping with the same domain class and aql:self as semantic candidates expression.
Then you would put a style (for example a small svg, with Autorized sides set to WEST only). You might add a CompositeFilterApplication with a MappingFilter (Collapse) to let the user collapse those nodes.
Then you will have to change your edge mapping to use this new node mapping as source and/or target.

Another way would be to provide your own set of EditPart/EditPolicy (and maybe even locator, anchor, figure..) implementation to be able to force the wanted behavior.

Regards,

[Updated on: Fri, 06 December 2019 06:13] by Moderator

Re: How to let Edge end hook up to a border of a Node [message #1818434 is a reply to message #1818117] Mon, 16 December 2019 03:28 Go to previous messageGo to next message
Eclipse UserFriend
Maxime,
"provide your own set of EditPart/EditPolicy (and maybe even locator, anchor, figure..) "
can you tell me how to achieve this? any extension point?
Re: How to let Edge end hook up to a border of a Node [message #1818452 is a reply to message #1818434] Mon, 16 December 2019 09:43 Go to previous message
Eclipse UserFriend
Hi,

Qiran Cong wrote on Mon, 16 December 2019 09:28

"provide your own set of EditPart/EditPolicy (and maybe even locator, anchor, figure..) "
can you tell me how to achieve this? any extension point?


The extension point to use is GMF's editPartProvider mechanism. You can find a relatively simple example in Ecore Tools:
* https://github.com/pcdavid/org.eclipse.emf.ecoretools/blob/master/org.eclipse.emf.ecoretools.design.ui/plugin.xml#L6
* https://github.com/pcdavid/org.eclipse.emf.ecoretools/blob/master/org.eclipse.emf.ecoretools.design.ui/src/org/eclipse/emf/ecoretools/design/ui/parts/EcoreToolsSpecificEditPartProvider.java

The basic idea is to override the EditPart implementation of your specific elements (and only them!) with alternative implementations, that override the ones from Sirius (that would be used otherwise). Once you control the EditPart class used, you can install different edit policies on it, create diffferent Draw2D figures, etc.

Regards,
Pierre-Charles
Previous Topic:How to get Object of Navigation tool dialog
Next Topic:Properties fields in Diagram Description
Goto Forum:
  


Current Time: Sun Jul 20 18:24:36 EDT 2025

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

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

Back to the top