Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » GraphitiInternal.getEmfService()
GraphitiInternal.getEmfService() [message #958824] Fri, 26 October 2012 08:40 Go to next message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
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 11:00 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1603
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 11:05 Go to previous messageGo to next message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
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 15:35 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1603
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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: Tue Sep 30 23:59:19 GMT 2014

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

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