|
Re: Problem with Edge Creation Description [message #1300332 is a reply to message #1300294] |
Thu, 17 April 2014 13:54 |
|
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 #1301511 is a reply to message #1300730] |
Fri, 18 April 2014 06:18 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04832 seconds