IMenuService menuService = (IMenuService) getSite().getService(IMenuService.class);
menuManager = new MenuManager();
menuService.populateContributionManager(menuManager, "popup:testview");
menuManager.createContextMenu(composite);
menuManager.update(true);
control.setMenu(menuManager.getMenu());
upper code let other plugins can contribute some menu items on specific control with "popup:testview" menu URI.
It works with eclipse 3.7 or below, not works with eclipse Juno
I investigated WorkbenchMenuService#populateContributionManager()
and, It's EMPTY!
/* (non-Javadoc)
* @see org.eclipse.ui.menus.IMenuService#populateContributionManager(org.eclipse.jface.action.ContributionManager, java.lang.String)
*/
public void populateContributionManager(ContributionManager mgr, String location) {
// TODO Auto-generated method stub
}
is there anyone can explain this?