mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make some ReST highlighting attributes depend on Language Defaults (new API)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user