void () { Map<String, LanguageFileType> map = new HashMap<>(); for (FileType type : myFileTypeManager.getRegisteredFileTypes()) { if (!(type instanceof LanguageFileType languageFileType)) { continue; } if (!languageFileType.isSecondary()) { String id = languageFileType.getLanguage().getID(); LanguageFileType oldFileType = map.get(id); if (oldFileType != null) { fail("Multiple primary file types for language " + id + ": " + oldFileType.getName() + ", " + languageFileType.getName()); } map.put(id, languageFileType); } } }