URGENT: Edge delete on Element deletion [message #1770042] |
Mon, 07 August 2017 17:29 |
sonny selhorst Messages: 60 Registered: May 2015 |
Member |
|
|
Dear,
In my metamodel, I have an Entity, Role and BinaryRelationship class. All these are connected so that in my diagram, I can create two entities and create a BinaryRelationship between these. Now, when I delete the entity container, the relationship edge is deleted from the diagram, but not from the model.
I have tried working with a delete tool and then having a remove with a "change context: aql:self.eInverse().binaryrelationship" upon which another remove is performed, as I thought that that would be the solution, but nothing seems to be working. I have tried quite some statements in the change context.
Any help would be greatly appreciated.
Kind regards,
Sonny Selhorst
[Updated on: Sun, 13 August 2017 13:26] Report message to a moderator
|
|
|
|
|
Re: Edge delete on Element deletion [message #1770219 is a reply to message #1770154] |
Wed, 09 August 2017 07:37 |
|
If a source or a target figure is deleted, the edge is no more visible even if the semantic element on which it relies on is still there. It is the responsibility of your delete tool to let the model in a consistent state. So if a source (semantic) is deleted, you have to clean (in the same delete tool) all impacted model elements.
Regards,
Florian
|
|
|
|
|
|
|
Re: Edge delete on Element deletion [message #1770563 is a reply to message #1770561] |
Mon, 14 August 2017 13:22 |
Pierre Guilet Messages: 250 Registered: June 2017 |
Senior Member |
|
|
your expression returns all semantic elements of all incoming edges. Remove applies on one element not on a list. So you should have a for loop with aql:self as expression and the remove inside.
Anyway your approach seems not the best to me because you take all edges even some that can not be the one you want if you add or already have different edges mappings pointing on entities. Generally we prefer cross the semantic model from element.
You also can use the sirius interpreter on your model opened with default ecore editor.
For the documentation part, the interpreter is described in https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#general
But it could have its own title I agree.
For the tutorial part, yes it could also be good to have it inside. I will spread the word. Thanks for feedback
Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
[Updated on: Mon, 14 August 2017 13:50] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02923 seconds