How do I bring an existing editor to front?

Hi,

I have managed to create a custom editor for a certain file type. I manage to open the file with this editor. What I would now want to be able to do is whenever a file is already open, I would like to bring the open editor to front instead of opening a new instance of a file. How do I do this?

Janusz

2 comments
Comment actions Permalink

Hello Janusz,

I have managed to create a custom editor for a certain file type. I
manage to open the file with this editor. What I would now want to be
able to do is whenever a file is already open, I would like to bring
the open editor to front instead of opening a new instance of a file.
How do I do this?


You need to make sure that you don't have multiple VirtualFile instances
representing one "file" thing provided by your plugin.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks, that seems to be it. You have to also remember to set the second paramenetr of openFile() to 'true' to bring editor to front

0

Please sign in to leave a comment.