Skip to main content



      Home
Home » Modeling » Graphiti » GraphitiInternal.getEmfService()
GraphitiInternal.getEmfService() [message #958824] Fri, 26 October 2012 04:40 Go to next message
Eclipse UserFriend
I want to get the DiagramTypeProvider for a diagram. After some searching I found that the EmfService has a method called getDTPForDiagram(Diagram), exactly what I need.
However, to access this EmfService I have to go to the class GraphitiInternal. Of course I get a "discouraged access" warning. Is there a reason for making this class internal?

Jos

Watch out: EmfService implements the IEmfService interface, but there are two IEmfService interfaces. One in the internal package, and one in the visible ui package.
Re: GraphitiInternal.getEmfService() [message #958975 is a reply to message #958824] Fri, 26 October 2012 07:00 Go to previous messageGo to next message
Eclipse UserFriend
Jos,

if you have access to the feature provider you can get the
DiagramTypeProvider from it, also the DiagramEditor offers a method to get
it. Does that help in you scenario?

There are 2 EMFServices in Graphiti, of which only one is for external
usages. This is done on purpose, as the methods in the internal one should
be used only in very defined situations.

Michael
Re: GraphitiInternal.getEmfService() [message #958981 is a reply to message #958975] Fri, 26 October 2012 07:05 Go to previous messageGo to next message
Eclipse UserFriend
Michael,

It might help if I can get the feature provider based on the diagram. I did not find such a service yet. Is there a way to achieve this?

Jos
Re: GraphitiInternal.getEmfService() [message #963119 is a reply to message #958981] Mon, 29 October 2012 11:35 Go to previous message
Eclipse UserFriend
Jos,

hm, not directly getting, but creating is possible:
org.eclipse.graphiti.ui.services.GraphitiUI.getExtensionManager().createFeatureProvider(Diagram
diagram);

Michael
Previous Topic:Change mouse pointer on hover over
Next Topic:Testing Graphiti editor
Goto Forum:
  


Current Time: Fri Jul 25 20:56:24 EDT 2025

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

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

Back to the top