Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.IParameter


                    ICommandService cService = (ICommandService) getSite().getService(ICommandService.class);
                    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
                   
                    Command command = cService.getCommand("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser");
                   
                    IParameter paramTMLFile = command.getParameter("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser.paramTMLFilePath");
 
                    Parameterization parm = new Parameterization(paramTMLFile, getInputFile().getFullPath().toString());
      
                    ParameterizedCommand parmCommand = new ParameterizedCommand(command, new Parameterization[] { parm });
View Full Code Here


      ArrayList parmList = new ArrayList();
      Iterator i = parameters.entrySet().iterator();
      while (i.hasNext()) {
        Map.Entry entry = (Map.Entry) i.next();
        String parmName = (String) entry.getKey();
        IParameter parm;
        parm = cmd.getParameter(parmName);
        if (parm == null) {
          WorkbenchPlugin
              .log("Unable to create menu item \"" + getId() //$NON-NLS-1$
                  + "\", parameter \"" + parmName + "\" for command \"" //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

      final boolean makeFast) {
    Command c = commandService.getCommand(SHOW_VIEW_ID);
    Parameterization[] parms = null;
    if (makeFast) {
      try {
        IParameter parmDef = c.getParameter(PARAMETER_MAKE_FAST);
        parms = new Parameterization[] {
            new Parameterization(parmDef, "true") //$NON-NLS-1$
        };
      } catch (NotDefinedException e) {
        // this should never happen
View Full Code Here

      ArrayList parameters = new ArrayList();
      Iterator i = parameterMap.keySet().iterator();
      while (i.hasNext()) {
        String parmName = (String) i.next();
        IParameter parm = cmd.getParameter(parmName);
        if (parm == null) {
          WorkbenchPlugin.log("Invalid parameter \'" + parmName //$NON-NLS-1$
              + "\' for command " + commandId); //$NON-NLS-1$
          return;
        }
View Full Code Here

            configurationElement);
        continue;
      }

      // Find the parameter on the command.
      IParameter parameter = null;
      try {
        final IParameter[] commandParameters = command.getParameters();
        if (parameters != null) {
          for (int j = 0; j < commandParameters.length; j++) {
            final IParameter currentParameter = commandParameters[j];
            if (Util.equals(currentParameter.getId(), id)) {
              parameter = currentParameter;
              break;
            }
          }
View Full Code Here

        addWarning(warningsToLog, "Parameters need a name"); //$NON-NLS-1$
        continue;
      }

      // Find the parameter on the command.
      IParameter parameter = null;
      try {
        final IParameter[] commandParameters = command.getParameters();
        if (parameters != null) {
          for (int j = 0; j < commandParameters.length; j++) {
            final IParameter currentParameter = commandParameters[j];
            if (Util.equals(currentParameter.getId(), id)) {
              parameter = currentParameter;
              break;
            }
          }
View Full Code Here

  public Object function (Object[] arguments) {
    try {
      IHandlerService handlerService = (IHandlerService) serviceLocator.getService(IHandlerService.class);
      ICommandService commandService = (ICommandService) serviceLocator.getService(ICommandService.class);
      Command showView = commandService.getCommand(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW);
      IParameter parm1 = showView.getParameter(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID);
      Parameterization parmId1 = new Parameterization(parm1, HttpRequestView.ID);
      IParameter parm2 = showView.getParameter(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_SECONDARY_ID);
      Parameterization parmId2 = new Parameterization(parm2, ScannerPerspectiveFactory.HTTP_VIEW_SECONDARY_ID);
      ParameterizedCommand parmCommand = new ParameterizedCommand(showView, new Parameterization[] { parmId1, parmId2 });
      handlerService.executeCommand(parmCommand, null);

      IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(HttpRequestView.ID, ScannerPerspectiveFactory.HTTP_VIEW_SECONDARY_ID, IWorkbenchPage.VIEW_VISIBLE);
View Full Code Here

    ICommandService cmdService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
   
    // get the command
    Command cmd = cmdService.getCommand("q_impress.pmi.plugin.commands.createProjectSkeleton");
    IParameter rootParm = null;
    IParameter projectNameParm = null;
    try {
      rootParm = cmd.getParameter("q_impress.pmi.plugin.commands.createProjectSkeleton.root");
      projectNameParm = cmd.getParameter("q_impress.pmi.plugin.commands.createProjectSkeleton.projectName");
    } catch (NotDefinedException e) {
      this.throwCoreException("Unable to execute command, invalid parameter :" + e.getMessage(), e);
View Full Code Here

    ICommandService cmdService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
   
    // get the command
    Command createPmiFileCmd = cmdService.getCommand("q_impress.pmi.plugin.commands.createEmptyPerformanceModel");
    IParameter dirParm = null;
    IParameter fileParm = null;
    try {
      dirParm = createPmiFileCmd.getParameter("q_impress.pmi.plugin.commands.createEmptyPerformanceModel.directory");
      fileParm = createPmiFileCmd.getParameter("q_impress.pmi.plugin.commands.createEmptyPerformanceModel.filename");
    } catch (NotDefinedException e) {
      this.throwCoreException("Unable to execute command, invalid parameter :" + e.getMessage(), e);
View Full Code Here

    ICommandService cmdService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
   
    // get the command
    Command command = cmdService.getCommand(AddUmlResourceHandler.COMMAND_ID);
    IParameter umlPathParm = null;
    IParameter doBundlingParm = null;
    IParameter targetModelFileParm = null;
    try {
      umlPathParm = command.getParameter(AddUmlResourceHandler.PARAM_UML_RESOURCE_PATH);
      doBundlingParm = command.getParameter(AddUmlResourceHandler.PARAM_DO_BUNDLING);
      targetModelFileParm = command.getParameter(AddUmlResourceHandler.PARAM_TARGET_MODEL_PATH);
    } catch (NotDefinedException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.IParameter

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.