Community
Participate
Working Groups
WorkbenchActionBarContributor.contributeToMenu performs the following operations (see below). First of all, is the contribution to "Emf Parsley" menu intentional (I mean, do we want such a menu)? If it is intentional, then it does not work as expected: if you open a Parsley editor, the menu does not appear until another view or editor is selected. @Override public void contributeToMenu(IMenuManager menuManager) { IMenuManager submenuManager = new MenuManager("Emf Parsley", "org.eclipse.emf.parsley.MenuID"); menuManager.insertAfter("additions", submenuManager); submenuManager.add(new Separator("settings")); submenuManager.add(new Separator("actions")); submenuManager.add(new Separator("additions")); submenuManager.add(new Separator("additions-end")); emfActionManager.contributeToMenu(submenuManager); submenuManager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager menuManager) { menuManager.updateAll(true); } }); addGlobalActions(submenuManager); }
Can it be due to the fact that upon first invocation there's no selected object and thus the menu would be empty?
Yes, it could be the answer. In any case I don't think it's intentional, and probably we can remove this part of code.
OK, for the moment I commented that out... it would be nice to contribute to the Edit menu though :) On the branch 'menus' I'm heavily refactoring all that stuff, see, e.g., https://git.eclipse.org/r/#/c/35216/, in particular everything is delegated to the EditingMenuBuilder which is intended to be polymorphically customized.