diff --git a/RegExpSupport/src/org/intellij/lang/regexp/RegExpHighlighter.java b/RegExpSupport/src/org/intellij/lang/regexp/RegExpHighlighter.java index 759679e9b398..6c6000343260 100644 --- a/RegExpSupport/src/org/intellij/lang/regexp/RegExpHighlighter.java +++ b/RegExpSupport/src/org/intellij/lang/regexp/RegExpHighlighter.java @@ -20,7 +20,6 @@ import com.intellij.lexer.Lexer; import com.intellij.openapi.editor.HighlighterColors; import com.intellij.openapi.editor.SyntaxHighlighterColors; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.fileTypes.SyntaxHighlighterBase; import com.intellij.openapi.project.Project; import com.intellij.psi.StringEscapesTokenTypes; @@ -35,56 +34,56 @@ public class RegExpHighlighter extends SyntaxHighlighterBase { private static final Map keys1; private static final Map keys2; - static final TextAttributesKey META = TextAttributesKeyDefaults.createTextAttributesKey( + static final TextAttributesKey META = TextAttributesKey.createTextAttributesKey( "REGEXP.META", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD) - ); - static final TextAttributesKey INVALID_CHARACTER_ESCAPE = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.INVALID_STRING_ESCAPE", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.INVALID_STRING_ESCAPE) - ); - static final TextAttributesKey BAD_CHARACTER = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.BAD_CHARACTER", - TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.BAD_CHARACTER) - ); - static final TextAttributesKey REDUNDANT_ESCAPE = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.REDUNDANT_ESCAPE", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE) - ); - static final TextAttributesKey PARENTHS = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.PARENTHS", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.PARENTHS) - ); - static final TextAttributesKey BRACES = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.BRACES", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.BRACES) - ); - static final TextAttributesKey BRACKETS = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.BRACKETS", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.BRACKETS) - ); - static final TextAttributesKey COMMA = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.COMMA", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.COMMA) - ); - static final TextAttributesKey ESC_CHARACTER = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.ESC_CHARACTER", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE) - ); - static final TextAttributesKey CHAR_CLASS = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.CHAR_CLASS", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE) - ); - static final TextAttributesKey QUOTE_CHARACTER = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.QUOTE_CHARACTER", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE) - ); - static final TextAttributesKey COMMENT = TextAttributesKeyDefaults.createTextAttributesKey( - "REGEXP.COMMENT", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.LINE_COMMENT) + SyntaxHighlighterColors.KEYWORD.getDefaultAttributes() ); + static final TextAttributesKey INVALID_CHARACTER_ESCAPE = TextAttributesKey.createTextAttributesKey( + "REGEXP.INVALID_STRING_ESCAPE", + SyntaxHighlighterColors.INVALID_STRING_ESCAPE.getDefaultAttributes() + ); + static final TextAttributesKey BAD_CHARACTER = TextAttributesKey.createTextAttributesKey( + "REGEXP.BAD_CHARACTER", + HighlighterColors.BAD_CHARACTER.getDefaultAttributes() + ); + static final TextAttributesKey REDUNDANT_ESCAPE = TextAttributesKey.createTextAttributesKey( + "REGEXP.REDUNDANT_ESCAPE", + SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes() + ); + static final TextAttributesKey PARENTHS = TextAttributesKey.createTextAttributesKey( + "REGEXP.PARENTHS", + SyntaxHighlighterColors.PARENTHS.getDefaultAttributes() + ); + static final TextAttributesKey BRACES = TextAttributesKey.createTextAttributesKey( + "REGEXP.BRACES", + SyntaxHighlighterColors.BRACES.getDefaultAttributes() + ); + static final TextAttributesKey BRACKETS = TextAttributesKey.createTextAttributesKey( + "REGEXP.BRACKETS", + SyntaxHighlighterColors.BRACKETS.getDefaultAttributes() + ); + static final TextAttributesKey COMMA = TextAttributesKey.createTextAttributesKey( + "REGEXP.COMMA", + SyntaxHighlighterColors.COMMA.getDefaultAttributes() + ); + static final TextAttributesKey ESC_CHARACTER = TextAttributesKey.createTextAttributesKey( + "REGEXP.ESC_CHARACTER", + SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes() + ); + static final TextAttributesKey CHAR_CLASS = TextAttributesKey.createTextAttributesKey( + "REGEXP.CHAR_CLASS", + SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes() + ); + static final TextAttributesKey QUOTE_CHARACTER = TextAttributesKey.createTextAttributesKey( + "REGEXP.QUOTE_CHARACTER", + SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes() + ); + static final TextAttributesKey COMMENT = TextAttributesKey.createTextAttributesKey( + "REGEXP.COMMENT", + SyntaxHighlighterColors.LINE_COMMENT.getDefaultAttributes() + ); - private final Project myProject; + private final Project myProject; private final ParserDefinition myParserDefinition; public RegExpHighlighter(Project project, ParserDefinition parserDefinition) { diff --git a/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java b/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java index 8051cb043761..4dbd28c0f601 100644 --- a/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java +++ b/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java @@ -18,7 +18,6 @@ package com.intellij.application.options; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.application.ApplicationBundle; import com.intellij.openapi.editor.SyntaxHighlighterColors; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.psi.codeStyle.PackageEntry; import com.intellij.psi.codeStyle.PackageEntryTable; @@ -331,7 +330,7 @@ public abstract class ImportLayoutPanel extends JPanel { append(" ", SimpleTextAttributes.LINK_ATTRIBUTES); } else { - TextAttributes attributes = TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD); + TextAttributes attributes = SyntaxHighlighterColors.KEYWORD.getDefaultAttributes(); append("import", SimpleTextAttributes.fromTextAttributes(attributes)); if (entry.isStatic()) { append(" ", SimpleTextAttributes.REGULAR_ATTRIBUTES); diff --git a/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java b/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java index 981e9f5bd805..4f7c7391535d 100644 --- a/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java +++ b/platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -15,6 +15,7 @@ */ package com.intellij.openapi.editor.colors; +import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.util.DefaultJDOMExternalizer; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.util.JDOMExternalizable; @@ -29,9 +30,12 @@ import org.jetbrains.annotations.NotNull; * A type of item with a distinct highlighting in an editor or in other views. */ public final class TextAttributesKey implements Comparable, JDOMExternalizable { - public String myExternalName; + private static final TextAttributes NULL_ATTRIBUTES = new TextAttributes(); private static final ConcurrentHashMap ourRegistry = new ConcurrentHashMap(); + public String myExternalName; + public TextAttributes myDefaultAttributes = NULL_ATTRIBUTES; + private TextAttributesKey(String externalName) { myExternalName = externalName; } @@ -90,4 +94,42 @@ public final class TextAttributesKey implements Comparable, J public int hashCode() { return myExternalName.hashCode(); } + + /** + * Returns the default text attributes associated with the key. + * + * @return the text attributes. + */ + public TextAttributes getDefaultAttributes() { + if (myDefaultAttributes == NULL_ATTRIBUTES) { + // E.g. if one text key reuse default attributes of some other predefined key + myDefaultAttributes = null; + if (myDefaultsProvider != null) + myDefaultAttributes = myDefaultsProvider.getDefaultAttributes(this); + } + return myDefaultAttributes; + } + + /** + * Registers a text attribute key with the specified identifier and default attributes. + * + * @param externalName the unique identifier of the key. + * @param defaultAttributes the default text attributes associated with the key. + * @return the new key instance, or an existing instance if the key with the same + * identifier was already registered. + */ + @NotNull + public static TextAttributesKey createTextAttributesKey(@NonNls @NotNull String externalName, TextAttributes defaultAttributes) { + TextAttributesKey key = find(externalName); + if (key.myDefaultAttributes == null || key.myDefaultAttributes == NULL_ATTRIBUTES) { + key.myDefaultAttributes = defaultAttributes; + } + return key; + } + + public interface TextAttributeKeyDefaultsProvider { + TextAttributes getDefaultAttributes(TextAttributesKey key); + } + + public static TextAttributeKeyDefaultsProvider myDefaultsProvider; } diff --git a/platform/platform-api/src/com/intellij/openapi/editor/markup/AttributesFlyweight.java b/platform/core-api/src/com/intellij/openapi/editor/markup/AttributesFlyweight.java similarity index 100% rename from platform/platform-api/src/com/intellij/openapi/editor/markup/AttributesFlyweight.java rename to platform/core-api/src/com/intellij/openapi/editor/markup/AttributesFlyweight.java diff --git a/platform/platform-api/src/com/intellij/openapi/editor/markup/EffectType.java b/platform/core-api/src/com/intellij/openapi/editor/markup/EffectType.java similarity index 100% rename from platform/platform-api/src/com/intellij/openapi/editor/markup/EffectType.java rename to platform/core-api/src/com/intellij/openapi/editor/markup/EffectType.java diff --git a/platform/platform-api/src/com/intellij/openapi/editor/markup/TextAttributes.java b/platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java similarity index 100% rename from platform/platform-api/src/com/intellij/openapi/editor/markup/TextAttributes.java rename to platform/core-api/src/com/intellij/openapi/editor/markup/TextAttributes.java diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeveritiesProvider.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeveritiesProvider.java index d18af7811e80..becc52dc6afc 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeveritiesProvider.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeveritiesProvider.java @@ -31,7 +31,7 @@ public abstract class SeveritiesProvider { public static final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.severitiesProvider"); /** - * @see com.intellij.openapi.editor.colors.TextAttributesKeyDefaults#createTextAttributesKey(String, com.intellij.openapi.editor.markup.TextAttributes) + * @see com.intellij.openapi.editor.colors.TextAttributesKey#createTextAttributesKey(String, com.intellij.openapi.editor.markup.TextAttributes) */ public abstract List getSeveritiesHighlightInfoTypes(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java index fa97cc5d4043..c9051170c817 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SeverityRegistrar.java @@ -21,7 +21,6 @@ import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.project.Project; @@ -74,7 +73,7 @@ public class SeverityRegistrar implements JDOMExternalizable, Comparator ourMap = new ConcurrentHashMap(); - - /** - * Returns the default text attributes associated with the key. - * - * @return the text attributes. - * @param key - */ - - public static TextAttributes getDefaultAttributes(TextAttributesKey key) { - if (!ourMap.containsKey(key)) { - // E.g. if one text key reuse default attributes of some other predefined key - ourMap.put(key, NULL_ATTRIBUTES); - EditorColorsManager manager = EditorColorsManager.getInstance(); - - if (manager != null) { // Can be null in test mode - - // It is reasonable to fetch attributes from Default color scheme. Otherwise if we launch IDE and then - // try switch from custom colors scheme (e.g. with dark background) to default one. Editor will show - // incorrect highlighting with "traces" of color scheme which was active during IDE startup. - final EditorColorsScheme defaultColorScheme = manager.getScheme(EditorColorsScheme.DEFAULT_SCHEME_NAME); - final TextAttributes textAttributes = defaultColorScheme.getAttributes(key); - if (textAttributes != null) - ourMap.put(key, textAttributes); - } - } - - return ourMap.get(key); - } - - /** - * Registers a text attribute key with the specified identifier and default attributes. - * - * @param externalName the unique identifier of the key. - * @param defaultAttributes the default text attributes associated with the key. - * @return the new key instance, or an existing instance if the key with the same - * identifier was already registered. - */ - @NotNull - public static TextAttributesKey createTextAttributesKey(@NonNls @NotNull String externalName, TextAttributes defaultAttributes) { - TextAttributesKey key = TextAttributesKey.find(externalName); - if (!ourMap.containsKey(key) || ourMap.get(key) == NULL_ATTRIBUTES) { - ourMap.put(key, defaultAttributes == null ? NULL_ATTRIBUTES : defaultAttributes); - } - return key; - } -} diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java index 0decafbd764c..720ea714a256 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/DefaultColorsScheme.java @@ -22,7 +22,6 @@ package com.intellij.openapi.editor.colors.impl; import com.intellij.openapi.editor.colors.ColorKey; import com.intellij.openapi.editor.colors.EditorFontType; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.colors.ex.DefaultColorSchemesManager; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.util.InvalidDataException; @@ -41,7 +40,7 @@ public class DefaultColorsScheme extends AbstractColorsScheme implements ReadOnl public TextAttributes getAttributes(TextAttributesKey key) { if (key == null) return null; TextAttributes attrs = myAttributesMap.get(key); - return attrs != null ? attrs : TextAttributesKeyDefaults.getDefaultAttributes(key); + return attrs != null ? attrs : key.getDefaultAttributes(); } @Override diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java index ba744d6cea9f..4858726f3221 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java @@ -117,6 +117,17 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Name loadAllSchemes(); setGlobalScheme(myDefaultColorSchemesManager.getAllSchemes()[0]); + + TextAttributesKey.myDefaultsProvider = new TextAttributesKey.TextAttributeKeyDefaultsProvider() { + @Override + public TextAttributes getDefaultAttributes(TextAttributesKey key) { + // It is reasonable to fetch attributes from Default color scheme. Otherwise if we launch IDE and then + // try switch from custom colors scheme (e.g. with dark background) to default one. Editor will show + // incorrect highlighting with "traces" of color scheme which was active during IDE startup. + final EditorColorsScheme defaultColorScheme = getScheme(EditorColorsScheme.DEFAULT_SCHEME_NAME); + return defaultColorScheme.getAttributes(key); + } + }; } private void extendDefaultScheme() { diff --git a/plugins/android/src/org/jetbrains/android/logcat/AndroidLogcatConstants.java b/plugins/android/src/org/jetbrains/android/logcat/AndroidLogcatConstants.java index 0591ad23dfc2..9907632f22b1 100644 --- a/plugins/android/src/org/jetbrains/android/logcat/AndroidLogcatConstants.java +++ b/plugins/android/src/org/jetbrains/android/logcat/AndroidLogcatConstants.java @@ -18,8 +18,8 @@ package org.jetbrains.android.logcat; import com.intellij.execution.ui.ConsoleViewContentType; import static com.intellij.execution.ui.ConsoleViewContentType.registerNewConsoleViewType; + import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.util.Key; /** @@ -31,28 +31,22 @@ import com.intellij.openapi.util.Key; */ public class AndroidLogcatConstants { public static final TextAttributesKey VERBOSE_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_VERBOSE_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.NORMAL_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_VERBOSE_OUTPUT", ConsoleViewContentType.NORMAL_OUTPUT_KEY.getDefaultAttributes()); public static final TextAttributesKey DEBUG_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_DEBUG_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.NORMAL_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_DEBUG_OUTPUT", ConsoleViewContentType.NORMAL_OUTPUT_KEY.getDefaultAttributes()); public static final TextAttributesKey INFO_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_INFO_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.NORMAL_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_INFO_OUTPUT", ConsoleViewContentType.NORMAL_OUTPUT_KEY.getDefaultAttributes()); public static final TextAttributesKey WARNING_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_WARNING_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.SYSTEM_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_WARNING_OUTPUT", ConsoleViewContentType.SYSTEM_OUTPUT_KEY.getDefaultAttributes()); public static final TextAttributesKey ERROR_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_ERROR_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.ERROR_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_ERROR_OUTPUT", ConsoleViewContentType.ERROR_OUTPUT_KEY.getDefaultAttributes()); public static final TextAttributesKey ASSERT_OUTPUT_KEY = - TextAttributesKeyDefaults.createTextAttributesKey("LOGCAT_ASSERT_OUTPUT", TextAttributesKeyDefaults - .getDefaultAttributes(ConsoleViewContentType.ERROR_OUTPUT_KEY)); + TextAttributesKey.createTextAttributesKey("LOGCAT_ASSERT_OUTPUT", ConsoleViewContentType.ERROR_OUTPUT_KEY.getDefaultAttributes()); public static final Key VERBOSE = new Key("verbose.level.title"); public static final Key DEBUG = new Key("debug.level.title"); diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvshandlers/CvsMessagesConsole.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvshandlers/CvsMessagesConsole.java index d53ba9f8bf10..5bea41886dca 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvshandlers/CvsMessagesConsole.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvshandlers/CvsMessagesConsole.java @@ -22,10 +22,8 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.markup.EffectType; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.project.Project; -import com.intellij.util.ui.EditorAdapter; import java.awt.*; -import java.text.MessageFormat; /** * author: lesya diff --git a/plugins/gettext/src/com/jetbrains/gettext/highlighter/GetTextHighlighterData.java b/plugins/gettext/src/com/jetbrains/gettext/highlighter/GetTextHighlighterData.java index 7e0e12d6923e..376287a14d29 100644 --- a/plugins/gettext/src/com/jetbrains/gettext/highlighter/GetTextHighlighterData.java +++ b/plugins/gettext/src/com/jetbrains/gettext/highlighter/GetTextHighlighterData.java @@ -2,7 +2,6 @@ package com.jetbrains.gettext.highlighter; import com.intellij.openapi.editor.SyntaxHighlighterColors; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; /** * @author Svetlana.Zemlyanskaya @@ -11,29 +10,31 @@ public class GetTextHighlighterData { public static final String COMMENT_ID = "GET_TEXT_COMMENT"; public static final TextAttributesKey COMMENT = - TextAttributesKeyDefaults.createTextAttributesKey(COMMENT_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.LINE_COMMENT).clone()); + TextAttributesKey + .createTextAttributesKey(COMMENT_ID, SyntaxHighlighterColors.LINE_COMMENT.getDefaultAttributes().clone()); public static final String KEYWORD_ID = "GET_TEXT_KEYWORD"; public static final TextAttributesKey KEYWORD = - TextAttributesKeyDefaults.createTextAttributesKey(KEYWORD_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD).clone()); + TextAttributesKey.createTextAttributesKey(KEYWORD_ID, SyntaxHighlighterColors.KEYWORD.getDefaultAttributes().clone()); public static final String STRING_ID = "GET_TEXT_STRING"; public static final TextAttributesKey STRING = - TextAttributesKeyDefaults.createTextAttributesKey(STRING_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.STRING).clone()); + TextAttributesKey.createTextAttributesKey(STRING_ID, SyntaxHighlighterColors.STRING.getDefaultAttributes().clone()); public static final String FLAG_ID = "GET_TEXT_FLAG"; public static final TextAttributesKey FLAG = - TextAttributesKeyDefaults.createTextAttributesKey(FLAG_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.DOC_COMMENT_TAG).clone()); + TextAttributesKey + .createTextAttributesKey(FLAG_ID, SyntaxHighlighterColors.DOC_COMMENT_TAG.getDefaultAttributes().clone()); public static final String NUMBER_ID = "GET_TEXT_TRANSLATED_NUMBER"; public static final TextAttributesKey NUMBER = - TextAttributesKeyDefaults.createTextAttributesKey(NUMBER_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.NUMBER).clone()); + TextAttributesKey.createTextAttributesKey(NUMBER_ID, SyntaxHighlighterColors.NUMBER.getDefaultAttributes().clone()); public static final String BRACES_ID = "GET_TEXT_BRACES"; public static final TextAttributesKey BRACES = - TextAttributesKeyDefaults.createTextAttributesKey(BRACES_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.BRACES).clone()); + TextAttributesKey.createTextAttributesKey(BRACES_ID, SyntaxHighlighterColors.BRACES.getDefaultAttributes().clone()); public static final String DOTS_ID = "GET_TEXT_DOTS"; public static final TextAttributesKey DOTS = - TextAttributesKeyDefaults.createTextAttributesKey(DOTS_ID, TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.DOT).clone()); + TextAttributesKey.createTextAttributesKey(DOTS_ID, SyntaxHighlighterColors.DOT.getDefaultAttributes().clone()); } diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/config/GradleTextAttributes.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/config/GradleTextAttributes.java index df18259ee0f4..6df36d98e960 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/config/GradleTextAttributes.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/config/GradleTextAttributes.java @@ -1,7 +1,6 @@ package org.jetbrains.plugins.gradle.config; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.ui.Gray; @@ -22,7 +21,7 @@ public class GradleTextAttributes { *

* Example: particular dependency is added at the gradle side but not at the intellij. */ - public static final TextAttributesKey GRADLE_LOCAL_CHANGE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey GRADLE_LOCAL_CHANGE = TextAttributesKey.createTextAttributesKey( "GRADLE_LOCAL_CHANGE", new TextAttributes(new Color(130, 184, 22), null, null, null, Font.PLAIN) ); @@ -32,7 +31,7 @@ public class GradleTextAttributes { *

* Example: particular dependency is added at the intellij side but not at the gradle. */ - public static final TextAttributesKey INTELLIJ_LOCAL_CHANGE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey INTELLIJ_LOCAL_CHANGE = TextAttributesKey.createTextAttributesKey( "INTELLIJ_LOCAL_CHANGE", new TextAttributes(new Color(16, 102, 248), null, null, null, Font.PLAIN) ); @@ -43,7 +42,7 @@ public class GradleTextAttributes { * Example: particular module is renamed at the intellij, i.e. 'module.name' property has different (conflicting) * values at the gradle and the intellij. */ - public static final TextAttributesKey CHANGE_CONFLICT = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey CHANGE_CONFLICT = TextAttributesKey.createTextAttributesKey( "GRADLE_CHANGE_CONFLICT", new TextAttributes(new Color(238, 0, 0), null, null, null, Font.PLAIN) ); @@ -51,7 +50,7 @@ public class GradleTextAttributes { /** * References color to use for indication that particular setting has the same values at the gradle and intellij. */ - public static final TextAttributesKey NO_CHANGE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey NO_CHANGE = TextAttributesKey.createTextAttributesKey( "GRADLE_NO_CHANGE", new TextAttributes(Color.BLACK, null, null, null, Font.PLAIN) ); @@ -63,7 +62,7 @@ public class GradleTextAttributes { * Example: particular dummy module specific to the local environment is added at the intellij side but we don't want to propagate * that to the gradle side and don't want to see it during the project structures comparison. */ - public static final TextAttributesKey CONFIRMED_CONFLICT = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey CONFIRMED_CONFLICT = TextAttributesKey.createTextAttributesKey( "GRADLE_CONFIRMED_CONFLICT", new TextAttributes(Gray._140, null, null, null, Font.PLAIN) ); diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/DefaultHighlighter.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/DefaultHighlighter.java index c7677c5a45c0..723fd0f391e2 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/DefaultHighlighter.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/DefaultHighlighter.java @@ -21,7 +21,6 @@ import com.intellij.openapi.editor.HighlighterColors; import com.intellij.openapi.editor.SyntaxHighlighterColors; import com.intellij.openapi.editor.colors.CodeInsightColors; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.EffectType; import com.intellij.openapi.editor.markup.TextAttributes; import org.jetbrains.annotations.NonNls; @@ -91,192 +90,164 @@ public class DefaultHighlighter { static final String VALID_STRING_ESCAPE_ID = "Valid string escape"; static final String INVALID_STRING_ESCAPE_ID = "Invalid string escape"; - public static TextAttributesKey LINE_COMMENT = TextAttributesKeyDefaults.createTextAttributesKey(LINE_COMMENT_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.LINE_COMMENT)); + public static TextAttributesKey LINE_COMMENT = TextAttributesKey.createTextAttributesKey(LINE_COMMENT_ID, + SyntaxHighlighterColors.LINE_COMMENT + .getDefaultAttributes()); - public static TextAttributesKey ANNOTATION = TextAttributesKeyDefaults.createTextAttributesKey(ANNOTATION_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.ANNOTATION_NAME - .getAttributesKey())); + public static TextAttributesKey ANNOTATION = TextAttributesKey.createTextAttributesKey(ANNOTATION_ID, + HighlightInfoType.ANNOTATION_NAME + .getAttributesKey().getDefaultAttributes()); - public static TextAttributesKey LOCAL_VARIABLE = TextAttributesKeyDefaults.createTextAttributesKey("Groovy var", - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.LOCAL_VARIABLE - .getAttributesKey())); - public static TextAttributesKey REASSIGNED_LOCAL_VARIABLE = TextAttributesKeyDefaults.createTextAttributesKey("Groovy reassigned var", - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType - .REASSIGNED_LOCAL_VARIABLE - .getAttributesKey())); - public static TextAttributesKey PARAMETER = TextAttributesKeyDefaults.createTextAttributesKey("Groovy parameter", - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.PARAMETER - .getAttributesKey())); - public static TextAttributesKey REASSIGNED_PARAMETER = TextAttributesKeyDefaults.createTextAttributesKey("Groovy reassigned parameter", - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType - .REASSIGNED_PARAMETER - .getAttributesKey())); + public static TextAttributesKey LOCAL_VARIABLE = TextAttributesKey.createTextAttributesKey("Groovy var", + HighlightInfoType.LOCAL_VARIABLE + .getAttributesKey().getDefaultAttributes()); + public static TextAttributesKey REASSIGNED_LOCAL_VARIABLE = TextAttributesKey.createTextAttributesKey("Groovy reassigned var", + HighlightInfoType + .REASSIGNED_LOCAL_VARIABLE + .getAttributesKey() + .getDefaultAttributes()); + public static TextAttributesKey PARAMETER = TextAttributesKey.createTextAttributesKey("Groovy parameter", + HighlightInfoType.PARAMETER + .getAttributesKey().getDefaultAttributes()); + public static TextAttributesKey REASSIGNED_PARAMETER = TextAttributesKey.createTextAttributesKey("Groovy reassigned parameter", + HighlightInfoType + .REASSIGNED_PARAMETER + .getAttributesKey() + .getDefaultAttributes()); - public static TextAttributesKey METHOD_DECLARATION = TextAttributesKeyDefaults.createTextAttributesKey("Groovy method declaration", - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType - .METHOD_DECLARATION - .getAttributesKey())); + public static TextAttributesKey METHOD_DECLARATION = TextAttributesKey.createTextAttributesKey("Groovy method declaration", + HighlightInfoType + .METHOD_DECLARATION + .getAttributesKey() + .getDefaultAttributes()); - public static TextAttributesKey INSTANCE_FIELD = TextAttributesKeyDefaults.createTextAttributesKey(INSTANCE_FIELD_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.INSTANCE_FIELD - .getAttributesKey())); + public static TextAttributesKey INSTANCE_FIELD = TextAttributesKey.createTextAttributesKey(INSTANCE_FIELD_ID, + HighlightInfoType.INSTANCE_FIELD + .getAttributesKey().getDefaultAttributes()); - public static TextAttributesKey METHOD_CALL = TextAttributesKeyDefaults.createTextAttributesKey(METHOD_CALL_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.METHOD_CALL - .getAttributesKey())); + public static TextAttributesKey METHOD_CALL = TextAttributesKey.createTextAttributesKey(METHOD_CALL_ID, + HighlightInfoType.METHOD_CALL + .getAttributesKey().getDefaultAttributes()); - public static TextAttributesKey STATIC_FIELD = TextAttributesKeyDefaults.createTextAttributesKey(STATIC_FIELD_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType.STATIC_FIELD - .getAttributesKey())); + public static TextAttributesKey STATIC_FIELD = TextAttributesKey.createTextAttributesKey(STATIC_FIELD_ID, + HighlightInfoType.STATIC_FIELD + .getAttributesKey().getDefaultAttributes()); - public static TextAttributesKey STATIC_METHOD_ACCESS = TextAttributesKeyDefaults.createTextAttributesKey(STATIC_METHOD_ACCESS_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - HighlightInfoType - .STATIC_METHOD - .getAttributesKey())); + public static TextAttributesKey STATIC_METHOD_ACCESS = TextAttributesKey.createTextAttributesKey(STATIC_METHOD_ACCESS_ID, + HighlightInfoType + .STATIC_METHOD + .getAttributesKey() + .getDefaultAttributes()); - public static TextAttributesKey BLOCK_COMMENT = TextAttributesKeyDefaults.createTextAttributesKey(BLOCK_COMMENT_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.JAVA_BLOCK_COMMENT)); + public static TextAttributesKey BLOCK_COMMENT = TextAttributesKey.createTextAttributesKey(BLOCK_COMMENT_ID, + SyntaxHighlighterColors.JAVA_BLOCK_COMMENT + .getDefaultAttributes()); - public static TextAttributesKey DOC_COMMENT_CONTENT = TextAttributesKeyDefaults.createTextAttributesKey(DOC_COMMENT_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.DOC_COMMENT)); + public static TextAttributesKey DOC_COMMENT_CONTENT = TextAttributesKey.createTextAttributesKey(DOC_COMMENT_ID, + SyntaxHighlighterColors.DOC_COMMENT + .getDefaultAttributes()); - public static TextAttributesKey DOC_COMMENT_TAG = TextAttributesKeyDefaults.createTextAttributesKey(DOC_COMMENT_TAG_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.DOC_COMMENT_TAG)); + public static TextAttributesKey DOC_COMMENT_TAG = TextAttributesKey.createTextAttributesKey(DOC_COMMENT_TAG_ID, + SyntaxHighlighterColors.DOC_COMMENT_TAG + .getDefaultAttributes()); public static TextAttributesKey CLASS_REFERENCE = - TextAttributesKeyDefaults - .createTextAttributesKey(CLASS_REFERENCE_ID, TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT).clone()); + TextAttributesKey + .createTextAttributesKey(CLASS_REFERENCE_ID, HighlighterColors.TEXT.getDefaultAttributes().clone()); public static TextAttributesKey TYPE_PARAMETER = - TextAttributesKeyDefaults.createTextAttributesKey(TYPE_PARAMETER_ID, TextAttributesKeyDefaults - .getDefaultAttributes(CodeInsightColors.TYPE_PARAMETER_NAME_ATTRIBUTES).clone()); + TextAttributesKey.createTextAttributesKey(TYPE_PARAMETER_ID, CodeInsightColors.TYPE_PARAMETER_NAME_ATTRIBUTES.getDefaultAttributes() + .clone()); + + public static final TextAttributes INSTANCE_PROPERTY_REFERENCE_ATTRIBUTES = INSTANCE_FIELD.getDefaultAttributes().clone(); + public static final TextAttributes STATIC_PROPERTY_REFERENCE_ATTRIBUTES = STATIC_FIELD.getDefaultAttributes().clone(); - public static final TextAttributes INSTANCE_PROPERTY_REFERENCE_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(INSTANCE_FIELD).clone(); - public static final TextAttributes STATIC_PROPERTY_REFERENCE_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(STATIC_FIELD).clone(); static { INSTANCE_PROPERTY_REFERENCE_ATTRIBUTES.setFontType(Font.PLAIN); STATIC_PROPERTY_REFERENCE_ATTRIBUTES.setFontType(Font.ITALIC); } public static TextAttributesKey INSTANCE_PROPERTY_REFERENCE = - TextAttributesKeyDefaults.createTextAttributesKey(INSTANCE_PROPERTY_REFERENCE_ID, INSTANCE_PROPERTY_REFERENCE_ATTRIBUTES); + TextAttributesKey.createTextAttributesKey(INSTANCE_PROPERTY_REFERENCE_ID, INSTANCE_PROPERTY_REFERENCE_ATTRIBUTES); public static TextAttributesKey STATIC_PROPERTY_REFERENCE = - TextAttributesKeyDefaults.createTextAttributesKey(STATIC_PROPERTY_REFERENCE_ID, STATIC_PROPERTY_REFERENCE_ATTRIBUTES); + TextAttributesKey.createTextAttributesKey(STATIC_PROPERTY_REFERENCE_ID, STATIC_PROPERTY_REFERENCE_ATTRIBUTES); + + public static final TextAttributes KEYWORD_ATTRIBUTES = SyntaxHighlighterColors.KEYWORD.getDefaultAttributes().clone(); - public static final TextAttributes KEYWORD_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD).clone(); static{ KEYWORD_ATTRIBUTES.setForegroundColor(new Color(0, 0, 67)); KEYWORD_ATTRIBUTES.setFontType(Font.BOLD); } - public static TextAttributesKey KEYWORD = TextAttributesKeyDefaults + public static TextAttributesKey KEYWORD = TextAttributesKey .createTextAttributesKey("GROOVY_" + KEYWORD_ID.toUpperCase(), KEYWORD_ATTRIBUTES); - public static TextAttributesKey NUMBER = TextAttributesKeyDefaults.createTextAttributesKey(NUMBER_ID, - TextAttributesKeyDefaults.getDefaultAttributes( - SyntaxHighlighterColors.NUMBER)); + public static TextAttributesKey NUMBER = TextAttributesKey.createTextAttributesKey(NUMBER_ID, + SyntaxHighlighterColors.NUMBER.getDefaultAttributes()); - public static TextAttributesKey GSTRING = TextAttributesKeyDefaults.createTextAttributesKey(GSTRING_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.STRING)); + public static TextAttributesKey GSTRING = TextAttributesKey.createTextAttributesKey(GSTRING_ID, + SyntaxHighlighterColors.STRING.getDefaultAttributes()); - public static TextAttributesKey STRING = TextAttributesKeyDefaults.createTextAttributesKey(STRING_ID, - TextAttributesKeyDefaults.getDefaultAttributes( - SyntaxHighlighterColors.STRING)); + public static TextAttributesKey STRING = TextAttributesKey.createTextAttributesKey(STRING_ID, + SyntaxHighlighterColors.STRING.getDefaultAttributes()); - public static TextAttributesKey BRACES = TextAttributesKeyDefaults.createTextAttributesKey(BRACES_ID, - TextAttributesKeyDefaults.getDefaultAttributes( - SyntaxHighlighterColors.BRACES)); + public static TextAttributesKey BRACES = TextAttributesKey.createTextAttributesKey(BRACES_ID, + SyntaxHighlighterColors.BRACES.getDefaultAttributes()); - public static TextAttributesKey BRACKETS = TextAttributesKeyDefaults.createTextAttributesKey(BRACKETS_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.BRACKETS)); + public static TextAttributesKey BRACKETS = TextAttributesKey.createTextAttributesKey(BRACKETS_ID, + SyntaxHighlighterColors.BRACKETS + .getDefaultAttributes()); - public static TextAttributesKey PARENTHESES = TextAttributesKeyDefaults.createTextAttributesKey(PARENTHESES_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.PARENTHS)); + public static TextAttributesKey PARENTHESES = TextAttributesKey.createTextAttributesKey(PARENTHESES_ID, + SyntaxHighlighterColors.PARENTHS + .getDefaultAttributes()); - public static TextAttributesKey OPERATION_SIGN = TextAttributesKeyDefaults.createTextAttributesKey(OPERATION_SIGN_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.OPERATION_SIGN)); + public static TextAttributesKey OPERATION_SIGN = TextAttributesKey.createTextAttributesKey(OPERATION_SIGN_ID, + SyntaxHighlighterColors.OPERATION_SIGN + .getDefaultAttributes()); - public static TextAttributesKey BAD_CHARACTER = TextAttributesKeyDefaults.createTextAttributesKey(BAD_CHARACTER_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - CodeInsightColors.UNMATCHED_BRACE_ATTRIBUTES)); + public static TextAttributesKey BAD_CHARACTER = TextAttributesKey.createTextAttributesKey(BAD_CHARACTER_ID, + CodeInsightColors.UNMATCHED_BRACE_ATTRIBUTES + .getDefaultAttributes()); - public static TextAttributesKey WRONG_STRING = TextAttributesKeyDefaults.createTextAttributesKey(WRONG_STRING_ID, - TextAttributesKeyDefaults - .getDefaultAttributes( - SyntaxHighlighterColors.STRING)); + public static TextAttributesKey WRONG_STRING = TextAttributesKey.createTextAttributesKey(WRONG_STRING_ID, + SyntaxHighlighterColors.STRING + .getDefaultAttributes()); - public static final TextAttributes UNRESOLVED_ACCESS_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT).clone(); + public static final TextAttributes UNRESOLVED_ACCESS_ATTRIBUTES = HighlighterColors.TEXT.getDefaultAttributes().clone(); + static{ UNRESOLVED_ACCESS_ATTRIBUTES.setForegroundColor(Color.BLACK); UNRESOLVED_ACCESS_ATTRIBUTES.setEffectColor(Color.GRAY); UNRESOLVED_ACCESS_ATTRIBUTES.setEffectType(EffectType.LINE_UNDERSCORE); } - public static final TextAttributes LITERAL_CONVERSION_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT).clone(); + public static final TextAttributes LITERAL_CONVERSION_ATTRIBUTES = HighlighterColors.TEXT.getDefaultAttributes().clone(); + static{ LITERAL_CONVERSION_ATTRIBUTES.setForegroundColor(Color.BLUE); LITERAL_CONVERSION_ATTRIBUTES.setFontType(Font.BOLD); } - public static final TextAttributes MAP_KEY_ATTRIBUTES = TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT).clone(); + public static final TextAttributes MAP_KEY_ATTRIBUTES = HighlighterColors.TEXT.getDefaultAttributes().clone(); public static final Color MAP_KEY_COLOR = new Color(0, 128, 0); static { MAP_KEY_ATTRIBUTES.setForegroundColor(MAP_KEY_COLOR); } - public static TextAttributesKey UNRESOLVED_ACCESS = TextAttributesKeyDefaults + public static TextAttributesKey UNRESOLVED_ACCESS = TextAttributesKey .createTextAttributesKey(UNRESOLVED_ACCESS_ID, UNRESOLVED_ACCESS_ATTRIBUTES); - public static TextAttributesKey LITERAL_CONVERSION = TextAttributesKeyDefaults + public static TextAttributesKey LITERAL_CONVERSION = TextAttributesKey .createTextAttributesKey(LITERAL_CONVERSION_ID, LITERAL_CONVERSION_ATTRIBUTES); - public static TextAttributesKey MAP_KEY = TextAttributesKeyDefaults.createTextAttributesKey(MAP_KEY_ID, MAP_KEY_ATTRIBUTES); + public static TextAttributesKey MAP_KEY = TextAttributesKey.createTextAttributesKey(MAP_KEY_ID, MAP_KEY_ATTRIBUTES); public static final TextAttributesKey VALID_STRING_ESCAPE = - TextAttributesKeyDefaults.createTextAttributesKey(VALID_STRING_ESCAPE_ID, TextAttributesKeyDefaults - .getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE)); - public static final TextAttributesKey INVALID_STRING_ESCAPE = TextAttributesKeyDefaults - .createTextAttributesKey(INVALID_STRING_ESCAPE_ID, TextAttributesKeyDefaults - .getDefaultAttributes(SyntaxHighlighterColors.INVALID_STRING_ESCAPE)); + TextAttributesKey.createTextAttributesKey(VALID_STRING_ESCAPE_ID, SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes()); + public static final TextAttributesKey INVALID_STRING_ESCAPE = TextAttributesKey + .createTextAttributesKey(INVALID_STRING_ESCAPE_ID, SyntaxHighlighterColors.INVALID_STRING_ESCAPE.getDefaultAttributes()); private DefaultHighlighter() { } diff --git a/plugins/properties/src/com/intellij/lang/properties/PropertiesHighlighter.java b/plugins/properties/src/com/intellij/lang/properties/PropertiesHighlighter.java index 0702b12dc94a..f2240809edf7 100644 --- a/plugins/properties/src/com/intellij/lang/properties/PropertiesHighlighter.java +++ b/plugins/properties/src/com/intellij/lang/properties/PropertiesHighlighter.java @@ -20,7 +20,6 @@ import com.intellij.lang.properties.parsing.PropertiesTokenTypes; import com.intellij.lexer.Lexer; import com.intellij.openapi.editor.SyntaxHighlighterColors; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.fileTypes.SyntaxHighlighterBase; import com.intellij.openapi.options.OptionsBundle; import com.intellij.openapi.util.Pair; @@ -43,35 +42,32 @@ public class PropertiesHighlighter extends SyntaxHighlighterBase { return new PropertiesHighlightingLexer(); } - public static final TextAttributesKey PROPERTY_KEY = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTY_KEY = TextAttributesKey.createTextAttributesKey( "PROPERTIES.KEY", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD) + SyntaxHighlighterColors.KEYWORD.getDefaultAttributes() ); - public static final TextAttributesKey PROPERTY_VALUE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTY_VALUE = TextAttributesKey.createTextAttributesKey( "PROPERTIES.VALUE", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.STRING) + SyntaxHighlighterColors.STRING.getDefaultAttributes() ); - public static final TextAttributesKey PROPERTY_COMMENT = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTY_COMMENT = TextAttributesKey.createTextAttributesKey( "PROPERTIES.LINE_COMMENT", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.LINE_COMMENT) + SyntaxHighlighterColors.LINE_COMMENT.getDefaultAttributes() ); - public static final TextAttributesKey PROPERTY_KEY_VALUE_SEPARATOR = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTY_KEY_VALUE_SEPARATOR = TextAttributesKey.createTextAttributesKey( "PROPERTIES.KEY_VALUE_SEPARATOR", - TextAttributesKeyDefaults - .getDefaultAttributes(SyntaxHighlighterColors.OPERATION_SIGN) + SyntaxHighlighterColors.OPERATION_SIGN.getDefaultAttributes() ); - public static final TextAttributesKey PROPERTIES_VALID_STRING_ESCAPE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTIES_VALID_STRING_ESCAPE = TextAttributesKey.createTextAttributesKey( "PROPERTIES.VALID_STRING_ESCAPE", - TextAttributesKeyDefaults - .getDefaultAttributes(SyntaxHighlighterColors.VALID_STRING_ESCAPE) + SyntaxHighlighterColors.VALID_STRING_ESCAPE.getDefaultAttributes() ); - public static final TextAttributesKey PROPERTIES_INVALID_STRING_ESCAPE = TextAttributesKeyDefaults.createTextAttributesKey( + public static final TextAttributesKey PROPERTIES_INVALID_STRING_ESCAPE = TextAttributesKey.createTextAttributesKey( "PROPERTIES.INVALID_STRING_ESCAPE", - TextAttributesKeyDefaults - .getDefaultAttributes(SyntaxHighlighterColors.INVALID_STRING_ESCAPE) + SyntaxHighlighterColors.INVALID_STRING_ESCAPE.getDefaultAttributes() ); static { diff --git a/plugins/properties/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java b/plugins/properties/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java index f54ca3695cb4..b1eb6126bca0 100644 --- a/plugins/properties/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java +++ b/plugins/properties/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java @@ -27,7 +27,6 @@ import com.intellij.navigation.ColoredItemPresentation; import com.intellij.navigation.ItemPresentation; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.project.Project; import com.intellij.util.PlatformIcons; @@ -46,7 +45,7 @@ public class ResourceBundlePropertyStructureViewElement implements StructureView static { TextAttributes textAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(PropertiesHighlighter.PROPERTY_KEY).clone(); textAttributes.setForegroundColor(Color.red); - INCOMPLETE_PROPERTY_KEY = TextAttributesKeyDefaults.createTextAttributesKey("INCOMPLETE_PROPERTY_KEY", textAttributes); + INCOMPLETE_PROPERTY_KEY = TextAttributesKey.createTextAttributesKey("INCOMPLETE_PROPERTY_KEY", textAttributes); } public ResourceBundlePropertyStructureViewElement(final Project project, final ResourceBundle resourceBundle, String propertyName) { diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java b/plugins/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java index ef922f90de81..ccfd3f9c40ec 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/SpellCheckerSeveritiesProvider.java @@ -23,7 +23,7 @@ package com.intellij.spellchecker; import com.intellij.codeInsight.daemon.impl.HighlightInfoType; import com.intellij.codeInsight.daemon.impl.SeveritiesProvider; import com.intellij.lang.annotation.HighlightSeverity; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; +import com.intellij.openapi.editor.colors.TextAttributesKey; import com.intellij.openapi.editor.markup.EffectType; import com.intellij.openapi.editor.markup.TextAttributes; @@ -43,7 +43,7 @@ public class SpellCheckerSeveritiesProvider extends SeveritiesProvider { attributes.setEffectColor(new Color(0, 128, 0)); result.add(new HighlightInfoType.HighlightInfoTypeImpl(TYPO, - TextAttributesKeyDefaults.createTextAttributesKey("TYPO", attributes))); + TextAttributesKey.createTextAttributesKey("TYPO", attributes))); return result; } diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/XPathHighlighter.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/XPathHighlighter.java index 424428d9861b..151db93c6ffb 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/XPathHighlighter.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/XPathHighlighter.java @@ -20,7 +20,6 @@ import com.intellij.openapi.editor.HighlighterColors; import com.intellij.openapi.editor.SyntaxHighlighterColors; import com.intellij.openapi.editor.colors.CodeInsightColors; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.fileTypes.SyntaxHighlighterBase; import com.intellij.psi.tree.IElementType; import org.jetbrains.annotations.NotNull; @@ -45,62 +44,62 @@ public class XPathHighlighter extends SyntaxHighlighterBase { return XPathLexer.create(myXPath2Syntax); } - static final TextAttributesKey XPATH_KEYWORD = TextAttributesKeyDefaults.createTextAttributesKey( + static final TextAttributesKey XPATH_KEYWORD = TextAttributesKey.createTextAttributesKey( "XPATH.KEYWORD", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.KEYWORD) + SyntaxHighlighterColors.KEYWORD.getDefaultAttributes() ); - static final TextAttributesKey XPATH_STRING = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.STRING", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.STRING) - ); + static final TextAttributesKey XPATH_STRING = TextAttributesKey.createTextAttributesKey( + "XPATH.STRING", + SyntaxHighlighterColors.STRING.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_NUMBER = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.NUMBER", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.NUMBER) - ); + static final TextAttributesKey XPATH_NUMBER = TextAttributesKey.createTextAttributesKey( + "XPATH.NUMBER", + SyntaxHighlighterColors.NUMBER.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_OPERATION_SIGN = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.OPERATION_SIGN", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.OPERATION_SIGN) - ); + static final TextAttributesKey XPATH_OPERATION_SIGN = TextAttributesKey.createTextAttributesKey( + "XPATH.OPERATION_SIGN", + SyntaxHighlighterColors.OPERATION_SIGN.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_PARENTH = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.PARENTH", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.PARENTHS) - ); + static final TextAttributesKey XPATH_PARENTH = TextAttributesKey.createTextAttributesKey( + "XPATH.PARENTH", + SyntaxHighlighterColors.PARENTHS.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_BRACKET = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.BRACKET", - TextAttributesKeyDefaults.getDefaultAttributes(SyntaxHighlighterColors.BRACKETS) - ); + static final TextAttributesKey XPATH_BRACKET = TextAttributesKey.createTextAttributesKey( + "XPATH.BRACKET", + SyntaxHighlighterColors.BRACKETS.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_FUNCTION = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.FUNCTION", - TextAttributesKeyDefaults.getDefaultAttributes(CodeInsightColors.STATIC_METHOD_ATTRIBUTES) - ); + static final TextAttributesKey XPATH_FUNCTION = TextAttributesKey.createTextAttributesKey( + "XPATH.FUNCTION", + CodeInsightColors.STATIC_METHOD_ATTRIBUTES.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_VARIABLE = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.XPATH_VARIABLE", - TextAttributesKeyDefaults.getDefaultAttributes(CodeInsightColors.INSTANCE_FIELD_ATTRIBUTES) - ); + static final TextAttributesKey XPATH_VARIABLE = TextAttributesKey.createTextAttributesKey( + "XPATH.XPATH_VARIABLE", + CodeInsightColors.INSTANCE_FIELD_ATTRIBUTES.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_PREFIX = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.XPATH_PREFIX", - TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT) - ); + static final TextAttributesKey XPATH_PREFIX = TextAttributesKey.createTextAttributesKey( + "XPATH.XPATH_PREFIX", + HighlighterColors.TEXT.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_NAME = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.XPATH_NAME", - TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT) - ); + static final TextAttributesKey XPATH_NAME = TextAttributesKey.createTextAttributesKey( + "XPATH.XPATH_NAME", + HighlighterColors.TEXT.getDefaultAttributes() + ); - static final TextAttributesKey XPATH_TEXT = TextAttributesKeyDefaults.createTextAttributesKey( - "XPATH.XPATH_TEXT", - TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT) - ); + static final TextAttributesKey XPATH_TEXT = TextAttributesKey.createTextAttributesKey( + "XPATH.XPATH_TEXT", + HighlighterColors.TEXT.getDefaultAttributes() + ); - static { + static { keys1 = new HashMap(); keys2 = new HashMap(); diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/BaseIntroduceAction.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/BaseIntroduceAction.java index 061d5b36cc0d..bfac2ba62c55 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/BaseIntroduceAction.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/BaseIntroduceAction.java @@ -21,7 +21,6 @@ import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.SelectionModel; import com.intellij.openapi.editor.colors.EditorColors; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.RangeHighlighter; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; @@ -111,12 +110,12 @@ public abstract class BaseIntroduceAction e final ArrayList highlighters = new ArrayList(matchingExpressions.size() + 1); if (matchingExpressions.size() > 0) { final SelectionModel selectionModel = editor.getSelectionModel(); - highlightManager.addRangeHighlight(editor, selectionModel.getSelectionStart(), selectionModel.getSelectionEnd(), TextAttributesKeyDefaults - .getDefaultAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES), false, highlighters); + highlightManager.addRangeHighlight(editor, selectionModel.getSelectionStart(), selectionModel.getSelectionEnd(), + EditorColors.SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes(), false, highlighters); for (XPathExpression expr : matchingExpressions) { final TextRange range = XsltCodeInsightUtil.getRangeInsideHostingFile(expr); - highlightManager.addRangeHighlight(editor, range.getStartOffset(), range.getEndOffset(), TextAttributesKeyDefaults - .getDefaultAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES), false, highlighters); + highlightManager.addRangeHighlight(editor, range.getStartOffset(), range.getEndOffset(), + EditorColors.SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes(), false, highlighters); final XmlTag tag = PsiTreeUtil.getContextOfType(expr, XmlTag.class, true); assert tag != null; diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/VariableInlineHandler.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/VariableInlineHandler.java index 3b263b0b5d8e..8c8d5fc55de9 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/VariableInlineHandler.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/refactoring/VariableInlineHandler.java @@ -27,7 +27,6 @@ import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.colors.EditorColors; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; import com.intellij.openapi.editor.markup.RangeHighlighter; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.project.Project; @@ -165,14 +164,14 @@ public class VariableInlineHandler extends InlineActionHandler { }); final Editor e = editor instanceof EditorWindow ? ((EditorWindow)editor).getDelegate() : editor; for (TextRange range : ranges) { - final TextAttributes textAttributes = TextAttributesKeyDefaults.getDefaultAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES); + final TextAttributes textAttributes = EditorColors.SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes(); final Color color = getScrollmarkColor(textAttributes); highlighter.addOccurrenceHighlight(e, range.getStartOffset(), range.getEndOffset(), textAttributes, HighlightManagerImpl.HIDE_BY_ESCAPE, highlighters, color); } highlighter.addOccurrenceHighlights(e, new PsiElement[]{((XsltVariable)variable).getNameIdentifier()}, - TextAttributesKeyDefaults.getDefaultAttributes(EditorColors.WRITE_SEARCH_RESULT_ATTRIBUTES), false, highlighters); + EditorColors.WRITE_SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes(), false, highlighters); if (!hasExternalRefs) { if (!ApplicationManager.getApplication().isUnitTestMode() && diff --git a/xml/openapi/src/com/intellij/openapi/editor/XmlHighlighterColors.java b/xml/openapi/src/com/intellij/openapi/editor/XmlHighlighterColors.java index b43e0222d7eb..17d1e1cc90bc 100644 --- a/xml/openapi/src/com/intellij/openapi/editor/XmlHighlighterColors.java +++ b/xml/openapi/src/com/intellij/openapi/editor/XmlHighlighterColors.java @@ -16,7 +16,6 @@ package com.intellij.openapi.editor; import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.colors.TextAttributesKeyDefaults; /** * @author yole @@ -25,22 +24,34 @@ public class XmlHighlighterColors { private XmlHighlighterColors() { } - public static final TextAttributesKey XML_PROLOGUE = TextAttributesKey.createTextAttributesKey("XML_PROLOGUE"); - public static final TextAttributesKey XML_COMMENT = TextAttributesKey.createTextAttributesKey("XML_COMMENT"); - public static final TextAttributesKey XML_TAG = TextAttributesKey.createTextAttributesKey("XML_TAG"); - public static final TextAttributesKey XML_TAG_NAME = TextAttributesKey.createTextAttributesKey("XML_TAG_NAME"); - public static final TextAttributesKey XML_ATTRIBUTE_NAME = TextAttributesKey.createTextAttributesKey("XML_ATTRIBUTE_NAME"); - public static final TextAttributesKey XML_ATTRIBUTE_VALUE = TextAttributesKey.createTextAttributesKey("XML_ATTRIBUTE_VALUE"); - public static final TextAttributesKey XML_TAG_DATA = TextAttributesKey.createTextAttributesKey("XML_TAG_DATA"); - public static final TextAttributesKey XML_ENTITY_REFERENCE = TextAttributesKey.createTextAttributesKey("XML_ENTITY_REFERENCE"); + public static final TextAttributesKey + XML_PROLOGUE = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_PROLOGUE"); + public static final TextAttributesKey + XML_COMMENT = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_COMMENT"); + public static final TextAttributesKey XML_TAG = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_TAG"); + public static final TextAttributesKey + XML_TAG_NAME = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_TAG_NAME"); + public static final TextAttributesKey + XML_ATTRIBUTE_NAME = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_ATTRIBUTE_NAME"); + public static final TextAttributesKey + XML_ATTRIBUTE_VALUE = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_ATTRIBUTE_VALUE"); + public static final TextAttributesKey + XML_TAG_DATA = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_TAG_DATA"); + public static final TextAttributesKey + XML_ENTITY_REFERENCE = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("XML_ENTITY_REFERENCE"); - public static final TextAttributesKey HTML_COMMENT = TextAttributesKey.createTextAttributesKey("HTML_COMMENT"); - public static final TextAttributesKey HTML_TAG = TextAttributesKey.createTextAttributesKey("HTML_TAG"); - public static final TextAttributesKey HTML_TAG_NAME = TextAttributesKey.createTextAttributesKey("HTML_TAG_NAME"); - public static final TextAttributesKey HTML_ATTRIBUTE_NAME = TextAttributesKey.createTextAttributesKey("HTML_ATTRIBUTE_NAME"); - public static final TextAttributesKey HTML_ATTRIBUTE_VALUE = TextAttributesKey.createTextAttributesKey("HTML_ATTRIBUTE_VALUE"); - public static final TextAttributesKey HTML_ENTITY_REFERENCE = TextAttributesKey.createTextAttributesKey("HTML_ENTITY_REFERENCE"); + public static final TextAttributesKey + HTML_COMMENT = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_COMMENT"); + public static final TextAttributesKey HTML_TAG = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_TAG"); + public static final TextAttributesKey + HTML_TAG_NAME = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_TAG_NAME"); + public static final TextAttributesKey + HTML_ATTRIBUTE_NAME = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_ATTRIBUTE_NAME"); + public static final TextAttributesKey + HTML_ATTRIBUTE_VALUE = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_ATTRIBUTE_VALUE"); + public static final TextAttributesKey + HTML_ENTITY_REFERENCE = com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey("HTML_ENTITY_REFERENCE"); public static final TextAttributesKey HTML_CODE = - TextAttributesKeyDefaults.createTextAttributesKey("HTML_CODE", TextAttributesKeyDefaults.getDefaultAttributes(HighlighterColors.TEXT)); + TextAttributesKey.createTextAttributesKey("HTML_CODE", HighlighterColors.TEXT.getDefaultAttributes()); }