|
Re: Diagram Coordinates [message #1702476 is a reply to message #1702473] |
Wed, 22 July 2015 15:20 |
|
Hello,
You have the helper
org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper that provides
services you are looking for. Note that this is used with GMF diagram
element. If in your context you have Sirius diagram elements, you will
need to use
org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper.getGMFNode(DDiagramElement)
first.
Regards,
Steve
Le 22/07/2015 17:00, Tiago Jorge a écrit :
> Hi!
>
> I would like to know how can I get the coordinates for each diagram
> element. I suppose they are stored in the representation file (.aird),
> but I was wondering what is the best approach to retrieve and process
> this information. Of course, by doing this I still want to be able to
> associate the coordinates with the semantic element from the model.
>
> Kind regards
>
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Diagram Coordinates [message #1702595 is a reply to message #1702579] |
Thu, 23 July 2015 12:54 |
|
Hello,
That really depends on the context of the process that need to get the
coordinates. For exemple, if it is a java service that is called at the
execution of a Sirius tool, you already have the DDiagramElement as a
variable. Can you describe what you are doing that requires having
diagram elements coordinates?
Regards,
Steve
Le 23/07/2015 13:48, Tiago Jorge a écrit :
> Hello,
>
> Thank you for the quick response.
>
> I went for the Sirius Javadoc, but having some problems in generating it
> properly and still have to get used to it.
> Meanwhile, as far as I can see, in order to retrieve the
> DDiagramElements in the first place, I imagine I should somehow load the
> .aird file, get the DView, then the DRepresentation (as DDiagram) and
> then invoke getOwnedDiagramElements, right?
>
> Cheers
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.02752 seconds