@Override public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); if (propertiesAction.isApplicableForSelection()) { menu.appendToGroup(ICommonMenuConstants.GROUP_PROPERTIES, propertiesAction); } }
public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); if (menu instanceof CommonMenuManager) { CommonMenuManager manager = (CommonMenuManager) menu; for (Iterator iter = handlers.keySet().iterator(); iter.hasNext();) { String actionId = (String) iter.next(); manager.registerHandler(actionId, (IHandler)handlers.get(actionId)); } } final IContributionItem fileGroup = menu.find(ISynchronizePageConfiguration.FILE_GROUP); if (openWithActions != null && fileGroup != null) { openWithActions.fillContextMenu(menu, fileGroup.getId()); } }
@Override public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); if (menu instanceof CommonMenuManager) { CommonMenuManager manager = (CommonMenuManager) menu; for (Iterator iter = handlers.keySet().iterator(); iter.hasNext();) { String actionId = (String) iter.next(); manager.registerHandler(actionId, handlers.get(actionId)); } } final IContributionItem fileGroup = menu.find(ISynchronizePageConfiguration.FILE_GROUP); if (openWithActions != null && fileGroup != null) { openWithActions.fillContextMenu(menu, fileGroup.getId()); } }
/** * @param aMenu */ private void addCommonActionProviderMenu(IMenuManager aMenu) { CommonActionProviderDescriptor[] providerDescriptors = CommonActionDescriptorManager.getInstance().findRelevantActionDescriptors(contentService, getContext()); if (providerDescriptors.length > 0) { CommonActionProvider provider = null; for (int i = 0; i < providerDescriptors.length; i++) { try { provider = getActionProviderInstance(providerDescriptors[i]); provider.setContext(getContext()); provider.fillContextMenu(aMenu); } catch (Throwable t) { NavigatorPlugin.logError(0, t.getMessage(), t); } } } }
public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); IStructuredSelection selection = getContext().getSelection() instanceof IStructuredSelection ? (IStructuredSelection) getContext() .getSelection() : StructuredSelection.EMPTY; mWorkOfflineAction.selectionChanged(selection); mSaveOfflineAction.selectionChanged(selection); menu.appendToGroup(OFFLINE_MENU_GROUP, mWorkOfflineAction); menu.appendToGroup(OFFLINE_MENU_GROUP, mSaveOfflineAction); }