Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Wed, 27 November 2019 03:12 Go to next message
Qiran Cong is currently offline Qiran CongFriend
Messages: 26
Registered: November 2019
Junior Member
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 09:11 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

[Updated on: Fri, 06 December 2019 11:13]

Report message to a 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 08:28 Go to previous messageGo to next message
Qiran Cong is currently offline Qiran CongFriend
Messages: 26
Registered: November 2019
Junior Member
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 14:43 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
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


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:How to get Object of Navigation tool dialog
Next Topic:Properties fields in Diagram Description
Goto Forum:
  


Current Time: Thu Apr 25 10:58:56 GMT 2024

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

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

Back to the top