Access Editor from an action evoked from the Tool Window
Answered
I want to call an Action from the ToolWindow (triggered by a JButton). Within the action I want to access the editor. How do I do this?
Please sign in to leave a comment.
How about `val fileEditorManager = FileEditorManager.getInstance(project)` ?
This is correct, please also check: https://plugins.jetbrains.com/docs/intellij/working-with-text.html#getting-an-instance-of-the-active-editor-from-an-action-event