FileType[] (@Nullable String mimeType) { final Collection<Language> languages = Language.findInstancesByMimeType(mimeType != null ? mimeType.trim() : null); FileType fileType = ContainerUtil.find(FileTypeManager.getInstance().getRegisteredFileTypes(), type -> type instanceof LanguageFileType && languages.contains(((LanguageFileType)type).getLanguage())); return fileType == null ? null : new FileType[]{fileType}; }