DiagramGlobalActionHandlerProvider not found using contributionItemProvider [message #168851] |
Sat, 19 January 2008 06:30  |
Eclipse User |
|
|
|
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;
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.02807 seconds