* Adds an error indicate for the given compiler message.
* @param message the message to display an indicator for
*/
public void addErrorIndicator(CodeAnalyser.OffsetCompilerMessage message) {
ErrorOffset offset = getErrorOffset(message);
if (offset == null) {
return;
}
errorOffsets.add(offset);
sidePanel.repaint();
try {
Highlighter highlighter = getEditor().getHighlighter();
highlighter.addHighlight(offset.getStartOffset(), offset.getEndOffset(), new ErrorUnderlineHighlightPainter());
} catch (BadLocationException ex) {
throw new IllegalStateException("bad location adding highlight");
}
}