List errors and warnings for Editor

How can I enumerate all the errors and warnings for a given editor?

I've poked around some of the methods in MarkupModelEx but haven't had much luck.

2 comments
Comment actions Permalink

you may take a look how traffic renderer works (upper right corner box which shows you how many errors, warning, etc there are): com.intellij.codeInsight.daemon.impl.TrafficLightRenderer#TrafficLightRenderer. It uses com.intellij.openapi.editor.markup.MarkupModel#getAllHighlighters and com.intellij.codeInsight.daemon.impl.TrafficLightRenderer#incErrorCount which detect the severity of available highliters.

Anna

0
Comment actions Permalink

I had already tried the MarkupModel but there were some casting tricks I wasn't using. The TrafficLightRenderer source was the key! Thanks!

0

Please sign in to leave a comment.