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


Java ParametersList.addProperty方法代码示例

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


在下文中一共展示了ParametersList.addProperty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: configureJavaLibraryPath

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private void configureJavaLibraryPath(OrderEnumerator enumerator)
{
	PathsList pathsList = new PathsList();
	enumerator.runtimeOnly().withoutSdk().roots(NativeLibraryOrderRootType.getInstance()).collectPaths(pathsList);
	if(!pathsList.getPathList().isEmpty())
	{
		ParametersList vmParameters = getVMParametersList();
		if(vmParameters.hasProperty(JAVA_LIBRARY_PATH_PROPERTY))
		{
			LOG.info(JAVA_LIBRARY_PATH_PROPERTY + " property is already specified, " + "native library paths from dependencies (" + pathsList.getPathsString() + ") won't be added");
		}
		else
		{
			vmParameters.addProperty(JAVA_LIBRARY_PATH_PROPERTY, pathsList.getPathsString());
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:OwnJavaParameters.java

示例3: properties

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void properties() {
  ParametersList params = new ParametersList();
  params.addProperty("foo.foo", "\"bar bar\" bar");
  assertEquals(1, params.getProperties().size());
  assertEquals("\"bar bar\" bar", params.getProperties().get("foo.foo"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ParametersListTest.java

示例4: encodeCoreAndRunnerSettings

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static void encodeCoreAndRunnerSettings(MavenGeneralSettings coreSettings, String mavenHome,
                                                ParametersList cmdList) {
  if (coreSettings.isWorkOffline()) {
    cmdList.add("--offline");
  }

  boolean atLeastMaven3 = MavenUtil.isMaven3(mavenHome);

  if (!atLeastMaven3) {
    addIfNotEmpty(cmdList, coreSettings.getPluginUpdatePolicy().getCommandLineOption());

    if (!coreSettings.isUsePluginRegistry()) {
      cmdList.add("--no-plugin-registry");
    }
  }

  if (coreSettings.getOutputLevel() == MavenExecutionOptions.LoggingLevel.DEBUG) {
    cmdList.add("--debug");
  }
  if (coreSettings.isNonRecursive()) {
    cmdList.add("--non-recursive");
  }
  if (coreSettings.isPrintErrorStackTraces()) {
    cmdList.add("--errors");
  }

  if (coreSettings.isAlwaysUpdateSnapshots()) {
    cmdList.add("--update-snapshots");
  }

  addIfNotEmpty(cmdList, coreSettings.getFailureBehavior().getCommandLineOption());
  addIfNotEmpty(cmdList, coreSettings.getChecksumPolicy().getCommandLineOption());

  addOption(cmdList, "s", coreSettings.getUserSettingsFile());
  if (!StringUtil.isEmptyOrSpaces(coreSettings.getLocalRepository())) {
    cmdList.addProperty("maven.repo.local", coreSettings.getLocalRepository());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:39,代码来源:MavenExternalParameters.java

示例5: encodeCoreAndRunnerSettings

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static void encodeCoreAndRunnerSettings(MavenGeneralSettings coreSettings, String mavenHome,
                                                ParametersList cmdList) {
  if (coreSettings.isWorkOffline()) {
    cmdList.add("--offline");
  }

  boolean atLeastMaven3 = MavenUtil.isMaven3(mavenHome);

  if (!atLeastMaven3) {
    addIfNotEmpty(cmdList, coreSettings.getPluginUpdatePolicy().getCommandLineOption());

    if (!coreSettings.isUsePluginRegistry()) {
      cmdList.add("--no-plugin-registry");
    }
  }

  if (coreSettings.getOutputLevel() == MavenExecutionOptions.LoggingLevel.DEBUG) {
    cmdList.add("--debug");
  }
  if (coreSettings.isNonRecursive()) {
    cmdList.add("--non-recursive");
  }
  if (coreSettings.isPrintErrorStackTraces()) {
    cmdList.add("--errors");
  }

  if (coreSettings.isAlwaysUpdateSnapshots()) {
    cmdList.add("--update-snapshots");
  }

  if (StringUtil.isNotEmpty(coreSettings.getThreads())) {
    cmdList.add("-T", coreSettings.getThreads());
  }

  addIfNotEmpty(cmdList, coreSettings.getFailureBehavior().getCommandLineOption());
  addIfNotEmpty(cmdList, coreSettings.getChecksumPolicy().getCommandLineOption());

  addOption(cmdList, "s", coreSettings.getUserSettingsFile());
  if (!StringUtil.isEmptyOrSpaces(coreSettings.getLocalRepository())) {
    cmdList.addProperty("maven.repo.local", coreSettings.getLocalRepository());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:43,代码来源:MavenExternalParameters.java

示例6: addVMParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public static void addVMParameters(ParametersList parametersList, String mavenHome, MavenRunnerSettings runnerSettings) {
  parametersList.addParametersString(System.getenv(MAVEN_OPTS));

  parametersList.addParametersString(runnerSettings.getVmOptions());

  parametersList.addProperty("maven.home", mavenHome);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MavenExternalParameters.java


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