Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Model operation for adding reference
Model operation for adding reference [message #1403536] Thu, 24 July 2014 10:13 Go to next message
Arunkumar Ramaswamy is currently offline Arunkumar RamaswamyFriend
Messages: 57
Registered: April 2014
Member
In the model operation, I did not see any function to add reference to the model element.

For example
model element A have a reference to model element B

I created element A using tool and used the model operation SET to set its featuere 'name' accordingly.
But what operation should i use to add the reference to B.

Any help much appreciated

Arun
Re: Model operation for adding reference [message #1403544 is a reply to message #1403536] Thu, 24 July 2014 10:32 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 508
Registered: May 2011
Senior Member
Hello,

To display a reference on your diagram you will need an edge mapping
using the mapping you created to represent your model element A and B as
source/target. See Documentation "Sirius Specifier
Manual/Diagrams/Layers and Graphical Elements/Edges" for futher details
on Edge Mappings. You can also check into the tutorial part
https://wiki.eclipse.org/Sirius/Tutorials/4MinTutorial#Add_a_Relation_Based_Edge.
Then, to be able to add a reference from model element A to model
element B, you will need to add an "Edge Creation" tool referencing your
"Edge Mapping". See Documentation "Sirius Specifier
Manual/Diagrams/Layers and Graphical Elements/Edges/Edge Tools" for
futher details on Edge Mappings.


Le 24/07/2014 12:13, Arunkumar Ramaswamy a écrit :
> In the model operation, I did not see any function to add reference to
> the model element.
>
> For example
> model element A have a reference to model element B
>
> I created element A using tool and used the model operation SET to set
> its featuere 'name' accordingly.
> But what operation should i use to add the reference to B.
>
> Any help much appreciated
>
> Arun


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Model operation for adding reference [message #1403548 is a reply to message #1403536] Thu, 24 July 2014 10:43 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 503
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

Le 24/07/2014 12:13, Arunkumar Ramaswamy a écrit :
> In the model operation, I did not see any function to add reference to
> the model element.
>
> For example
> model element A have a reference to model element B
>
> I created element A using tool and used the model operation SET to set
> its featuere 'name' accordingly.
> But what operation should i use to add the reference to B.

You can use a Set operation too, in the reference, you just enter the
name of the EReference in your meta-model. Then in the value expession,
you put an expression whose result is B, for example var:target, if you
are in a tool which defined a varable named target which is your B.

>
> Any help much appreciated
>
> Arun


Regards

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Model operation for adding reference [message #1403559 is a reply to message #1403548] Thu, 24 July 2014 11:57 Go to previous message
Arunkumar Ramaswamy is currently offline Arunkumar RamaswamyFriend
Messages: 57
Registered: April 2014
Member
Thanks Maxime and Steve.
It worked!
Previous Topic:Creating some part of models textually
Next Topic:preTarget variable not available in Connection Complete Precondition
Goto Forum:
  


Current Time: Fri Apr 16 12:09:30 GMT 2021

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

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

Back to the top