Should i show File type association dialog at first time?

I develop a IntelliJ plugin with file type (with *.abc extension) and File type factory show customized Editor.

My project contains:

  • AbcEditorProvider implements FileEditorProvider, PossiblyDumbAware
  • AbcEditor implements FileEditor
  • AbcFileTypeFactory extends com.intellij.openapi.fileTypes.FileTypeFactory
  • AbcLanguage extends Language
  • AbcFileType extends LanguageFileType implements FileTypeIdentifiableByVirtualFile


I created custom File editor page with form editor, and set as :

public FileEditorPolicy getPolicy() {
return FileEditorPolicy.HIDE_DEFAULT_EDITOR;

So, when double-click in Tree viewer in ToolWindow at the FIRST TIME,

IntelliJ (or Android Studio) shows Register New File Type Association dialog..!


I my custom editor, I modify file content with document instance, this instance is from VirtualFile instance as:

  • Document document = FileDocumentManager.getInstance().getDocument(file); 


BUT, in the dialog (i described before, Register New File Type Association dialog) , i did not select Text-like format, 

the document instance from getDocument(file) function is NULL....

(If user select "Text" in Register New File Type Association dialog, it returns not null instance)


If i set File association programatically,

IntelliJ platform will not show Register New File Type Association dialog even at the first time. Is this available?

(programatically set as 'Text' , so it will not show that dialog)





Please sign in to leave a comment.