private IContributionItem getItem(String actionId, String commandId, String image, String disabledImage, String label, String tooltip, String helpContextId) { ISharedImages sharedImages = getWindow().getWorkbench() .getSharedImages(); IActionCommandMappingService acms = (IActionCommandMappingService) getWindow() .getService(IActionCommandMappingService.class); acms.map(actionId, commandId); CommandContributionItemParameter commandParm = new CommandContributionItemParameter( getWindow(), actionId, commandId, null, sharedImages.getImageDescriptor(image), sharedImages.getImageDescriptor(disabledImage), null, label, null, tooltip, CommandContributionItem.STYLE_PUSH, null, false); return new CommandContributionItem(commandParm); }
private IContributionItem getItem(String actionId, String commandId, String image, String disabledImage, String label, String tooltip, String helpContextId) { ISharedImages sharedImages = getWindow().getWorkbench().getSharedImages(); IActionCommandMappingService acms = (IActionCommandMappingService) getWindow().getService( IActionCommandMappingService.class); acms.map(actionId, commandId); CommandContributionItemParameter commandParm = new CommandContributionItemParameter(getWindow(), actionId, commandId, null, sharedImages.getImageDescriptor(image), sharedImages.getImageDescriptor(disabledImage), null, label, null, tooltip, CommandContributionItem.STYLE_PUSH, null, false); return new CommandContributionItem(commandParm); }
private IContributionItem getItem(final String actionId, final String commandId, final String image, final String disabledImage, final String label, final String tooltip, final String helpContextId) { final IActionCommandMappingService acms = getWindow().getService(IActionCommandMappingService.class); acms.map(actionId, commandId); final CommandContributionItemParameter commandParm = new CommandContributionItemParameter(getWindow(), actionId, commandId, null, image != null ? icons.desc(image) : null, null, null, label, null, tooltip, CommandContributionItem.STYLE_PUSH, null, false); return new CommandContributionItem(commandParm); }