CommonNavigator context menu issue [message #707429] |
Mon, 01 August 2011 16:38 |
i82orbom Messages: 2 Registered: August 2011 |
Junior Member |
|
|
Hi there, I am developing a rcp, and I have some problems with Project Explorer (CommonNavigator).
I have a view which corresponds to a CommonNavigator, its class associated is: org.eclipse.ui.navigator.CommonNavigator, when I've created the view, a point extension is added to the list, as the capture: h t tp: //i. imgur. com /bGfy6.png (sorry i haven't enough messages)
Well at this point, I've noticed that the contextual menu in the explorer, have items that i don't need. I have modified my plugin.xml as this:
</extension>
<extension
point="org.eclipse.ui.navigator.viewer">
<viewer
viewerId="predatagui.navigator.ProjectNavigator">
<popupMenu>
allowPlatformContributions="false"
<insertionPoint
name="group.new"
separator="true">
</insertionPoint>
<insertionPoint
name="group.port"
separator="true">
</insertionPoint>
<insertionPoint
name="group.edit"
separator="true">
</insertionPoint>
<insertionPoint
name="group.reorganize"
separator="true">
</insertionPoint>
</popupMenu>
</viewer> [......]
I want only these groups, with the default actions. But groups that are not defined, is a problem, because since the application try to add actions to these groups, many exceptions are thrown.
java.lang.IllegalArgumentException: Group not found: group.build
at org.eclipse.jface.action.ContributionManager.addToGroup(ContributionManager.java:131)
at org.eclipse.jface.action.ContributionManager.appendToGroup(ContributionManager.java:138)
at org.eclipse.ui.internal.navigator.resources.actions.ResourceMgmtActionProvider.fillContextMenu(ResourceMgmtActionProvider.java:157)
at org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:216)
at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:173)
at org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:260)
at org.eclipse.ui.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:275)
Also, in that contextual menu, I have options like Run As, Debug As, Team, etc..., but when i pass the mouse over it, the next time that the contextual menu is opened, they disappear.
So, my two questions are:
1. How to get rid of exceptions
2. How to get rid about the options last discussed (run as, debug as....)
Thank you in advance!
[Updated on: Mon, 01 August 2011 16:39] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03477 seconds