Examples of IParameter


Examples of org.eclipse.core.commands.IParameter

      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

Examples of org.eclipse.core.commands.IParameter

            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

Examples of org.eclipse.core.commands.IParameter

        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

Examples of org.eclipse.core.commands.IParameter

  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

Examples of org.eclipse.core.commands.IParameter

    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

Examples of org.eclipse.core.commands.IParameter

    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

Examples of org.eclipse.core.commands.IParameter

    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

Examples of org.eclipse.core.commands.IParameter

        Command cmd = srv.getCommand(HistoryViewCommands.SHOWVERSIONS);
        Parameterization[] parms;
        if (Activator.getDefault().getPreferenceStore().getBoolean(
            UIPreferences.RESOURCEHISTORY_COMPARE_MODE))
          try {
            IParameter parm = cmd
                .getParameter(HistoryViewCommands.COMPARE_MODE_PARAM);
            parms = new Parameterization[] { new Parameterization(
                parm, Boolean.TRUE.toString()) };
          } catch (NotDefinedException e) {
            Activator.handleError(e.getMessage(), e, true);
View Full Code Here

Examples of org.hdiv.state.IParameter

    if (method == null || method.length() == 0) {
      // Default method is GET
      method = "GET";
    }

    IParameter parameter = this.composeParameter(parameterName, value, editable, editableName, isActionParam,
        charEncoding);

    if (this.isConfidentialParam(parameterName, method)) {
      return parameter.getConfidentialValue();
    } else {
      return value;
    }

  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    }

    // Get actual IState
    IState state = this.getStatesStack().peek();

    IParameter parameter = state.getParameter(parameterName);
    if (parameter != null) {
      if (parameter.isEditable() != editable) {
        // A parameter can be created as editable but if a new non editable value is added, the parameter is
        // changed to non editable. This is required in some frameworks like Struts 2.
        parameter.setEditable(editable);
      }
      parameter.addValue(decodedValue);
    } else {
      // create a new parameter and add to the request
      parameter = createParameter(parameterName, decodedValue, editable, editableDataType, isActionParam,
          charEncoding);
      state.addParameter(parameter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.