// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public class STTokenTypes {
// 
//     private static final List<TokenIElementType> TOKEN_ELEMENT_TYPES = PSIElementTypeFactory.getTokenIElementTypes(STLanguage.INSTANCE);
//     private static final List<RuleIElementType> RULE_ELEMENT_TYPES = PSIElementTypeFactory.getRuleIElementTypes(STLanguage.INSTANCE);
// 
//     public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//         return RULE_ELEMENT_TYPES.get(ruleIndex);
//     }
// 
//     public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//         return TOKEN_ELEMENT_TYPES.get(ruleIndex);
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//     return RULE_ELEMENT_TYPES.get(ruleIndex);
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//     return TOKEN_ELEMENT_TYPES.get(ruleIndex);
// }


import com.intellij.lang.ASTNode;
import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.util.PsiTreeUtil;
import org.antlr.jetbrains.st4plugin.parsing.STLexer;
import org.antlr.jetbrains.st4plugin.parsing.STParser;
import org.antlr.jetbrains.st4plugin.psi.STTokenTypes;
import org.jetbrains.annotations.NotNull;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getRuleElementType;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getTokenElementType;
package org.antlr.jetbrains.st4plugin.highlight;



/**
 * Semantic highlighting for .st files.
 */
public class STSemanticHighlightAnnotator implements Annotator {

    private static final TextAttributesKey ST_TAG = createTextAttributesKey("ST_TAG");
    public static final TextAttributesKey OPTION = createTextAttributesKey("ST_OPTION", DefaultLanguageHighlighterColors.INSTANCE_METHOD);

    @Override
    public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public class STTokenTypes {
// 
//     private static final List<TokenIElementType> TOKEN_ELEMENT_TYPES = PSIElementTypeFactory.getTokenIElementTypes(STLanguage.INSTANCE);
//     private static final List<RuleIElementType> RULE_ELEMENT_TYPES = PSIElementTypeFactory.getRuleIElementTypes(STLanguage.INSTANCE);
// 
//     public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//         return RULE_ELEMENT_TYPES.get(ruleIndex);
//     }
// 
//     public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//         return TOKEN_ELEMENT_TYPES.get(ruleIndex);
//     }
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = STParser.class) int ruleIndex) {
//     return RULE_ELEMENT_TYPES.get(ruleIndex);
// }
// 
// Path: src/main/java/org/antlr/jetbrains/st4plugin/psi/STTokenTypes.java
// public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = STLexer.class) int ruleIndex) {
//     return TOKEN_ELEMENT_TYPES.get(ruleIndex);
// }


// Path: src/main/java/org/antlr/jetbrains/st4plugin/highlight/STSemanticHighlightAnnotator.java
import com.intellij.lang.ASTNode;
import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.util.PsiTreeUtil;
import org.antlr.jetbrains.st4plugin.parsing.STLexer;
import org.antlr.jetbrains.st4plugin.parsing.STParser;
import org.antlr.jetbrains.st4plugin.psi.STTokenTypes;
import org.jetbrains.annotations.NotNull;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getRuleElementType;
import static org.antlr.jetbrains.st4plugin.psi.STTokenTypes.getTokenElementType;

package org.antlr.jetbrains.st4plugin.highlight;



/**
 * Semantic highlighting for .st files.
 */
public class STSemanticHighlightAnnotator implements Annotator {

    private static final TextAttributesKey ST_TAG = createTextAttributesKey("ST_TAG");
    public static final TextAttributesKey OPTION = createTextAttributesKey("ST_OPTION", DefaultLanguageHighlighterColors.INSTANCE_METHOD);

    @Override
    public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
        if (element.getNode().getElementType() == STTokenTypes.getTokenElementType(STLexer.ID)) {