package com.intellij.execution.configuration;
import com.google.common.collect.ImmutableMap;
+import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.util.containers.ContainerUtil;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
parent.addContent(envsElement);
}
+ public void configureCommandLine(@NotNull GeneralCommandLine commandLine, boolean consoleParentEnvs) {
+ if (myPassParentEnvs) {
+ commandLine.withParentEnvironmentType(consoleParentEnvs ? GeneralCommandLine.ParentEnvironmentType.CONSOLE
+ : GeneralCommandLine.ParentEnvironmentType.SYSTEM);
+ }
+ else {
+ commandLine.withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.NONE);
+ }
+ commandLine.withEnvironment(myEnvs);
+ }
+
/**
* @param envs Map instance containing user-defined environment variables
* (iteration order should be reliable user-specified, like {@link LinkedHashMap} or {@link ImmutableMap})