Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to delete edges ?
How to delete edges ? [message #1508565] Fri, 12 December 2014 14:16 Go to next message
Ra Cha is currently offline Ra ChaFriend
Messages: 6
Registered: October 2014
Junior Member
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 425 times)

[Updated on: Fri, 12 December 2014 14:43]

Report message to a moderator

Re: How to delete edges !! [message #1514375 is a reply to message #1508565] Wed, 17 December 2014 08:44 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 10:16 Go to previous messageGo to next message
Ra Cha is currently offline Ra ChaFriend
Messages: 6
Registered: October 2014
Junior Member
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 10:58 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 16:23 Go to previous messageGo to next message
Ra Cha is currently offline Ra ChaFriend
Messages: 6
Registered: October 2014
Junior Member
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 13:45 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 Apr 01 18:50:02 GMT 2020

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

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

Back to the top