Java 类org.eclipse.ui.internal.handlers.IActionCommandMappingService 实例源码

项目:PDFReporter-Studio    文件:ApplicationActionBarAdvisor.java   
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);
}
项目:limpet    文件:ApplicationActionBarAdvisor.java   
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);
}
项目:gama    文件:GamaActionBarAdvisor.java   
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);
}