Replace deprecated CodeInsightColors attributes with DefaultLanguageHighlighterColors
authorRustam Vishnyakov <rustam.vishnyakov@jetbrains.com>
Fri, 22 Jan 2016 12:25:08 +0000 (15:25 +0300)
committerRustam Vishnyakov <rustam.vishnyakov@jetbrains.com>
Fri, 22 Jan 2016 12:26:12 +0000 (15:26 +0300)
java/java-impl/src/com/intellij/openapi/vcs/contentAnnotation/VcsContentAnnotationExceptionFilter.java
platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfoType.java

index cb75f56902b02f3728ecdb4621e184205ce41ac1..af31a1f6f64cacf6c5d352adc6d0b00895831ea8 100644 (file)
@@ -22,8 +22,8 @@ import com.intellij.execution.filters.FilterMixin;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.diff.DiffColors;
+import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
 import com.intellij.openapi.editor.Document;
-import com.intellij.openapi.editor.colors.CodeInsightColors;
 import com.intellij.openapi.editor.colors.EditorColorsManager;
 import com.intellij.openapi.editor.colors.EditorColorsScheme;
 import com.intellij.openapi.editor.markup.TextAttributes;
@@ -78,7 +78,7 @@ public class VcsContentAnnotationExceptionFilter implements Filter, FilterMixin
       final TextAttributes changedColor = globalScheme.getAttributes(DiffColors.DIFF_MODIFIED);
       if (source == null) {
         TextAttributes attrs =
-          globalScheme.getAttributes(CodeInsightColors.CLASS_NAME_ATTRIBUTES).clone();
+          globalScheme.getAttributes(DefaultLanguageHighlighterColors.CLASS_NAME).clone();
         attrs.setBackgroundColor(changedColor.getBackgroundColor());
         return attrs;
       }
index d01778daa26b3bd789da083bf7f9902471ac87d6..90b2acd8d4fa11d1047ac395cec0f8a1c7bbe4b9 100644 (file)
@@ -66,126 +66,174 @@ public interface HighlightInfoType {
     CodeInsightColors.DEPRECATED_ATTRIBUTES);
 
   HighlightSeverity SYMBOL_TYPE_SEVERITY = new HighlightSeverity("SYMBOL_TYPE_SEVERITY", HighlightSeverity.INFORMATION.myVal-2);
-  
-    /**
+
+  /**
    * @deprecated For Java use JavaHighlightInfoTypes.LOCAL_VARIABLE or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType LOCAL_VARIABLE = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.LOCAL_VARIABLE_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.INSTANCE_FIELD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType INSTANCE_FIELD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.INSTANCE_FIELD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.INSTANCE_FINAL_FIELD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType INSTANCE_FINAL_FIELD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.INSTANCE_FINAL_FIELD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.STATIC_FIELD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType STATIC_FIELD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.STATIC_FIELD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.STATIC_FINAL_FIELD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType STATIC_FINAL_FIELD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.STATIC_FINAL_FIELD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.PARAMETER or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType PARAMETER = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.PARAMETER_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.METHOD_CALL or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType METHOD_CALL = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.METHOD_CALL_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.METHOD_DECLARATION or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType METHOD_DECLARATION = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.METHOD_DECLARATION_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.CONSTRUCTOR_CALL or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType CONSTRUCTOR_CALL = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.CONSTRUCTOR_CALL_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.CONSTRUCTOR_DECLARATION or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType CONSTRUCTOR_DECLARATION = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.CONSTRUCTOR_DECLARATION_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.STATIC_METHOD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType STATIC_METHOD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.STATIC_METHOD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ABSTRACT_METHOD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ABSTRACT_METHOD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ABSTRACT_METHOD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.INHERITED_METHOD or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType INHERITED_METHOD = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.INHERITED_METHOD_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.CLASS_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType CLASS_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.CLASS_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ANONYMOUS_CLASS_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ANONYMOUS_CLASS_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ANONYMOUS_CLASS_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.INTERFACE_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings("deprecation")
+  @Deprecated
   HighlightInfoType INTERFACE_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.INTERFACE_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ENUM_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ENUM_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ENUM_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.TYPE_PARAMETER_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType TYPE_PARAMETER_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.TYPE_PARAMETER_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ABSTRACT_CLASS_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ABSTRACT_CLASS_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ABSTRACT_CLASS_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ANNOTATION_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ANNOTATION_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ANNOTATION_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.ANNOTATION_ATTRIBUTE_NAME or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType ANNOTATION_ATTRIBUTE_NAME = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.REASSIGNED_LOCAL_VARIABLE or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType REASSIGNED_LOCAL_VARIABLE = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.REASSIGNED_LOCAL_VARIABLE_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.REASSIGNED_PARAMETER or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType REASSIGNED_PARAMETER = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.REASSIGNED_PARAMETER_ATTRIBUTES);
   /**
    * @deprecated For Java use JavaHighlightInfoTypes.IMPLICIT_ANONYMOUS_CLASS_PARAMETER or create a language-specific HighlightInfoType. 
    * The field will be removed in version 17.
    */
+  @SuppressWarnings({"deprecation", "unused"})
+  @Deprecated
   HighlightInfoType IMPLICIT_ANONYMOUS_CLASS_PARAMETER = new HighlightInfoTypeImpl(SYMBOL_TYPE_SEVERITY, CodeInsightColors.IMPLICIT_ANONYMOUS_CLASS_PARAMETER_ATTRIBUTES);
 
   HighlightInfoType TODO = new HighlightInfoTypeImpl(HighlightSeverity.INFORMATION, CodeInsightColors.TODO_DEFAULT_ATTRIBUTES, false);  // these are default attributes, can be configured differently for specific patterns