Error annotation clears text attributes


I have been using an annotator to do semantic coloring for a while, but recently decided to update my plugins base IDE version to IDEA 2020. I was getting deprecation warnings on my annotator, so I switched over to the annotation builder API.

The problem I've run into is when a normal error annotation is created by another annotator, it strips the coloring from the element, giving just the default highlighting. The element itself is made up of smaller PSI elements, so the individual elements show up with their default coloring, not the one solid color I had set.

Is there a way to use the builder API, and keep text attributes from one annotator while error highlighting with another. I would think the error highlighter would just add the red underline, not strip all colors.

I have even tried to recursively color all child elements, but this has failed too.

I have tried `order="first"` and `order="last"`. I have also tried using a ASTNode, a psi element, and text range for the annotators range value

Without the error annotation, coloring works just fine.

Please sign in to leave a comment.