Make some ReST highlighting attributes depend on Language Defaults (new API)

This commit is contained in:
Rustam Vishnyakov
2013-03-01 17:20:43 +04:00
parent 778edafb91
commit e22e74047f
@@ -18,6 +18,7 @@ package com.jetbrains.rest;
import com.google.common.collect.Maps;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.SyntaxHighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.markup.TextAttributes;
@@ -35,12 +36,12 @@ import java.util.Map;
public class RestSyntaxHighlighter extends SyntaxHighlighterBase implements RestTokenTypes {
public static final TextAttributesKey REST_COMMENT = TextAttributesKey.createTextAttributesKey(
"REST.LINE_COMMENT",
SyntaxHighlighterColors.LINE_COMMENT.getDefaultAttributes()
DefaultLanguageHighlighterColors.LINE_COMMENT
);
public static final TextAttributesKey REST_SECTION_HEADER = TextAttributesKey.createTextAttributesKey(
"REST.SECTION.HEADER",
SyntaxHighlighterColors.NUMBER.getDefaultAttributes()
DefaultLanguageHighlighterColors.NUMBER
);
public static final TextAttributesKey REST_BOLD = TextAttributesKey.createTextAttributesKey(
@@ -58,21 +59,21 @@ public class RestSyntaxHighlighter extends SyntaxHighlighterBase implements Rest
public static final TextAttributesKey REST_INTERPRETED = TextAttributesKey.createTextAttributesKey(
"REST.INTERPRETED",
new TextAttributes(Color.black, new Color(202, 218, 186), null, null, Font.PLAIN)
DefaultLanguageHighlighterColors.TEMPLATE_LANGUAGE_COLOR
);
public static final TextAttributesKey REST_REF_NAME = TextAttributesKey.createTextAttributesKey(
"REST.REF.NAME",
SyntaxHighlighterColors.STRING.getDefaultAttributes()
DefaultLanguageHighlighterColors.STRING
);
public static final TextAttributesKey REST_EXPLICIT= TextAttributesKey.createTextAttributesKey(
"REST.EXPLICIT",
SyntaxHighlighterColors.KEYWORD.getDefaultAttributes()
DefaultLanguageHighlighterColors.KEYWORD
);
public static final TextAttributesKey REST_FIELD = TextAttributesKey.createTextAttributesKey(
"REST.FIELD",
SyntaxHighlighterColors.KEYWORD.getDefaultAttributes()
DefaultLanguageHighlighterColors.INSTANCE_FIELD
);
public static final TextAttributesKey REST_INLINE = TextAttributesKey.createTextAttributesKey(