FileChooserDescriptor () { return new FileChooserDescriptor(true, false, false, false, false, false) { @Override public boolean isFileSelectable(@Nullable VirtualFile file) { return file != null && (FileTypeRegistry.getInstance().isFileOfType(file, PatchFileType.INSTANCE) || FileTypeRegistry.getInstance().isFileOfType(file, FileTypes.PLAIN_TEXT)); } }; }