当前位置: 首页>>代码示例>>Java>>正文


Java JavaParameters.getProgramParametersList方法代码示例

本文整理汇总了Java中com.intellij.execution.configurations.JavaParameters.getProgramParametersList方法的典型用法代码示例。如果您正苦于以下问题:Java JavaParameters.getProgramParametersList方法的具体用法?Java JavaParameters.getProgramParametersList怎么用?Java JavaParameters.getProgramParametersList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.configurations.JavaParameters的用法示例。


在下文中一共展示了JavaParameters.getProgramParametersList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: passForkMode

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
protected void passForkMode(String forkMode, File tempFile, JavaParameters parameters) throws ExecutionException {
  final ParametersList parametersList = parameters.getProgramParametersList();
  final List<String> params = parametersList.getParameters();
  int paramIdx = params.size() - 1;
  for (int i = 0; i < params.size(); i++) {
    String param = params.get(i);
    if ("-temp".equals(param)) {
      paramIdx = i;
      break;
    }
  }
  parametersList.addAt(paramIdx, "@@@" + tempFile.getAbsolutePath());
  if (getForkSocket() != null) {
    parametersList.addAt(paramIdx, ForkedDebuggerHelper.DEBUG_SOCKET + getForkSocket().getLocalPort());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:TestNGRunnableState.java

示例2: patchParameters

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
@Override
public void patchParameters(
    @NotNull JavaParameters parameters, String originalOutputDir, @NotNull GwtFacet gwtFacet) {
  final ParametersList programParameters = parameters.getProgramParametersList();
  programParameters.add("-server");
  programParameters.add("com.google.appengine.tools.development.gwt.AppEngineLauncher");

  final CloudSdkService sdkService = CloudSdkService.getInstance();
  sdkService.patchJavaParametersForDevServer(parameters.getVMParametersList());

  // actually these jars are added by AppEngine dev server automatically. But they need to be
  // added to classpath before gwt-dev.jar, because otherwise wrong jsp compiler version will be
  // used (see IDEA-63068)
  if (sdkService.getLibraries() != null) {
    for (File jar :
        ArrayUtil.mergeArrays(sdkService.getLibraries(), sdkService.getJspLibraries())) {
      parameters.getClassPath().addFirst(FileUtil.toSystemIndependentName(jar.getAbsolutePath()));
    }
  }

  if (sdkService.getToolsApiJarFile() != null) {
    parameters.getClassPath().add(sdkService.getToolsApiJarFile());
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:25,代码来源:AppEngineGwtServer.java

示例3: fillProgramParameters

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
private void fillProgramParameters(JavaParameters params) {
    ParametersList programParametersList = params.getProgramParametersList();
    for (EquinoxConfigurationOptions configurationValue : enabledConfigs) {
        programParametersList.add(configurationValue.getParameter());
    }

    programParametersList.add("-application", applicationName);
    programParametersList.add("-configuration", "configuration");
    programParametersList.add("%*");
}
 
开发者ID:mcmil,项目名称:wuff-intellij-plugin,代码行数:11,代码来源:EquinoxJavaCommandLineState.java

示例4: createJavaParameters

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
@Override
protected final JavaParameters createJavaParameters() throws ExecutionException {
    JavaParameters javaParameters = new JavaParameters();

    for(RunConfigurationExtension ext: Extensions.getExtensions(RunConfigurationExtension.EP_NAME)) {
        ext.updateJavaParameters(configuration, javaParameters, getRunnerSettings());
    }

    // @TODO What is the classpath entry constant class?
    javaParameters.configureByModule(module, 3);

    javaParameters.setMainClass(configuration.getRunSettings().getSketchClass());

    ParametersList programParameters = javaParameters.getProgramParametersList();

    int display = configuration.getRunSettings().getDisplay();
    programParameters.addParametersString(CliArg.DISPLAY.text() + ARG_VAL_SEP + display);

    String windowColorHex = configuration.getRunSettings().getWindowBackgroundColor();

    if (windowColorHex != null && ! windowColorHex.isEmpty()) {
        programParameters.addParametersString(CliArg.WINDOW_COLOR.text() + ARG_VAL_SEP + windowColorHex);
    }

    String stopButtonColorHex = configuration.getRunSettings().getStopButtonColor();

    if (stopButtonColorHex != null && ! stopButtonColorHex.isEmpty()) {
        programParameters.addParametersString(CliArg.STOP_BUTTON_COLOR.text() + ARG_VAL_SEP + stopButtonColorHex);
    }

    DisplayLocation sketchLocation = DisplayLocation.toEnum(configuration.getRunSettings().getLocation());

    // Processing Core automatically aligns sketch at the center of the screen, incorporating sketch size.
    if (sketchLocation != DisplayLocation.CENTER) {
        GraphicsDevice[] screens = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();

        GraphicsDevice screen;
        if (display >= screens.length) {
            logger.warn("The display with index " + display + " is no longer connected.");
            screen = screens[0];
        } else {
            screen = screens[display];
        }

        Point sketchLocationPoint = sketchLocation.getLocation(screen);

        programParameters.addParametersString(CliArg.SKETCH_SCREEN_LOCATION.text() + ARG_VAL_SEP +
                ((int) sketchLocationPoint.getX()) + "," + ((int) sketchLocationPoint.getY()));
    }

    String sketchOutputPath = configuration.getRunSettings().getSketchOutputPath();
    if (sketchOutputPath != null && !sketchOutputPath.isEmpty()) {
        programParameters.addParametersString(CliArg.SKETCH_OUTPUT_PATH.text() + ARG_VAL_SEP + sketchOutputPath);
    }

    if (configuration.getRunSettings().isHideStopButton()) {
        programParameters.add(CliArg.HIDE_STOP_BUTTON.text());
    }

    if (configuration.getRunSettings().isFullscreen()) {
        programParameters.addParametersString(CliArg.PRESENTATION_MODE.text());
    }

    programParameters.add(configuration.getRunSettings().getSketchClass());
    programParameters.addParametersString(configuration.getRunSettings().getSketchArguments());

    javaParameters.getVMParametersList().addParametersString(configuration.getRunSettings().getJvmArguments());

    return javaParameters;
}
 
开发者ID:mistodev,项目名称:processing-idea,代码行数:71,代码来源:ProcessingCommandLineState.java

示例5: startUploadingProcess

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
private void startUploadingProcess() {
  final Process process;
  final GeneralCommandLine commandLine;

  try {
    JavaParameters parameters = new JavaParameters();
    parameters.configureByModule(myAppEngineFacet.getModule(), JavaParameters.JDK_ONLY);
    parameters.setMainClass("com.google.appengine.tools.admin.AppCfg");
    parameters.getClassPath().add(mySdk.getToolsApiJarFile().getAbsolutePath());

    final List<KeyValue<String,String>> list = HttpConfigurable.getJvmPropertiesList(false, null);
    if (! list.isEmpty()) {
      final ParametersList parametersList = parameters.getVMParametersList();
      for (KeyValue<String, String> value : list) {
        parametersList.defineProperty(value.getKey(), value.getValue());
      }
    }

    final ParametersList programParameters = parameters.getProgramParametersList();
    if (myAuthData.isOAuth2()) {
      programParameters.add("--oauth2");
    }
    else {
      programParameters.add("--email=" + myAuthData.getEmail());
      programParameters.add("--passin");
      programParameters.add("--no_cookies");
    }
    programParameters.add("update");
    programParameters.add(FileUtil.toSystemDependentName(myArtifact.getOutputPath()));

    commandLine = CommandLineBuilder.createFromJavaParameters(parameters);
    process = commandLine.createProcess();
  }
  catch (ExecutionException e) {
    myCallback.errorOccurred("Cannot start uploading: " + e.getMessage());
    return;
  }

  final ProcessHandler processHandler = new OSProcessHandler(process, commandLine.getCommandLineString());
  processHandler.addProcessListener(new MyProcessListener(processHandler, null, myLoggingHandler));
  myLoggingHandler.attachToProcess(processHandler);
  processHandler.startNotify();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:44,代码来源:AppEngineUploader.java

示例6: startUploadingProcess

import com.intellij.execution.configurations.JavaParameters; //导入方法依赖的package包/类
private void startUploadingProcess() {
  final Process process;
  final GeneralCommandLine commandLine;

  try {
    JavaParameters parameters = new JavaParameters();
    parameters.configureByModule(myAppEngineFacet.getModule(), JavaParameters.JDK_ONLY);
    parameters.setMainClass("com.google.appengine.tools.admin.AppCfg");
    parameters.getClassPath().add(mySdk.getToolsApiJarFile().getAbsolutePath());

    final List<KeyValue<String,String>> list = HttpConfigurable.getJvmPropertiesList(false, null);
    if (! list.isEmpty()) {
      final ParametersList parametersList = parameters.getVMParametersList();
      for (KeyValue<String, String> value : list) {
        parametersList.defineProperty(value.getKey(), value.getValue());
      }
    }

    final ParametersList programParameters = parameters.getProgramParametersList();
    programParameters.add("--email=" + myEmail);
    programParameters.add("update");
    programParameters.add(FileUtil.toSystemDependentName(myArtifact.getOutputPath()));

    commandLine = CommandLineBuilder.createFromJavaParameters(parameters);
    process = commandLine.createProcess();
  }
  catch (ExecutionException e) {
    Messages.showErrorDialog(myProject, "Cannot start uploading: " + e.getMessage(), CommonBundle.getErrorTitle());
    return;
  }

  final Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  final ConsoleView console = TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole();
  final RunnerLayoutUi ui = RunnerLayoutUi.Factory.getInstance(myProject).create("Upload", "Upload Application", "Upload Application", myProject);
  final DefaultActionGroup group = new DefaultActionGroup();
  ui.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
  ui.addContent(ui.createContent("upload", console.getComponent(), "Upload Application", null, console.getPreferredFocusableComponent()));

  final ProcessHandler processHandler = new OSProcessHandler(process, commandLine.getCommandLineString());
  processHandler.addProcessListener(new MyProcessListener(processHandler, console));
  console.attachToProcess(processHandler);
  final RunContentDescriptor contentDescriptor = new RunContentDescriptor(console, processHandler, ui.getComponent(), "Upload Application");
  group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_STOP_PROGRAM));
  group.add(new CloseAction(executor, contentDescriptor, myProject));

  ExecutionManager.getInstance(myProject).getContentManager().showRunContent(executor, contentDescriptor);
  processHandler.startNotify();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:49,代码来源:AppEngineUploader.java


注:本文中的com.intellij.execution.configurations.JavaParameters.getProgramParametersList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。