Skip to main content



      Home
Home » Modeling » Graphiti » Accessing eRessource or Diagram(Is there an API to get the eResource or "Diagram" object of an open Diagram?)
Accessing eRessource or Diagram [message #780916] Thu, 19 January 2012 17:22 Go to next message
Eclipse UserFriend
Hello together,

I need to access the business objects of an open diagram. When I do this with a selection listener and select an object within the graphiti editor it works nice. However, now I need to do this without selecting something.

I have a simple model with "Processes" and "Flows"

I want to iterate through all "Processes" I modeled with the Graphiti editor. I think I need the eRessource the diagram is using to do this -> resource.getAllContents()

So I simple need the "Diagram" object, or eResource of the open diagram, or at least the DiagramTypeProvider of the open diagram.

By using the Graphiti interface I could only access LayoutService, GaCreateService ... PeService. Non of them delivers the above mentioned objects (Diagram, DiagramTypeProvider, eResource).

Is there a Graphiti API to access them? Or another way to get access to the instantiated objects of my model the graphiti editor has created?

Thanks in advance.

Best regards

Bjoern

[Updated on: Thu, 19 January 2012 17:23] by Moderator

Re: Accessing eRessource or Diagram [message #781187 is a reply to message #780916] Fri, 20 January 2012 03:36 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

it's not really an API (we get one in Graphiti 0.9.0) but you can cast the
active editor to DiagramEditor and call
getDiagramTypeProvider().getDiagram().

Michael
Re: Accessing eRessource or Diagram [message #782346 is a reply to message #781187] Mon, 23 January 2012 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Thanks a lot Michael, that worked well. What about the roadmap of 0.9? When it is planned to be released? Next months, half a year or year?

Best Björn
Re: Accessing eRessource or Diagram [message #783209 is a reply to message #782346] Wed, 25 January 2012 04:41 Go to previous message
Eclipse UserFriend
0.9 will be released as part of the Juno release train, so in June.

Michael
Previous Topic:resizing elements nested in rectangle
Next Topic:image creation without opening an editor possible?
Goto Forum:
  


Current Time: Wed Jul 23 10:34:09 EDT 2025

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

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

Back to the top