本文整理汇总了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()));
}
示例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());
}
}
}
示例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"));
}
示例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());
}
}
示例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());
}
}
示例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);
}