`ExternalAnnotator` addding a `HighlightSeverity.INFORMATION` doesn't appear in editor

Answered
holder.newAnnotation(HighlightSeverity.ERROR, "ERROR").range(TextRange.from(0, 1)).create()
holder.newAnnotation(HighlightSeverity.INFORMATION, "INFORMATION").range(TextRange.from(1, 1)).create()

When I look in the editor, there is the error, but that's it, the information is nowhere to be found. Or am I completely misunderstanding what "INFORMATION" means...

0
5 comments

Hi,

What do you expect to see in the editor? INFORMATION severity has no text attributes, so it won't be visible as a different color, underline, etc. When you move the cursor over the second character in the file, you will see the "INFORMATION" message.

1

Thanks! I am looking for an 'info' style annotation that is blue, exactly like this screenshot from vscode:

Is that possible in Idea?

0

Would something like this be the suggested approach?

holder.newAnnotation(HighlightSeverity.WEAK_WARNING, "this is some info")
.enforcedTextAttributes(TextAttributes().apply { effectType = EffectType.WAVE_UNDERSCORE; effectColor = JBColor.BLUE } )
.range(TextRange(0, 10))
.create()


Is it possible to set a custom icon? I don't want the triangle, I want a circle.

0

Please sign in to leave a comment.