How to remove all document highlighter
Answered
I have add document highlighters as below,
markupModel.addLineHighlighter(line, HighlighterLayer.WARNING, attributes)
and I keep list of all document which i have added highlighters. when i want to remove highlighters,
loop the document list and remove highlighters.
is there a way to remove all highlighters without keep tracking documents manually and looping.
Please sign in to leave a comment.
You can remove highlighter directly without needing a reference to document, by executing
i have added document highlighter, how can i get highlighter to parse.
You'll need to keep a reference to highlighter, returned by
addLineHighlighterits return RangeHighlighter and that is not disposable
Sorry, my bad. It's not an instance of Disposable indeed. But it has 'dispose' method anyway - just call it directly.
Its works. Thank you.