How to register new FileEditorProvider in system?
What I want to do is creating new editor for the file of special extension.
For that I need Intellij recognize this file when trying to open it in openFileImpl4() function.
FileEditorProviderManagerImpl class has only private methods of registering providers.
Many thanks in advance
Please sign in to leave a comment.
FileEditorProvider implementations are registered via Extension Point with name com.intellij.openapi.fileEditor.FileEditorProvider#EP_FILE_EDITOR_PROVIDER
See https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+Plugin+Structure
Am I right that you mean the following:
add to the plugin.xml file:
interface="com.intellij.openapi.fileEditor.MyFileEditorProvider"/>
Or not?
Could you please prove a snippet of code?
There are many samples in IntelliJ Community Edition source code
for example, org.intellij.images.editor.impl.ImageFileEditorProvider which is registered in images/src/META-INF/ImagesPlugin.xml