如何使编辑器活跃在Intellij插件开发中



我正在尝试为Intellij Idea编写插件。我需要为编辑器进行一些操纵,例如,导航到某些编辑器,使其活跃。我可以以这种方式获得所有编辑器:FileEditor[] editors = FileEditorManager.getInstance(e.getProject()).getAllEditors();那么,如何导航,例如,第一个编辑器editors[0]

这应该有效:

FileEditorManager.getInstance(project).openFile(editors[0].getFile(), true, true)

最新更新