boolean (@NotNull Set<String> elementDialectIds, @NotNull String toolLanguageId, boolean applyToDialects) { if (elementDialectIds.contains(toolLanguageId)) { return true; } Language language = Language.findLanguageByID(toolLanguageId); if (language == null) { // unknown language in plugin.xml, ignore return false; } if (language instanceof MetaLanguage metaLanguage) { return ContainerUtil.exists(metaLanguage.getMatchingLanguages(), registeredLanguage -> existsDialectOneOf(elementDialectIds, registeredLanguage, applyToDialects)); } return existsDialectOneOf(elementDialectIds, language, applyToDialects); }