private fun removeParserNotices(parser: Parser) { if (noticesToHighlights != null) { val h: RSyntaxTextAreaHighlighter = textArea.getHighlighter() as RSyntaxTextAreaHighlighter val i: MutableIterator<*> = noticesToHighlights.entrySet().iterator() while (i.hasNext()) { val (key, value) = i.next() as Map.Entry<*, *> val notice: ParserNotice = key as ParserNotice if (notice.getParser() === parser && value != null) { h.removeParserHighlight(value) i.remove() } } } }
Removes all parser notices ( and clears highlights in the editor ) from a particular parser .