Delete/Recconect Edge when there are multiple edges [message #1717180] |
Thu, 10 December 2015 09:34  |
Eclipse User |
|
|
|
Hello,
I am trying to delete or reconnect edge starting from a Node with multiple Edges. In fact, the class represented by the Node contains a list of objects of other class, which are represented as another type of Node in the diagram. So, the edge is showing which objects the list contains. For example when I try to delete particular Edge, I need to delete the object from the list, which this Edge is pointing to, but I don't know how to do that. For example, if the list is named listA, and create operation unset with a Feature Name listA, how can I select the current object in the Element Expression field. I tried with listA->last(), but of course it deletes only the last element in the list.
|
|
|
Re: Delete/Recconect Edge when there are multiple edges [message #1717490 is a reply to message #1717180] |
Mon, 14 December 2015 06:07  |
Eclipse User |
|
|
|
Hello,
In a reconnect tool you can retrieve the old pointed element by using
the "source" variable (see "Help Contents > Sirius > Sirius Specifier
Manual > Diagrams > Tools > Reconnect Edge" for more details).
In the delete tool you can also retrieve the old edge target from the
variable "elementView" which contains the DEdge.
Example with a java service:
public EObject getEdgeTargetSemantic(EObject any, DEdge view) {
return ((DSemanticDecorator) view.getTargetNode()).getTarget();
}
the parameter view is the "elementView" content.
Regards,
Florian
On 12/10/2015 03:34 PM, Vladimir Ilievski wrote:
> Hello,
>
> I am trying to delete or reconnect edge starting from a Node with
> multiple Edges. In fact, the class represented by the Node contains a
> list of objects of other class, which are represented as another type of
> Node in the diagram. So, the edge is showing which objects the list
> contains. For example when I try to delete particular Edge, I need to
> delete the object from the list, which this Edge is pointing to, but I
> don't know how to do that. For example, if the list is named listA, and
> create operation unset with a Feature Name listA, how can I select the
> current object in the Element Expression field. I tried with
> listA->last(), but of course it deletes only the last element in the list.
--
Florian - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03797 seconds