From 9e7d6766dafb4095dcf95e5950af88e831da2337 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 24 Feb 2015 12:14:03 +0100 Subject: [PATCH] cleanup --- .../daemon/DaemonCodeAnalyzerSettings.java | 20 +++++++++---------- .../DaemonCodeAnalyzerSettingsImpl.java | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettings.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettings.java index 00fa3f0f4cff..9fc611d6dbbc 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettings.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettings.java @@ -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; } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettingsImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettingsImpl.java index d4889a97f802..0334f18b0931 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettingsImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettingsImpl.java @@ -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, 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);