in src/main/kotlin/com/github/mkartashev/hserr/toolwindow/HsErrToolWindowFactory.kt [545:573]
override fun mouseClicked(e: MouseEvent?) {
if (editor.isDisposed) return
if (!withinRange(start, end, editor)) return
removeHighlighters(editor)
editor.caretModel.moveToOffset(start)
editor.scrollingModel.scrollToCaret(ScrollType.MAKE_VISIBLE)
val attrs = TextAttributes(
null, null,
getHighlighterColor(),
EffectType.BOLD_DOTTED_LINE,
Font.PLAIN
)
for (loc in locations) {
val from = loc.start.offset
val to = loc.endInclusive.moveToNextChar().offset
if (withinRange(from, to, editor)) {
val h = editor.markupModel.addRangeHighlighter(
from, to,
HighlighterLayer.SELECTION,
attrs,
HighlighterTargetArea.EXACT_RANGE
)
h.errorStripeMarkColor = getHighlighterColor()
addHighlighter(editor, h)
}
}
}