From e22e74047fc35386c72f635f548963626fbbc6b6 Mon Sep 17 00:00:00 2001 From: Rustam Vishnyakov Date: Fri, 1 Mar 2013 17:19:58 +0400 Subject: [PATCH] Make some ReST highlighting attributes depend on Language Defaults (new API) --- .../com/jetbrains/rest/RestSyntaxHighlighter.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/python/rest/src/com/jetbrains/rest/RestSyntaxHighlighter.java b/python/rest/src/com/jetbrains/rest/RestSyntaxHighlighter.java index a87463df3424..5d84b70b17f1 100644 --- a/python/rest/src/com/jetbrains/rest/RestSyntaxHighlighter.java +++ b/python/rest/src/com/jetbrains/rest/RestSyntaxHighlighter.java @@ -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(