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


Java ParametersList.add方法代码示例

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


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

示例1: addMavenParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static void addMavenParameters(ParametersList parametersList,
                                       String mavenHome,
                                       MavenGeneralSettings coreSettings,
                                       MavenRunnerSettings runnerSettings,
                                       MavenRunnerParameters parameters) {
  encodeCoreAndRunnerSettings(coreSettings, mavenHome, parametersList);

  if (runnerSettings.isSkipTests()) {
    parametersList.addProperty("skipTests", "true");
  }

  for (Map.Entry<String, String> entry : runnerSettings.getMavenProperties().entrySet()) {
    if (entry.getKey().length() > 0) {
      parametersList.addProperty(entry.getKey(), entry.getValue());
    }
  }

  for (String goal : parameters.getGoals()) {
    parametersList.add(goal);
  }

  addOption(parametersList, "P", encodeProfiles(parameters.getProfilesMap()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:MavenExternalParameters.java

示例2: getData

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
protected void getData(final MavenRunnerParameters data) {
  workingDirComponent.getComponent().setText(data.getWorkingDirPath());
  goalsComponent.getComponent().setText(ParametersList.join(data.getGoals()));
  myResolveToWorkspaceCheckBox.setSelected(data.isResolveToWorkspace());

  ParametersList parametersList = new ParametersList();

  for (Map.Entry<String, Boolean> entry : data.getProfilesMap().entrySet()) {
    String profileName = entry.getKey();

    if (!entry.getValue()) {
      profileName = '-' + profileName;
    }

    parametersList.add(profileName);
  }

  profilesComponent.getComponent().setText(parametersList.getParametersString());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:MavenRunnerParametersPanel.java

示例3: getCommandLine

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public JavaParameters getCommandLine() {
  if (myDone) return myCommandLine;
  ParametersList programParameters = myCommandLine.getProgramParametersList();
  for (final String property : myExpandedProperties) {
    if (property != null) {
      programParameters.add(property);
    }
  }
  programParameters.add("-buildfile", myBuildFilePath);
  for (final String target : myTargets) {
    if (target != null) {
      programParameters.add(target);
    }
  }
  myDone = true;
  return myCommandLine;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AntCommandLineBuilder.java

示例4: configureProgramParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static void configureProgramParameters(ParametersList parameters, PitestConfiguration configuration) {
    if (configuration.isVerboseLogging()) {
        parameters.add("--verbose");
    }
    String targetClasses = configuration.getTargetClasses();
    checkTargetClasses(targetClasses);
    parameters.add("--targetClasses", targetClasses);
    parameters.add("--targetTests", configuration.getTargetTests());
    String excludedClasses = configuration.getExcludedClasses();
    if (StringUtils.isNotBlank(excludedClasses)) {
        parameters.add("--excludedClasses", excludedClasses);
    }
    String reportDir = configuration.getReportDir();
    parameters.add("--reportDir", reportDir);
    parameters.add("--sourceDirs", configuration.getSourceDirs());
    parameters.add("--outputFormats", "HTML,XML");
    String history = Utils.concatenatePath(reportDir, "/history.pit");
    parameters.add("--historyInputLocation", history);
    parameters.add("--historyOutputLocation", history);
    parameters.add("--timestampedReports=false");
    parameters.addParametersString(configuration.getManualParameters());
}
 
开发者ID:artspb,项目名称:idea-pitest,代码行数:23,代码来源:JavaParametersConfigurator.java

示例5: patchParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的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

示例6: patchJavaParametersForDevServer

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Override
public void patchJavaParametersForDevServer(@NotNull ParametersList vmParameters) {
  if (getJavaToolsBasePath() != null) {
    File agentPath =
        getJavaToolsBasePath().resolve(Paths.get("lib", "agent", "appengine-agent.jar")).toFile();
    if (agentPath.exists()) {
      vmParameters.add("-javaagent:" + agentPath.getAbsolutePath());
    }
    File patchPath =
        getJavaToolsBasePath()
            .resolve(Paths.get("lib", "override", "appengine-dev-jdk-overrides.jar"))
            .toFile();
    if (patchPath.exists()) {
      vmParameters.add("-Xbootclasspath/p:" + patchPath.getAbsolutePath());
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:18,代码来源:DefaultCloudSdkService.java

示例7: getCommandLine

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private GeneralCommandLine getCommandLine(String command, String... args) throws IOException, ExecutionException {
    GeneralCommandLine commandLine = new GeneralCommandLine();
    commandLine.setWorkDirectory(myCabalFile.getParentFile().getCanonicalPath());
    commandLine.setExePath(myBuildOptions.myCabalPath);
    ParametersList parametersList = commandLine.getParametersList();
    parametersList.add("--with-ghc=" + myBuildOptions.myGhcPath);
    parametersList.add(command);
    if (command.equals("install") || command.equals("configure")) {
        if (myBuildOptions.myEnableTests) {
            parametersList.add("--enable-tests");
        }
        if (!myBuildOptions.myProfilingBuild) {
            parametersList.add("--disable-library-profiling");
        }
    }
    parametersList.addAll(args);
    commandLine.setRedirectErrorStream(true);
    return commandLine;
}
 
开发者ID:carymrobbins,项目名称:intellij-haskforce,代码行数:20,代码来源:CabalJspInterface.java

示例8: runHlint

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
/**
 * Runs hlintProg with parameters if hlintProg can be executed.
 */
@NotNull
private static Either<ExecError, String> runHlint(HaskellToolsConsole toolConsole,
                                                  @NotNull String workingDirectory,
                                                  @NotNull String hlintProg,
                                                  @NotNull String hlintFlags,
                                                  @NotNull String... params) {
    GeneralCommandLine commandLine = new GeneralCommandLine();
    commandLine.setWorkDirectory(workingDirectory);
    commandLine.setExePath(hlintProg);
    ParametersList parametersList = commandLine.getParametersList();
    // Required so that hlint won't report a non-zero exit status for lint issues.
    // Otherwise, ExecUtil.readCommandLine will return an error.
    parametersList.add("--no-exit-code");
    parametersList.addParametersString(hlintFlags);
    parametersList.addAll(params);
    toolConsole.writeInput(ToolKey.HLINT_KEY, "Using working directory: " + workingDirectory);
    toolConsole.writeInput(ToolKey.HLINT_KEY, commandLine.getCommandLineString());
    return ExecUtil.readCommandLine(commandLine);
}
 
开发者ID:carymrobbins,项目名称:intellij-haskforce,代码行数:23,代码来源:HLint.java

示例9: getJavaParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public OwnJavaParameters getJavaParameters()
{
	if(myDone)
	{
		return myCommandLine;
	}
	ParametersList programParameters = myCommandLine.getProgramParametersList();
	for(final String property : myExpandedProperties)
	{
		if(property != null)
		{
			programParameters.add(property);
		}
	}
	programParameters.add("-buildfile", myBuildFilePath);
	for(final String target : myTargets)
	{
		if(target != null)
		{
			programParameters.add(target);
		}
	}
	myDone = true;
	return myCommandLine;
}
 
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:26,代码来源:AntCommandLineBuilder.java

示例10: getFileCommandLine

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Override
protected SimpleProgramCommandLine getFileCommandLine(@NotNull final PowerShellInfo info,
                                                      @NotNull final Map<String, String> env,
                                                      @NotNull final String workDir,
                                                      @NotNull final List<String> args) throws RunBuildException {
  final ParametersList parametersList = new ParametersList();
  parametersList.add(info.getExecutablePath());
  parametersList.addAll(args);
  return executeWithWrapper(env, workDir, parametersList.getParametersString());
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:11,代码来源:PowerShellServiceUnix.java

示例11: generateCommand

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@NotNull
private String generateCommand(@NotNull final PowerShellInfo info) throws RunBuildException {
  final ParametersList parametersList = new ParametersList();
  final Map<String, String> runnerParameters = getRunnerParameters();
  final File scriptFile = myScriptGenerator.generateScript(runnerParameters, getCheckoutDirectory(), getBuildTempDirectory());
  // if  we have script entered in runner params it will be dumped to temp file. This file must be removed after build finishes
  if (ScriptGenerator.shouldRemoveGeneratedScript(runnerParameters)) {
    myFilesToRemove.add(scriptFile);
  }
  parametersList.add(info.getExecutablePath());
  parametersList.addAll(myCmdProvider.provideCommandLine(info, runnerParameters, scriptFile, useExecutionPolicy(info)));
  return parametersList.getParametersString();
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:14,代码来源:BasePowerShellService.java

示例12: updateJavaParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Override
public <T extends RunConfigurationBase> void updateJavaParameters(
    final T configuration, final JavaParameters params, final RunnerSettings runnerSettings
) throws ExecutionException {
    if (runnerSettings != null || !isApplicableFor(configuration)) {
        return;
    }
    final Project project = configuration.getProject();
    final ParametersList vmParameters = params.getVMParametersList();

    if (!vmParameters.hasParameter("-ea")) {
        vmParameters.add("-ea");
    }
    if (vmParameters.getParameters().stream().noneMatch(param -> param.startsWith("-Dplatformhome="))) {
        final VirtualFile platformRootDirectory = findPlatformRootDirectory(project);

        if (platformRootDirectory != null) {
            vmParameters.add("-Dplatformhome=" + platformRootDirectory.getPath());
        }
    }
    if (!params.getEnv().containsKey(HYBRIS_DATA_DIR_ENV)) {
        final HybrisProjectSettings settings = HybrisProjectSettingsComponent.getInstance(project).getState();

        final String hybrisDataDirPath = FileUtil.toCanonicalPath(
            project.getBasePath() + '/' + settings.getHybrisDirectory() + '/' + HybrisConstants.HYBRIS_DATA_DIRECTORY);

        if (hybrisDataDirPath != null) {
            params.addEnv(HYBRIS_DATA_DIR_ENV, hybrisDataDirPath);
        }
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:32,代码来源:HybrisJUnitExtension.java

示例13: paramsGroupGroupParams

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupGroupParams() {
  ParametersList params = new ParametersList();
  params.add("param1");
  ParamsGroup group1 = params.addParamsGroup("id1");
  group1.addParameter("group1_param1");
  params.add("param2");
  group1.addParameter("group1_param2");
  ParamsGroup group2 = params.addParamsGroup("id2");
  group2.addParameter("group2_param1");
  params.add("param3");
  assertEquals(asList("param1", "param2", "param3"), params.getParameters());
  assertEquals(asList("param1", "param2", "param3", "group1_param1", "group1_param2", "group2_param1"), params.getList());
  assertArrayEquals(new String[]{"param1", "param2", "param3", "group1_param1", "group1_param2", "group2_param1"}, params.getArray());
  assertEquals("param1 param2 param3 group1_param1 group1_param2 group2_param1", params.getParametersString().trim());

  ParametersList group1_params = group1.getParametersList();
  assertEquals(asList("group1_param1", "group1_param2"), group1_params.getParameters());
  assertEquals(asList("group1_param1", "group1_param2"), group1_params.getList());
  assertArrayEquals(new String[]{"group1_param1", "group1_param2"}, group1_params.getArray());
  assertEquals("group1_param1 group1_param2", group1_params.getParametersString().trim());

  ParametersList group2_params = group2.getParametersList();
  assertEquals(asList("group2_param1"), group2_params.getParameters());
  assertEquals(asList("group2_param1"), group2_params.getList());
  assertArrayEquals(new String[]{"group2_param1"}, group2_params.getArray());
  assertEquals("group2_param1", group2_params.getParametersString().trim());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ParametersListTest.java

示例14: patchJavaParametersForDevServer

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public void patchJavaParametersForDevServer(@NotNull ParametersList vmParameters) {
  final String agentPath = myHomePath + "/lib/agent/appengine-agent.jar";
  if (new File(FileUtil.toSystemDependentName(agentPath)).exists()) {
    vmParameters.add("-javaagent:" + agentPath);
  }
  String patchPath = myHomePath + "/lib/override/appengine-dev-jdk-overrides.jar";
  if (new File(FileUtil.toSystemDependentName(patchPath)).exists()) {
    vmParameters.add("-Xbootclasspath/p:" + patchPath);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AppEngineSdkImpl.java

示例15: addToParametersList

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public void addToParametersList(@NotNull ParametersList list) {
  if (myEnv != null) {
    list.add(myEnv);
  }

  list.addAll(myProperties);

  if (myCommand != null) {
    list.add(myCommand);
  }

  list.addAll(myArgs);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:MvcCommand.java


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