Skip to main content



      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 11:40 Go to next message
Eclipse UserFriend
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 12:47] by Moderator

Re: Get selected element in a diagram [message #1695837 is a reply to message #1695832] Tue, 19 May 2015 12:59 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Get selected element in a diagram [message #1695841 is a reply to message #1695837] Tue, 19 May 2015 13:18 Go to previous message
Eclipse UserFriend
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: Sat May 24 09:53:32 EDT 2025

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

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

Back to the top