Question: How can i trigger highlight of all variable reference for variable under the caret (cursor) which was set manually with SelectionModel?
I create a plugin to count word-frequency and display it in JTable.When a row is clicked, it move the caret to the first instance of the word in the editor.
The problem is that the all of the reference to that variable is not highlighted (see Picture 1 below). This is different when I moved the caret manually to that variable (Picture 2).
I did that with this function
val caretModel: CaretModel = this.editor.caretModel
val selModel: SelectionModel = this.editor.selectionModel
Picture 1: Editor selection with `SelectionModel` and `caretModel` does not highlight all "variableName" instance
Picture 2: Manually move the caret to variableName highlight all variableName instance.