IDEA-248869 [json] Declare separate color scheme setting for parameter

Fix i18n related inspections

GitOrigin-RevId: df1355e1db09fa7332e8d7f29d5ca9599cc744bf
This commit is contained in:
Daniil Tsaryov
2022-02-17 15:49:39 +03:00
committed by intellij-monorepo-bot
parent 974e571994
commit 2aa1f0f2be
3 changed files with 21 additions and 18 deletions

View File

@@ -136,11 +136,12 @@ color.page.attribute.colon=Colon
color.page.attribute.comma=Comma
color.page.attribute.brackets=Brackets
color.page.attribute.braces=Braces
color.page.attribute.block.comment=Block Comment
color.page.attribute.line.comment=Line Comment
color.page.attribute.property.key=Property Key
color.page.attribute.invalid.escape.sequence=Invalid Escape Sequence
color.page.attribute.valid.escape.sequence=Valid Escape Sequence
color.page.attribute.block.comment=Block comment
color.page.attribute.line.comment=Line comment
color.page.attribute.property.key=Property key
color.page.attribute.invalid.escape.sequence=Invalid escape sequence
color.page.attribute.valid.escape.sequence=Valid escape sequence
color.page.attribute.parameter=Parameter
jsonpath.color.page.keyword=Keyword
jsonpath.color.page.identifier=Identifier

View File

@@ -28,20 +28,20 @@ public class JsonColorsPage implements RainbowColorSettingsPage, DisplayPriority
private static final Map<String, TextAttributesKey> ourAdditionalHighlighting = ImmutableMap.of("propertyKey", JSON_PROPERTY_KEY);
private static final AttributesDescriptor[] ourAttributeDescriptors = new AttributesDescriptor[]{
new AttributesDescriptor(JsonBundle.message("color.page.attribute.property.key"), JSON_PROPERTY_KEY),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.property.key"), JSON_PROPERTY_KEY),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.braces"), JSON_BRACES),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.brackets"), JSON_BRACKETS),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.comma"), JSON_COMMA),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.colon"), JSON_COLON),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.number"), JSON_NUMBER),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.string"), JSON_STRING),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.keyword"), JSON_KEYWORD),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.line.comment"), JSON_LINE_COMMENT),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.block.comment"), JSON_BLOCK_COMMENT),
//new AttributesDescriptor("", JSON_IDENTIFIER),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.valid.escape.sequence"), JSON_VALID_ESCAPE),
new AttributesDescriptor(JsonBundle.message("color.page.attribute.invalid.escape.sequence"), JSON_INVALID_ESCAPE),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.braces"), JSON_BRACES),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.brackets"), JSON_BRACKETS),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.comma"), JSON_COMMA),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.colon"), JSON_COLON),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.number"), JSON_NUMBER),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.string"), JSON_STRING),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.keyword"), JSON_KEYWORD),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.line.comment"), JSON_LINE_COMMENT),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.block.comment"), JSON_BLOCK_COMMENT),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.valid.escape.sequence"), JSON_VALID_ESCAPE),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.invalid.escape.sequence"), JSON_INVALID_ESCAPE),
new AttributesDescriptor(JsonBundle.messagePointer("color.page.attribute.parameter"), JSON_PARAMETER)
};
@Nullable

View File

@@ -63,6 +63,8 @@ public class JsonSyntaxHighlighterFactory extends SyntaxHighlighterFactory {
public static final TextAttributesKey JSON_INVALID_ESCAPE =
TextAttributesKey.createTextAttributesKey("JSON.INVALID_ESCAPE", INVALID_STRING_ESCAPE);
public static final TextAttributesKey JSON_PARAMETER = TextAttributesKey.createTextAttributesKey("JSON.PARAMETER", KEYWORD);
@NotNull
@Override