private static FileType[] findFileType(@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};
  }
private static FileType[] findFileType(@Nullable String mimeType)