How can I invoke a plugin sction on a mouse click inside the editor? Follow
Answered
I would like to create a plugin that reacts on the selection of an interface or parent class in the editor. So far, I didn't find a suitable action.
Which action or what approach could detect this condition and use it to trigge a plugin action?
Please sign in to leave a comment.
Please explain your use case a bit more. What exactly does "Selection" mean - putting cursor on class name? or explicit text selection in editor? What will happen afterwards?
With selection I mean putting the caret/double click on a implemented Interface or abstract class. When doing this, an action should be invoked.
See com.intellij.openapi.editor.event.CaretListener#caretPositionChanged for listening to caret position and/or com.intellij.openapi.editor.event.EditorMouseListener for listening to mouse events inside editor.
Thanks. That brought me on the right way.