Search in sources :

Example 1 with HighlightRange

use of com.intellij.tasks.youtrack.YouTrackIntellisense.HighlightRange in project intellij-community by JetBrains.

the class YouTrackHighlightingAnnotator method apply.

@Override
public void apply(@NotNull PsiFile file, List<HighlightRange> ranges, @NotNull AnnotationHolder holder) {
    for (HighlightRange range : ranges) {
        if (range.getStyleClass().equals("error")) {
            holder.createErrorAnnotation(range.getTextRange(), null);
        } else {
            final Annotation infoAnnotation = holder.createInfoAnnotation(range.getTextRange(), null);
            infoAnnotation.setEnforcedTextAttributes(range.getTextAttributes());
        }
    }
}
Also used : HighlightRange(com.intellij.tasks.youtrack.YouTrackIntellisense.HighlightRange) Annotation(com.intellij.lang.annotation.Annotation)

Aggregations

Annotation (com.intellij.lang.annotation.Annotation)1 HighlightRange (com.intellij.tasks.youtrack.YouTrackIntellisense.HighlightRange)1