boolean (@NotNull VirtualFile file, @NotNull String mapping) { if (PlainTextLanguage.INSTANCE.getID().equals(mapping)) return true; FileType byName = FileTypeManager.getInstance().getFileTypeByFileName(file.getName()); Language language = LanguageUtil.getFileTypeLanguage(byName); return language != null && language.getID().equals(mapping); }