Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.Parameterization


                   
                    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 });
                    handlerService.executeCommand(parmCommand, null);
                }
View Full Code Here


              .log("Unable to create menu item \"" + getId() //$NON-NLS-1$
                  + "\", parameter \"" + parmName + "\" for command \"" //$NON-NLS-1$ //$NON-NLS-2$
                  + commandId + "\" is not defined"); //$NON-NLS-1$
          return;
        }
        parmList.add(new Parameterization(parm, (String) entry
            .getValue()));
      }
      command = new ParameterizedCommand(cmd,
          (Parameterization[]) parmList
              .toArray(new Parameterization[parmList.size()]));
View Full Code Here

    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

        if (parm == null) {
          WorkbenchPlugin.log("Invalid parameter \'" + parmName //$NON-NLS-1$
              + "\' for command " + commandId); //$NON-NLS-1$
          return;
        }
        parameters.add(new Parameterization(parm, (String) parameterMap
            .get(parmName)));
      }
      parameterizedCommand = new ParameterizedCommand(cmd,
          (Parameterization[]) parameters
              .toArray(new Parameterization[parameters.size()]));
View Full Code Here

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

      parameters.add(new Parameterization(parameter, value));
    }

    if (parameters.isEmpty()) {
      return new ParameterizedCommand(command, null);
    }
View Full Code Here

        // The name should never be null. This is invalid.
        addWarning(warningsToLog, "Parameters need a value", id); //$NON-NLS-1$
        continue;
      }

      parameters.add(new Parameterization(parameter, value));
    }

    if (parameters.isEmpty()) {
      return new ParameterizedCommand(command, null);
    }
View Full Code Here

              (IHandlerService) getSite().getService(IHandlerService.class);
            ICommandService commandService =
              (ICommandService) getSite().getService(ICommandService.class);
            Command cmd = commandService.getCommand("net.sf.logsaw.ui.commands.AddLogResourceCommand"); //$NON-NLS-1$
            try {
              Parameterization param = new Parameterization(
                  cmd.getParameter("net.sf.logsaw.ui.commands.AddLogResourceCommand.filename"), ((String[]) target)[0]); //$NON-NLS-1$
              ParameterizedCommand paraCmd = new ParameterizedCommand(cmd, new Parameterization[] {param});
              handlerService.executeCommand(paraCmd, null);
            } catch (CommandException e) {
              // log and show error
View Full Code Here

        if (e.keyCode == SWT.CR) {
          try {
            int pageNumber = Integer.valueOf(text.getText().trim());
            IHandlerService service =
              (IHandlerService) getWorkbenchWindow().getService(IHandlerService.class);
            Parameterization param = new Parameterization(
                cmd.getParameter("net.sf.logsaw.ui.commands.GoToPageCommand.pageNumber"), Integer.toString(pageNumber)); //$NON-NLS-1$
            ParameterizedCommand paraCmd = new ParameterizedCommand(cmd, new Parameterization[] {param});
            service.executeCommand(paraCmd, null);
          } catch (NumberFormatException e1) {
            // nadda
View Full Code Here

    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);
      if(view instanceof HttpRequestView && arguments[0] instanceof String) {
View Full Code Here

    } catch (NotDefinedException e) {
      this.throwCoreException("Unable to execute command, invalid parameter :" + e.getMessage(), e);
    }

    // parametrize it
    Parameterization parmRoot = new Parameterization(rootParm, containerName);
    Parameterization parmProjectName = new Parameterization(projectNameParm, projectName);
    ParameterizedCommand parmCommand = new ParameterizedCommand(cmd, new Parameterization[] { parmRoot, parmProjectName });

    // exec the command
    try {
      handlerService.executeCommand(parmCommand, null);
View Full Code Here

TOP

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

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.