How can I invoke a plugin sction on a mouse click inside the editor?

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?

4 comments
Comment actions Permalink

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?

0
Comment actions Permalink

With selection I mean putting the caret/double click on a implemented Interface or abstract class. When doing this, an action should be invoked.

0
Comment actions Permalink

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.

1
Comment actions Permalink

Thanks. That brought me on the right way.

0

Please sign in to leave a comment.