How to select a tab for a file with multiple editor providers
I have a file which is accepted by several providers, hence the editors will show as distinct tabs at the bottom.
Is there a way to select one of these editors programmatically? I didn't find out how.
Additionally I found that the FileEditorState is not restoring the "selected tab" state, it always opens the tab of the first provider. What can I possibly do wrong here?
Appreciate any hint.
Please sign in to leave a comment.
Hello Dan,
No, there is no API for this. JIRA issue is welcome.
The FileEditorState cannot store the selected tab state, because it's a state
of a single editor and not of the entire tabbed editor stack. IDEA can store
the selected tab separately - one more JIRA issue is welcome for that.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hello Dmitry,
many thanks for the feedback. Have created http://www.jetbrains.net/jira/browse/IDEA-22628 and http://www.jetbrains.net/jira/browse/IDEA-22629.
I solved my problem with some ugly workarounds, but a proper api solution for this would be welcome.
Regards,
Dan
Hi Dan,
What is the workaround you used? Can you please share it.