Skip to main content



      Home
Home » Eclipse Projects » Sirius » How to delete edges ?
How to delete edges ? [message #1508565] Fri, 12 December 2014 09:16 Go to next message
Eclipse UserFriend
Hi,

I have a Node object with a [0..*] relationship to other Node Object.
Creating edges works fine. I have a problem in the delete action of this edge using an "Unset".

I tried to do that :

Begin
|_ Change Context var:element
|_ Unset (Feature Name = "etapes"; Element Expression = "[elementView.oclAsType(DEdge).targetNode.oclAsType(DNode).target/]")


index.php/fa/20207/0/

But it doesn't work and i don't know how to solve it.

Anyone can help me or tell me other solution to delete my relationship?
Thanks for the attention.
  • Attachment: unset.PNG
    (Size: 6.37KB, Downloaded 630 times)

[Updated on: Fri, 12 December 2014 09:43] by Moderator

Re: How to delete edges !! [message #1514375 is a reply to message #1508565] Wed, 17 December 2014 03:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

THe change context should reference the edge source semantic element by
using the same expression you defined within the unset
"[self.sourceNode.oclAsType(DNode).target/]"

The unset "element expression" have to return a collection of elements
to unset from the feature (the edge semantic target in your case)

try with Element Expression =
"[elementView.targetNode.oclAsType(DSemanticDecorator).target/]"

On 12/12/2014 03:16 PM, Ra Cha wrote:
> Hi,
>
> I have a Node object with a [0..*] relationship to other Node Object.
> Creating edges works fine. I have a problem in the delete action of this edge using an "Unset".
>
> I tried to do that :
>
> Begin
> |_ Change Context var:element
> |_ Unset (Feature Name = "etapes"; Element Expression = "[self.sourceNode.oclAsType(DNode).target/]")
>
>
>
>
> But it doesn't work and i don't know how to solve it.
>
> Anyone can help me or tell me other solution to delete my relationship?
> Thanks for the attention.
>


Regards,

--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to delete edges !! [message #1514467 is a reply to message #1514375] Wed, 17 December 2014 05:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi Florian, thanks for your answer.

I followed your instructions but i still have the problem with the following error message :
!MESSAGE Compilation error for expression [elementView.oclAsType(DEdge).targetNode.oclAsType(DSemanticDecorator).target/] : Unrecognized variable: (DSemanticDecorator)

I tried to do that :

Begin
|_ Change Context [elementView.oclAsType(DEdge).sourceNode.oclAsType(DNode).target/]

|_ Unset (Feature Name = "etapes"; Element Expression = "[elementView.oclAsType(DEdge).targetNode.oclAsType(DSemanticDecorator).target/]")


Thank you for your help.


Re: How to delete edges !! [message #1514508 is a reply to message #1514467] Wed, 17 December 2014 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Replace DSemanticDecorator by viewpoint::DSemanticDecorator; (the
acceleo parser needs of the package in this case)

On 12/17/2014 11:16 AM, Ra Cha wrote:
> Hi Florian, thanks for your answer.
>
> I followed your instructions but i still have the problem with the
> following error message : !MESSAGE Compilation error for expression
> [elementView.oclAsType(DEdge).targetNode.oclAsType(DSemanticDecorator).target/]
> : Unrecognized variable: (DSemanticDecorator)
>
> I tried to do that :
>
> Begin
> |_ Change Context
> [elementView.oclAsType(DEdge).sourceNode.oclAsType(DNode).target/]
>
> |_ Unset (Feature Name = "etapes"; Element Expression =
> "[elementView.oclAsType(DEdge).targetNode.oclAsType(DSemanticDecorator).target/]")
>
>
>
> Thank you for your help.
>
>
>


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to delete edges !! [message #1514807 is a reply to message #1514508] Wed, 17 December 2014 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for the reply. But, i have the same error...
Re: How to delete edges !! [message #1515912 is a reply to message #1514807] Thu, 18 December 2014 08:45 Go to previous message
Eclipse UserFriend
That's strange. And if you replace DSemanticDecorator by a more concrete
type ? (DNode, DNodeList, following what is the real element behind)

On 12/17/2014 05:23 PM, Ra Cha wrote:
> Thank you for the reply. But, i have the same error...
>


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Context of content in Sirius
Next Topic:Reusing Edges with new Nodes
Goto Forum:
  


Current Time: Wed Jul 23 08:04:37 EDT 2025

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

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

Back to the top