This commit is contained in:
Vladimir Krivosheev
2015-02-24 12:24:26 +01:00
parent 1157c15d8e
commit 9e7d6766da
2 changed files with 15 additions and 15 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInsight.daemon;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.util.xmlb.annotations.OptionTag;
import com.intellij.util.xmlb.annotations.Transient;
public class DaemonCodeAnalyzerSettings {
@@ -26,9 +26,9 @@ public class DaemonCodeAnalyzerSettings {
public boolean NEXT_ERROR_ACTION_GOES_TO_ERRORS_FIRST = true;
public int AUTOREPARSE_DELAY = 300;
public boolean SHOW_ADD_IMPORT_HINTS = true;
protected boolean myShowAddImportHints = true;
public String NO_AUTO_IMPORT_PATTERN = "[a-z].?";
public boolean SUPPRESS_WARNINGS = true;
protected boolean mySuppressWarnings = true;
public boolean SHOW_METHOD_SEPARATORS = false;
public int ERROR_STRIPE_MARK_MIN_HEIGHT = 2;
public boolean SHOW_SMALL_ICONS_IN_GUTTER = true;
@@ -38,21 +38,21 @@ public class DaemonCodeAnalyzerSettings {
return false;
}
@Transient
@OptionTag(value = "SHOW_ADD_IMPORT_HINTS")
public boolean isImportHintEnabled() {
return SHOW_ADD_IMPORT_HINTS;
return myShowAddImportHints;
}
public void setImportHintEnabled(boolean isImportHintEnabled) {
SHOW_ADD_IMPORT_HINTS = isImportHintEnabled;
myShowAddImportHints = isImportHintEnabled;
}
@Transient
@OptionTag(value = "SUPPRESS_WARNINGS")
public boolean isSuppressWarnings() {
return SUPPRESS_WARNINGS;
return mySuppressWarnings;
}
public void setSuppressWarnings(boolean suppressWarnings) {
SUPPRESS_WARNINGS = suppressWarnings;
mySuppressWarnings = suppressWarnings;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,13 +24,13 @@ import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.profile.codeInspection.InspectionProfileManager;
import com.intellij.profile.codeInspection.InspectionProfileManagerImpl;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
import com.intellij.util.xmlb.SkipDefaultsSerializationFilter;
import com.intellij.util.xmlb.XmlSerializer;
import org.jdom.Element;
@State(
name = "DaemonCodeAnalyzerSettings",
storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")}
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")
)
public class DaemonCodeAnalyzerSettingsImpl extends DaemonCodeAnalyzerSettings implements PersistentStateComponent<Element>, Cloneable {
@Override
@@ -42,7 +42,7 @@ public class DaemonCodeAnalyzerSettingsImpl extends DaemonCodeAnalyzerSettings i
public DaemonCodeAnalyzerSettingsImpl clone() {
DaemonCodeAnalyzerSettingsImpl settings = new DaemonCodeAnalyzerSettingsImpl();
settings.AUTOREPARSE_DELAY = AUTOREPARSE_DELAY;
settings.SHOW_ADD_IMPORT_HINTS = SHOW_ADD_IMPORT_HINTS;
settings.myShowAddImportHints = myShowAddImportHints;
settings.SHOW_METHOD_SEPARATORS = SHOW_METHOD_SEPARATORS;
settings.NO_AUTO_IMPORT_PATTERN = NO_AUTO_IMPORT_PATTERN;
settings.SHOW_SMALL_ICONS_IN_GUTTER = SHOW_SMALL_ICONS_IN_GUTTER;
@@ -51,7 +51,7 @@ public class DaemonCodeAnalyzerSettingsImpl extends DaemonCodeAnalyzerSettings i
@Override
public Element getState() {
Element element = XmlSerializer.serialize(this, new SkipDefaultValuesSerializationFilters());
Element element = XmlSerializer.serialize(this, new SkipDefaultsSerializationFilter());
String profile = InspectionProfileManager.getInstance().getRootProfile().getName();
if (!"Default".equals(profile)) {
element.setAttribute("profile", profile);