Two files but only one editor with two editor tabs

Not sure the title makes sense.  
I have built a plugin that installs my custom module and sets my source directories.  Inside these source directories I have two files that go together.  A.file and A.file.xml  A.file is the source code, and A.file.xml is a metadata configuration file for the source file.  I would like to click on the A.file and open an editor that has 2 tabs.  The source tab, will show the contents of A.file and allow me to edit it.  The metadata tab will show my customer editor which is just a properties type viewer that will save the contents to A.file.xml.  

I'm just not sure where/how to look to find examples of doing something like this.  If anyone has any info that would be greatly appreciated.


I think implementing and registering a com.intellij.openapi.fileEditor.FileEditorProvider instance for metadata editor should solve your problem.


I will try this, but I think this will give me an editor for the metadata file when I double click that file?  I have a fileeditor provider already for my source file.
I want to double click the source file, which opens up a tabbed editor that has two tabs at the bottom, one that editors the source file, the one I just clicked and one that edits the source files metadata file.  
I thought I've opened files before where this existed, the tabs at the bottom?  I guess I can do it in one editor myself, just thought there was a standard way.

The other thing I have to do is hide the metadata file in the project view?  Not sure how to do that yet.  If you have any thoughts on that it would be great, or I can ask another question for that one.


If you have two FileEditorProviders that accept the same file, their editors will be displayed with tabs at the bottom, the way you want it.


Thanks Dmitry,

Now that I think about it, it makes total sense. :)


Please sign in to leave a comment.