Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » DiagramGlobalActionHandlerProvider not found using contributionItemProvider
DiagramGlobalActionHandlerProvider not found using contributionItemProvider [message #168851] Sat, 19 January 2008 11:30 Go to next message
Eclipse UserFriend
Originally posted by: cwu.informatik.uni-kiel.de

I've extended org.eclipse.ui.editorActions to contribute an
Action(Delegate) to a specific GMF generated DiagramEditor using it's ID
as targetID.

I would like to contribute it to to all diagram editors and read that
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
could help me in this case.
Using the extension point contributionItemProviders I don't have to
specify an ID of an editor, the action can be contributed to all
IEditorParts implementing IDiagramWorkbenchPart.
The problem is, I'm getting three ClassNotFoundExceptions, even if I put
the plug-ins containing those classes into dependencies and run
configuration:


!ENTRY org.eclipse.gmf.runtime.common.core 4 5 2008-01-18 12:46:52.375
!MESSAGE The service provider
org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalAc tionHandlerProvider
could not be activated.
!STACK 0
java.lang.ClassNotFoundException:
org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalAc tionHandlerProvider

Same for:
org.eclipse.gmf.runtime.diagram.ui.render.providers.DiagramU IRenderGlobalActionHandlerProvider
org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.D iagramIDEGlobalActionHandlerProvider

Any ideas?

My entry in the plugin.xml:

<extension

point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<contributionItemProvider
checkPluginLoaded="false"
class="edu.unikiel.rtsys.gmf.caaa.ContributionItemProvider" >
<Priority
name="Lowest">
</Priority>
<partContribution

class=" org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPa rt ">
<partAction
global="true"
id="caaaAction"
menubarPath="/diagramMenu/arrangeMenu/arrangeGroup"
toolbarPath="selectMenu">
</partAction>
</partContribution>
</contributionItemProvider>
</extension>

My ContributionItemProvider:

public class ContributionItemProvider extends
AbstractContributionItemProvider {

public ContributionItemProvider() {
// reading this always
System.out.println("creating ContributionItemProvider");
}

protected IAction createAction(String actionId,
IWorkbenchPartDescriptor partDescriptor) {
// reading this only, if the action is declared global
System.out.println("actionId: " + actionId);

if ("caaaAction".equals(actionId)) {
return new AutoArrangeAllAction(partDescriptor.getPartPage());
}
return null;
}
// tried to "cache" class loading, doesn't work...
DiagramGlobalActionHandlerProvider a;
DiagramUIRenderGlobalActionHandlerProvider b;
DiagramIDEGlobalActionHandlerProvider c;
}
Re: DiagramGlobalActionHandlerProvider not found using contributionItemProvider [message #723139 is a reply to message #168851] Wed, 07 September 2011 18:30 Go to previous message
Andrey Skorikov is currently offline Andrey SkorikovFriend
Messages: 8
Registered: September 2011
Junior Member
I had the same problem.
However, after adding a plug-in dependency on "org.eclipse.gmf.runtime.diagram.ui.providers.ide" the exceptions were gone.
Previous Topic:One Node for all Unknown Elements
Next Topic:Creating Custom Palette and Exporting it into a plugin
Goto Forum:
  


Current Time: Sun Feb 28 14:11:10 GMT 2021

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

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

Back to the top