Error stripes with ExternalAnnotator

I have an ExternalAnnotator reporting errors on certain TextRanges.
Even though the status indicator becomes red, showing the correct number of errors reported, they don't appear as error stripes over the marker bar (on the right).

Is there an easy way of doing it or should I explicitly maintain them with MarkupModel and RangeHighlighters? Are ExternalAnnotators are not intended to create these markers?

0
1 comment

After some digging, found 3 possible strategies:

- enforce text attributes (Annotation#setEnforcedTextAttributes) and we need to set everything manually (including error stripe color). This won't be configurable in a standard way and won't change based on used color scheme;
- rely on one of the default attributes by giving a key through CodeInsightColors to  Annotation#setTextAttributes;
- let Annotation#getTextAttributes decide it based on highlight type and severity, which can be set in the annotation;

The text attributes will end up pick up by something like HighlightInfo#getErrorStripeMarkColor.

0

Please sign in to leave a comment.