|
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 |
|
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 #1818452 is a reply to message #1818434] |
Mon, 16 December 2019 14:43 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03586 seconds