mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Bug fix: IDEA does not save to XML 'output level' property of MavenGeneralSettings. This is actual for all enum properties of MavenGeneralSettings.
This commit is contained in:
+16
-4
@@ -19,6 +19,8 @@ import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.xmlb.annotations.Property;
|
||||
import com.intellij.util.xmlb.annotations.Transient;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -71,6 +73,7 @@ public class MavenGeneralSettings implements Cloneable {
|
||||
fireChanged();
|
||||
}
|
||||
|
||||
@Property
|
||||
@NotNull
|
||||
public MavenExecutionOptions.PluginUpdatePolicy getPluginUpdatePolicy() {
|
||||
return pluginUpdatePolicy;
|
||||
@@ -82,6 +85,7 @@ public class MavenGeneralSettings implements Cloneable {
|
||||
changed();
|
||||
}
|
||||
|
||||
@Property
|
||||
@NotNull
|
||||
public MavenExecutionOptions.ChecksumPolicy getChecksumPolicy() {
|
||||
return checksumPolicy;
|
||||
@@ -93,6 +97,7 @@ public class MavenGeneralSettings implements Cloneable {
|
||||
changed();
|
||||
}
|
||||
|
||||
@Property
|
||||
@NotNull
|
||||
public MavenExecutionOptions.FailureMode getFailureBehavior() {
|
||||
return failureBehavior;
|
||||
@@ -104,9 +109,16 @@ public class MavenGeneralSettings implements Cloneable {
|
||||
changed();
|
||||
}
|
||||
|
||||
public
|
||||
@Transient
|
||||
@NotNull
|
||||
MavenExecutionOptions.LoggingLevel getLoggingLevel() {
|
||||
@Deprecated // Use getOutputLevel()
|
||||
public MavenExecutionOptions.LoggingLevel getLoggingLevel() {
|
||||
return getOutputLevel();
|
||||
}
|
||||
|
||||
@Property
|
||||
@NotNull
|
||||
public MavenExecutionOptions.LoggingLevel getOutputLevel() {
|
||||
return outputLevel;
|
||||
}
|
||||
|
||||
@@ -116,9 +128,9 @@ public class MavenGeneralSettings implements Cloneable {
|
||||
changed();
|
||||
}
|
||||
|
||||
public
|
||||
@Property
|
||||
@NotNull
|
||||
MavenExecutionOptions.SnapshotUpdatePolicy getSnapshotUpdatePolicy() {
|
||||
public MavenExecutionOptions.SnapshotUpdatePolicy getSnapshotUpdatePolicy() {
|
||||
return snapshotUpdatePolicy;
|
||||
}
|
||||
|
||||
|
||||
+12
@@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.intellij.testFramework.IdeaTestCase;
|
||||
import com.intellij.util.xmlb.XmlSerializer;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -29,6 +30,14 @@ public class MavenRunConfigurationTest extends IdeaTestCase {
|
||||
s.myRunnerParameters.setGoals(Arrays.asList("clean", "validate"));
|
||||
s.myRunnerParameters.setProfilesMap(ImmutableMap.of("prof1", true, "prof2", true, "prof3", false));
|
||||
|
||||
s.myGeneralSettings = new MavenGeneralSettings();
|
||||
s.myGeneralSettings.setChecksumPolicy(MavenExecutionOptions.ChecksumPolicy.WARN);
|
||||
s.myGeneralSettings.setFailureBehavior(MavenExecutionOptions.FailureMode.AT_END);
|
||||
s.myGeneralSettings.setOutputLevel(MavenExecutionOptions.LoggingLevel.FATAL);
|
||||
|
||||
s.myRunnerSettings = new MavenRunnerSettings();
|
||||
s.myRunnerSettings.setMavenProperties(ImmutableMap.of("a", "1", "b", "2", "c", "3"));
|
||||
|
||||
Element xml = XmlSerializer.serialize(s);
|
||||
MavenRunConfiguration.MavenSettings loaded
|
||||
= XmlSerializer.deserialize(xml, MavenRunConfiguration.MavenSettings.class);
|
||||
@@ -36,5 +45,8 @@ public class MavenRunConfigurationTest extends IdeaTestCase {
|
||||
assertEquals(s.myRunnerParameters.getWorkingDirPath(), loaded.myRunnerParameters.getWorkingDirPath());
|
||||
assertEquals(s.myRunnerParameters.getGoals(), loaded.myRunnerParameters.getGoals());
|
||||
assertEquals(s.myRunnerParameters.getProfilesMap(), loaded.myRunnerParameters.getProfilesMap());
|
||||
|
||||
assertEquals(s.myGeneralSettings, loaded.myGeneralSettings);
|
||||
assertEquals(s.myRunnerSettings, loaded.myRunnerSettings);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user