Access Editor from an action evoked from the Tool Window
已回答
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?
请先登录再写评论。
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