[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Removing popUpMenus from CNF.

Hello all,

I have been partially successful at removing almost all the popUp
menus from the Commons Navigator Framework simply by configuring the
plugin.xml file.
There are 2 menus that refuse to go: group.edit and group.reorganize.
My plugin.xml config looks like this:

<extension
          point="org.eclipse.ui.navigator.viewer">
       <viewer
             viewerId="org.eclipse.ui.example.navigator.view">
             <popupMenu allowsPlatformContributions="false">
                <insertionPoint
                    name="group.edit" />

                <insertionPoint
                    name="group.reorganize" />
             </popupMenu>
       </viewer>
       <viewerContentBinding
             viewerId="org.eclipse.ui.thermo.navigator.view">
          <includes>
             <contentExtension
                   pattern="org.eclipse.ui.navigator.resourceContent"/>
          </includes>
       </viewerContentBinding>
</extension>

Setting the allowsPlatformContribution to false DOES stop
contributions to be added to the context menu Except for group.edit
and group.reorganize... this is starting to look like a bug to me.

The obvious solution is to remove the insertion points from my
<popUpMenu> but without them the application throws an exception:

Throwable: java.lang.IllegalArgumentException: Group not found: group.edit

java.lang.IllegalArgumentException: Group not found: group.edit
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.EditActionGroup.fillContextMenu(EditActionGroup.java:74)
at org.eclipse.ui.internal.navigator.resources.actions.EditActionProvider.fillContextMenu(EditActionProvider.java:50)
at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:205)
at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:172)
at org.eclipse.ui.internal.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:258)
at org.eclipse.ui.internal.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:273)
at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:335)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:463)
at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:459)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:485)

It throws  the same exception for the reorganize group.

Thoughts?

J