Skip to content

Commit

Permalink
fix: Rename TextAttributesKey TOKEN to EXPLICIT_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-tom committed Jan 16, 2025
1 parent 6eccac3 commit 491ddbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/org/intellij/grammar/editor/BnfAnnotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ else if (resolve == null) {
if (RuleGraphHelper.getTokenNameToTextMap((BnfFile)refOrToken.getContainingFile()).containsKey(text)) {
annotationHolder.newSilentAnnotation(HighlightSeverity.INFORMATION)
.range(refOrToken)
.textAttributes(BnfSyntaxHighlighter.TOKEN)
.textAttributes(BnfSyntaxHighlighter.EXPLICIT_TOKEN)
.create();
} else {
annotationHolder.newSilentAnnotation(HighlightSeverity.INFORMATION)
Expand Down
4 changes: 2 additions & 2 deletions src/org/intellij/grammar/editor/BnfColorSettingsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class BnfColorSettingsPage implements ColorSettingsPage {
new AttributesDescriptor("String", STRING),
new AttributesDescriptor("Number", NUMBER),
new AttributesDescriptor("Keyword", KEYWORD),
new AttributesDescriptor("Token", TOKEN),
new AttributesDescriptor("Explicit token", EXPLICIT_TOKEN),
new AttributesDescriptor("Implicit token", IMPLICIT_TOKEN),
new AttributesDescriptor("Rule", RULE),
new AttributesDescriptor("Attribute", ATTRIBUTE),
Expand Down Expand Up @@ -114,7 +114,7 @@ public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMa
map.put("mr", META_RULE);
map.put("a", ATTRIBUTE);
map.put("pa", PATTERN);
map.put("t", TOKEN);
map.put("t", EXPLICIT_TOKEN);
map.put("it", IMPLICIT_TOKEN);
map.put("k", KEYWORD);
map.put("e", EXTERNAL);
Expand Down
2 changes: 1 addition & 1 deletion src/org/intellij/grammar/editor/BnfSyntaxHighlighter.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BnfSyntaxHighlighter extends SyntaxHighlighterBase {
public static final TextAttributesKey PATTERN = createTextAttributesKey("BNF_PATTERN", DefaultLanguageHighlighterColors.INSTANCE_FIELD);
public static final TextAttributesKey NUMBER = createTextAttributesKey("BNF_NUMBER", DefaultLanguageHighlighterColors.NUMBER);
public static final TextAttributesKey KEYWORD = createTextAttributesKey("BNF_KEYWORD", DefaultLanguageHighlighterColors.MARKUP_ATTRIBUTE);
public static final TextAttributesKey TOKEN = createTextAttributesKey("BNF_TOKEN", DefaultLanguageHighlighterColors.STRING);
public static final TextAttributesKey EXPLICIT_TOKEN = createTextAttributesKey("BNF_TOKEN", DefaultLanguageHighlighterColors.STRING);
public static final TextAttributesKey IMPLICIT_TOKEN = createTextAttributesKey("BNF_IMPLICIT_TOKEN", DefaultLanguageHighlighterColors.STATIC_FIELD);
public static final TextAttributesKey RULE = createTextAttributesKey("BNF_RULE", DefaultLanguageHighlighterColors.KEYWORD);
public static final TextAttributesKey META_RULE = createTextAttributesKey("BNF_META_RULE", DefaultLanguageHighlighterColors.KEYWORD);
Expand Down

0 comments on commit 491ddbf

Please sign in to comment.