Package org.eclipse.ui.menus

Examples of org.eclipse.ui.menus.CommandContributionItemParameter


    }
   
    IHandlerService handlerService = (IHandlerService) serviceLocator.getService(IHandlerService.class);
    handlerService.activateHandler(command.getId(), handlerFactory(item.getId()));
   
    CommandContributionItemParameter p = new CommandContributionItemParameter(
        serviceLocator, "", command.getId(), CommandContributionItem.STYLE_PUSH);
   
    p.label = item.getName();
   
    CommandContributionItem contribItem = new CommandContributionItem(p);
View Full Code Here


      Command command = this.getCommandFromCommandConfig(commandConfig);
      getLogFacility().logDebug(
          "got command for " + commandConfig.getCommand() + ": " + command);
      getLogFacility().logDebug("command.isDefined(): " + command.isDefined());

      CommandContributionItemParameter commandContributionItemParameter = new CommandContributionItemParameter( //
          this.getServiceLocator(), // IServiceLocator serviceLocator,
          command.getId(), // String id,
          command.getId(), // String commandId,
          CommandContributionItem.STYLE_PUSH // int style)
      );
View Full Code Here

    {
      if (this.dummyCommandComeBackLater == null)
      {
        this.initDummyCommandComeBackLater();
      }
      CommandContributionItemParameter commandContributionItemParameter = new CommandContributionItemParameter(
          this.getServiceLocator(), COMMAND_ID_DUMMY_COME_BACK_LATER,
          COMMAND_ID_DUMMY_COME_BACK_LATER, CommandContributionItem.STYLE_PUSH);
      contributionItemList.add(this
          .createContributionItem(commandContributionItemParameter));
    }
View Full Code Here

      menu.appendToGroup(GIT_ACTIONS, createItem(PUSH_ACTION));
  }

  private CommandContributionItem createItem(String itemAction) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    CommandContributionItemParameter itemParam = new CommandContributionItemParameter(
        workbench, null, itemAction, STYLE_PUSH);

    IWorkbenchWindow activeWorkbenchWindow = workbench
        .getActiveWorkbenchWindow();
    IHandlerService hsr = CommonUtils.getService(activeWorkbenchWindow, IHandlerService.class);
View Full Code Here

        .addRefsChangedListener(this);
  }

  private CommandContributionItem createCommandContributionItem(
      String commandId) {
    CommandContributionItemParameter parameter = new CommandContributionItemParameter(
        getSite(), commandId, commandId,
        CommandContributionItem.STYLE_PUSH);
    return new CommandContributionItem(parameter);
  }
View Full Code Here

  }

  private static CommandContributionItem getCommandContributionItem(
      String commandId, String menuLabel, Map<String, String> parameters,
      IWorkbenchSite site) {
    CommandContributionItemParameter parameter = new CommandContributionItemParameter(
        site, commandId, commandId, CommandContributionItem.STYLE_PUSH);
    parameter.label = menuLabel;
    parameter.parameters = parameters;
    return new CommandContributionItem(parameter);
  }
View Full Code Here

      return false;
    }

    private CommandContributionItem getCommandContributionItem(
        String commandId, String menuLabel) {
      CommandContributionItemParameter parameter = new CommandContributionItemParameter(
          site, commandId, commandId,
          CommandContributionItem.STYLE_PUSH);
      parameter.label = menuLabel;
      return new CommandContributionItem(parameter);
    }
View Full Code Here

    }

    private CommandContributionItem getCommandContributionItem(
        String commandId, String menuLabel,
        Map<String, String> parameters) {
      CommandContributionItemParameter parameter = new CommandContributionItemParameter(
          site, commandId, commandId,
          CommandContributionItem.STYLE_PUSH);
      parameter.label = menuLabel;
      parameter.parameters = parameters;
      return new CommandContributionItem(parameter);
View Full Code Here

          String menuLabel = UIText.PushMenu_PushHEAD;
          if (ref.startsWith(Constants.R_HEADS)) {
            menuLabel = NLS.bind(UIText.PushMenu_PushBranch,
                Repository.shortenRefName(ref));
          }
          CommandContributionItemParameter params = new CommandContributionItemParameter(
              this.serviceLocator, getClass().getName(),
              ActionCommands.PUSH_BRANCH_ACTION,
              CommandContributionItem.STYLE_PUSH);
          params.label = menuLabel;
          CommandContributionItem item = new CommandContributionItem(
View Full Code Here

  }
 
  public void editorContextMenuAboutToShow(IMenuManager menu) {
    IWorkbenchWindow window = editor.getSite().getWorkbenchWindow();
    menu.prependToGroup(ICommonMenuConstants.GROUP_OPEN, new CommandContributionItem(
      new CommandContributionItemParameter(window,
        null,
        EditorSettings_Actual.COMMAND_OpenDef_ID,
        CommandContributionItem.STYLE_PUSH
      )
    ));
View Full Code Here

TOP

Related Classes of org.eclipse.ui.menus.CommandContributionItemParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.