Community
Participate
Working Groups
I found that on Eclipse 3.1.1 and 3.2M5a popupMenus do not show menus created via the popupMenus extension via an objectContribution unless a menu action was first placed in the menu manager via code. I did not test this on any other OS. If I create a popupMenu in a View like this: MenuManager contextMenuMgr = new MenuManager("#PopupMenu"); Action action = new Action() { public void run() { ; } }; action.setText("Why does this have to be here to see other menus?"); // contextMenuMgr.add(action); contextMenuMgr.add( new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); Menu menu = contextMenuMgr.createContextMenu( this.treeViewer.getControl()); this.treeViewer.getControl().setMenu(menu); this.getSite().registerContextMenu(contextMenuMgr, this.treeViewer); And have plugin.xml like this: <extension point="org.eclipse.ui.popupMenus"> <objectContribution id="com.xyz.C1" objectClass="java.lang.String"> <menu id="com.xyz.xyzMenu" label="Menu" path="additions"> <separator name="group1"/> </menu> <action class="com.xyz.action.NewAction" id="com.xyz.actions.menuAction" label="Action in Menu" menubarPath="com.xyz.xyzMenu/group1"/> <action class="com.xyz.action.NewAction" id="com.xyz.actions.additionAction" label="Action in Additions" menubarPath="additions"/> </objectContribution> </extension> I will not see the menu lableled 'Menu' and thus be missing the action labeled 'Action in Menu'. But I will see the action labeled 'Action in Additions'. However if I uncomment the line in the above code contextMenuMgr.add(action); I will see the menu, it's action and the other action.
Is this a dupe of 130425 (which is a dupe of 128293)? *** This bug has been marked as a duplicate of 128293 ***
Yes it is a dup, sorry about that. I clicked something in the browser window left open from the original bug submission and accidently/stupidly answered "OK" to the "REPOST INFO" browser dialog. Anyway, I'll test the build of I20060314-0800. thanks