Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Get selected element in a diagram/table
Get selected element in a diagram/table [message #1695832] Tue, 19 May 2015 15:40 Go to next message
Julien Delange is currently offline Julien DelangeFriend
Messages: 82
Registered: October 2011
Member
Hello,

I would like to add an element to an element in the diagram. So, I would then need to find the selected element in the diagram and change the context with it. How is it possible to find the selected element in the diagram so that I can change the context with it? Also, is there a way to do it also for a table? How can I get the selected element in a table?

Thanks

[Updated on: Tue, 19 May 2015 16:47]

Report message to a moderator

Re: Get selected element in a diagram [message #1695837 is a reply to message #1695832] Tue, 19 May 2015 16:59 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 501
Registered: May 2011
Senior Member
Hello,

If you want to add an element B to an element A on a diagram, you will
need a node creation tool [1] or a container creation tool[2], depending
on the mapping element to add. Both of these tools provide the variable
"container" that refers to the semantic element you selected (therefore
element A). The expression in your "Change Context" operation will be
"[container/]" or "var:container".

Regards,
Steve

[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#node_tools
[2]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#container_tools

Le 19/05/2015 17:40, Julien Delange a écrit :
> Hello,
>
> I would like to add an element to an element in the diagram. So, I would
> then need to find the selected element in the diagram and change the
> context with it. How is it possible to find the selected element in the
> diagram so that I can change the context with it?
>
> Thanks


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Get selected element in a diagram [message #1695841 is a reply to message #1695837] Tue, 19 May 2015 17:18 Go to previous message
Julien Delange is currently offline Julien DelangeFriend
Messages: 82
Registered: October 2011
Member
Indeed, pretty straightforward! Thanks a lot!
Previous Topic:Can we Modify the domain model DSL dynamically with sirius ?!
Next Topic:Filter elements according to an attribute
Goto Forum:
  


Current Time: Wed Jan 20 04:16:25 GMT 2021

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

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

Back to the top