Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Problem with Edge Creation Description
Problem with Edge Creation Description [message #1300294] Thu, 17 April 2014 13:21 Go to next message
Marc Z is currently offline Marc ZFriend
Messages: 20
Registered: July 2012
Junior Member
Hi all,

I have a problem using 'Edge Creation Description'.
I have an ecore model in which the relation between an element A and an element b is realized by an element called 'Connection'. Moreover, all instances of A, B & Connection are included in an ecore element called 'Model'. All connections should be contained in the connections Attribute of the Model element.
However, when I try to implement an 'Edge Creation Description' and using 'Create Instance' to create a Connection element in order to create a relationship between an instance of A and B, I always get the following exception:
org.eclipse.sirius.ecore.extender.business.api.accessor.exception.FeatureNotFoundException: connections on myModel.impl.AImpl@...

Does anyone know what I am doing wrong and how to realize teh edge creation in this case properly?

Thank you!

Regards,

Marc
Re: Problem with Edge Creation Description [message #1300332 is a reply to message #1300294] Thu, 17 April 2014 13:54 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 503
Registered: July 2009
Location: Nantes, France
Senior Member
Le 17/04/2014 15:21, Marc Z a écrit :
> Hi all,

Hi Marc

>
> I have a problem using 'Edge Creation Description'.
> I have an ecore model in which the relation between an element A and an
> element b is realized by an element called 'Connection'. Moreover, all
> instances of A, B & Connection are included in an ecore element called
> 'Model'. All connections should be contained in the connections
> Attribute of the Model element.
> However, when I try to implement an 'Edge Creation Description' and
> using 'Create Instance' to create a Connection element in order to
> create a relationship between an instance of A and B, I always get the
> following exception:
> org.eclipse.sirius.ecore.extender.business.api.accessor.exception.FeatureNotFoundException:
> connections on mailto:myModel.impl.AImpl@...
>
> Does anyone know what I am doing wrong and how to realize teh edge
> creation in this case properly?

I think you have to add a Change Context operation before the Create
Instance, the expression will alows you change the context to your Model
element and then the connections feature should be found.

If you directly add the CreateInstance a child of the inital operation
node, note that the context is the semantic source (the semantic element
of the your first click). The EdgeCreationTool have the same behavior
for Relation based edge mappings and Element based edge mappings.
>
> Thank you!
>
> Regards,
>
> Marc
>

Regards,

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Problem with Edge Creation Description [message #1300730 is a reply to message #1300332] Thu, 17 April 2014 19:43 Go to previous messageGo to next message
Marc Z is currently offline Marc ZFriend
Messages: 20
Registered: July 2012
Junior Member
Daer Maxime,

thank you for the quick reply!

If I add a Change Context operation (as I do for in for a Node Creation Description with 'var:container' as Browse Expression), I get the same effect.

Do I have to use a different Browse Expression? I already tried different expression but i always get the same exception.

Regards,
Marc
Re: Problem with Edge Creation Description [message #1301511 is a reply to message #1300730] Fri, 18 April 2014 06:18 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 503
Registered: July 2009
Location: Nantes, France
Senior Member
Le 17/04/2014 21:43, Marc Z a écrit :
> Daer Maxime,
>
> thank you for the quick reply!
>
> If I add a Change Context operation (as I do for in for a Node Creation
> Description with 'var:container' as Browse Expression), I get the same
> effect.

container is not an available variable for the operations in an Edge
Creation Description. In your VSM, the available variables for operatin
of a tool are shown as children of the tool. For other interpreted
expressions, they should be shown by the auto-completion.

>
> Do I have to use a different Browse Expression? I already tried
> different expression but i always get the same exception.

You have to set an expression allwing you to retrieve your Model
element. You have access to (if you do not have renamed the variables):
. sourceView: the first clicked graphical element
. source: the corresponding semantic element
. targetView: the second clicked graphical element
. target: the corresponding semantic element

I think [source.eContainer(Model)/] should work.
>
> Regards,
> Marc
>

Regards

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Problem with Edge Creation Description [message #1301756 is a reply to message #1301511] Fri, 18 April 2014 09:32 Go to previous message
Marc Z is currently offline Marc ZFriend
Messages: 20
Registered: July 2012
Junior Member
Dear Maxime,

thank you! Works great!

Regards,

Marc
Previous Topic:Navigation operation on doubleclick
Next Topic:Chat for collaborative modeling
Goto Forum:
  


Current Time: Thu Apr 15 12:11:33 GMT 2021

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

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

Back to the top