Skip to main content



      Home
Home » Eclipse Projects » Sirius » Cancel
icon10.gif  Cancel [message #1410018] Tue, 19 August 2014 11:23 Go to next message
Eclipse UserFriend
sorry, maybe my English is not enough good to explain my case.

[Updated on: Wed, 20 August 2014 02:52] by Moderator

Re: How to get EObject from element graphic [message #1410439 is a reply to message #1410018] Wed, 20 August 2014 15:33 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: How to get EObject from element graphic [message #1410698 is a reply to message #1410439] Thu, 21 August 2014 08:15 Go to previous message
Eclipse UserFriend
merci!
Previous Topic:Change target location for representations
Next Topic:[ANN] Sirius 1.0.1
Goto Forum:
  


Current Time: Sat Jul 12 11:13:11 EDT 2025

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

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

Back to the top