How to create new editor form tab like what happens in UI designer instead of multiple tabs at the bottom of the screen (possibly using fileEditorProvider)?

Hi everyone,

I'm just getting started on plugin development and made a very minimalist plugin. My understanding is that if you use FileEditorProvider, FileEditor.. and return the actual editor in the getComponent() method, the editor tab will be automatically added to every file type (or at least the ones you check and return true in the accept() method).

My question is.. how do I simply make a new tab appear in the top after clicking a menuItem/icon/something similar? I just need ONE new editor form to appear at the top, and not have two tabs at the bottom of every "accepted" file? (in essence very similar to what happens when you click "GUI Form" for the UI Designer plugin bundled with intellij community edition. (when you click on it: a java class gets created, and a form of the same name)

I had a look at the source code for the UI Designer plugin for the community edition, and it's not very clear how this is achieved... because in the plugin.xml, fileEditorProvider tag is also there.. but it doesn't seem to follow the expected behaviour?

Here's my very simple plugin if needed :) :


1 comment
Comment actions Permalink

Did you try returning com.intellij.openapi.fileEditor.FileEditorPolicy#HIDE_DEFAULT_EDITOR from com.intellij.javascript.trace.editor.TraceResultEditorProvider#getPolicy?


Please sign in to leave a comment.