mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ApplicationConfiguration — fix env serialization
This commit is contained in:
+3
-7
@@ -35,7 +35,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunConfigurationModule>
|
||||
@@ -52,8 +51,6 @@ public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunCo
|
||||
|
||||
private ShortenCommandLine myShortenCommandLine = null;
|
||||
|
||||
private final Map<String, String> myEnvs = new LinkedHashMap<>();
|
||||
|
||||
public ApplicationConfiguration(final String name, final Project project, ApplicationConfigurationType applicationConfigurationType) {
|
||||
this(name, project, applicationConfigurationType.getConfigurationFactories()[0]);
|
||||
}
|
||||
@@ -201,13 +198,12 @@ public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunCo
|
||||
@Override
|
||||
@NotNull
|
||||
public Map<String, String> getEnvs() {
|
||||
return myEnvs;
|
||||
return getOptions().getEnv();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnvs(@NotNull final Map<String, String> envs) {
|
||||
myEnvs.clear();
|
||||
myEnvs.putAll(envs);
|
||||
public void setEnvs(@NotNull Map<String, String> envs) {
|
||||
getOptions().setEnv(envs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ open class ApplicationConfigurationOptions : JvmConfigurationOptions() {
|
||||
@get:OptionTag("PASS_PARENT_ENVS")
|
||||
var isPassParentEnv by property(true)
|
||||
|
||||
@get:OptionTag("envs")
|
||||
@get:OptionTag(tag = "envs", nameAttribute = "")
|
||||
@get:MapAnnotation(surroundWithTag = false, entryTagName = "env", keyAttributeName = "name", sortBeforeSave = false)
|
||||
var env by property(LinkedHashMap())
|
||||
var env by property(LinkedHashMap<String, String>())
|
||||
}
|
||||
Reference in New Issue
Block a user