public void menuAboutToShow(IMenuManager m) { getNavigatorActionService().fillContextMenu(m); } });
/** * <p> * Fills aMenuManager with menu contributions from the * {@link NavigatorActionService}. * </p> * * @param aMenuManager * A popup menu * @see NavigatorActionService#fillContextMenu(IMenuManager) * */ protected void fillContextMenu(IMenuManager aMenuManager) { ISelection selection = commonNavigator.getCommonViewer().getSelection(); actionService.setContext(new ActionContext(selection)); actionService.fillContextMenu(aMenuManager); }
@Override protected void fillContextMenu(StructuredViewer viewer, IMenuManager manager) { // Clear any handlers from the menu if (manager instanceof CommonMenuManager) { CommonMenuManager cmm = (CommonMenuManager) manager; cmm.clearHandlers(); } // Add the actions from the service (which willal so add the groups) ISelection selection = getViewer().getSelection(); actionService.setContext(new ActionContext(selection)); actionService.fillContextMenu(manager); // Add any programmatic menu items super.fillContextMenu(viewer, manager); }
protected void fillContextMenu(StructuredViewer viewer, IMenuManager manager) { // Clear any handlers from the menu if (manager instanceof CommonMenuManager) { CommonMenuManager cmm = (CommonMenuManager) manager; cmm.clearHandlers(); } // Add the actions from the service (which willal so add the groups) ISelection selection = getViewer().getSelection(); actionService.setContext(new ActionContext(selection)); actionService.fillContextMenu(manager); // Add any programmatic menu items super.fillContextMenu(viewer, manager); }