How to open document in the editor?

Answered

Hello.

I would like my plugin to be able to open a file in the editor and make it the current document, if it's not already open. If it's already open, then just make it the current document (if it's not).

In other words, I need to execute the following actions:

1. Check if a file is already open in the editor.

2. Make a file the current document in the editor.

I searched the documentation, but I couldn't find information about open documents in the editor and how to execute the above actions. Any help would be greatly appreciated.

1 comment
Comment actions Permalink

Hi,

Please see: com.intellij.openapi.fileEditor.OpenFileDescriptor

0

Please sign in to leave a comment.