|When delete edge [message #1768950]
||Tue, 25 July 2017 07:53
| eunjung park
Registered: April 2015
I want to use 'Delete element' when delete edge.
The attachment is meta model and odesign file.
What I want to do is when I delete Make relationship (i.e., ++ relationship),
the value of Problem2's parent attribute be unset by Problem1.
I used 'Delete element' and set the following.
In Change Context, browse expression - var:element
In Unset, Feature Name - parent
Element Expression - [elementView.oclAsType(DEdge).targetNode.oclAsType(DSemanticDecorator).target/]
The problem is when I delete edge, it doesn't work.
Even, I cannot delete Make relationship.
How can I solve this problem.
Please help me.
Thank you so much.
[Updated on: Tue, 25 July 2017 08:02]
Report message to a moderator
|Re: When delete edge [message #1768983 is a reply to message #1768950]
||Tue, 25 July 2017 12:19
|| Steve Monnier
Registered: May 2011
If I understood correctly the confusion here is between org.eclipse.sirius.viewpoint.DSemanticDecorator.getTarget() and org.eclipse.sirius.diagram.DEdge.getTargetNode().
- DSemanticDecorator.getTarget() represents the reference between a graphical element (DNode, DNodeContainer, DEdge) and a semantic element.
- DEdge.getTargetNode() represents the reference between an edge and the target Node.
However, in your case using DEdge.getTargetNode() would work only if your diagram is unsynchronized. What your delete tool should unset, is not the graphical element, but the semantic element. Therefore, you should not use the elementView, but the element variable and then unset the reference you are looking for (targetBusinessConcept?).
Steve Monnier - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.02208 seconds