Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Cancel
icon10.gif  Cancel [message #1410018] Tue, 19 August 2014 15:23 Go to next message
Dat Nguyen is currently offline Dat NguyenFriend
Messages: 34
Registered: July 2014
Member
sorry, maybe my English is not enough good to explain my case.

[Updated on: Wed, 20 August 2014 06:52]

Report message to a moderator

Re: How to get EObject from element graphic [message #1410439 is a reply to message #1410018] Wed, 20 August 2014 19:33 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 538
Registered: July 2009
Senior Member
Le 19/08/2014 17:23, Dat Nguyen a écrit :
> Hi, i'm newbie. I have a question.

Hi.

> when i select a element in Sirius diagram, it return a instance of
> DDiagram, but i want to get instances of EObject. Is there any ways to
> get EObject from selection in Sirius Diagram?

All Sirius model elements which represent a semantic/domain element
implement the org.eclipse.sirius.viewpoint.DSemanticDecorator interface,
which provides the getTarget() method (actually an EMF EReference) to
access the underlying EObject.

This is the case for:
* all "top-level" representations (diagrams, which in practice are
instances of DSemanticDiagram that inherit from DDiagram; tables,
instances of DTable; and trees, instances of DTree);
* all the individual elements (DRepresentationElement) inside these
representations: DNodes/DContainer/DEdges/etc. in diagrams,
DLine/DColumn in tables, and DTreeItem in tree representations.
DRepresentationElement also provides getSemanticElements() to access the
"secondary" associated semantic elements, if any (the ones specified via
"Associated Elements Expressions" in the mapping definitions).

--
Pierre-Charles David - Obeo

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


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to get EObject from element graphic [message #1410698 is a reply to message #1410439] Thu, 21 August 2014 12:15 Go to previous message
Dat Nguyen is currently offline Dat NguyenFriend
Messages: 34
Registered: July 2014
Member
merci!
Previous Topic:Change target location for representations
Next Topic:[ANN] Sirius 1.0.1
Goto Forum:
  


Current Time: Sat Aug 15 12:37:57 GMT 2020

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

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

Back to the top