FileEditorManager.openTextEditor no longer opens in existing split


In my plugin, I sometimes open a file like this:

FileEditorManager.getInstance(project).openTextEditor(OpenFileDescriptor(project, virtualFile, offset), true)

Previously, with Editor Tabs set to None, this would select the editor in an existing splitter if one were open on the file I request. In 2019.3 it no longer does that, and opens the file in the current splitter instead. Is this a bug, or is there some way to request the previous behaviour in the OpenFileDescriptor?

I found an issue that sounds relevant: IDEA-222562, there are a bunch of related issues there as well but I'm not sure what the final state of this is in 2019.3.

1 comment
Comment actions Permalink

Hello! Previous behaviour was confusing in some real use-cases. When you have two 'sides' with open editors and tabs all are hidden it's more convenient to use focused 'side' in navigation. Otherwise part of navigation uses current 'side' and other part of navigation pretty suddenly opens file in opposite 'side' just because you accidentally left some certain file there a week ago. It's really confusing situation when you cannot predict what's going to happen next so the rule is unified now.


Please sign in to leave a comment.