private void clearCacheForDerivedLanguages(@NotNull Language language) {
    for (Language dialect : ContainerUtil.concat(language.getTransitiveDialects(), Collections.singletonList(language))) {
      clearCacheForLanguage(dialect);
      for (MetaLanguage metaLanguage : LanguageUtil.matchingMetaLanguages(dialect)) {
        clearCacheForLanguage(metaLanguage);
      }
    }
    if (language instanceof MetaLanguage) {
      Collection<Language> matchingLanguages = ((MetaLanguage)language).getMatchingLanguages();
      for (Language matchingLanguage : matchingLanguages) {
        Collection<Language> dialects = matchingLanguage.getTransitiveDialects();
        clearCacheForLanguage(matchingLanguage);
        for (Language dialect : dialects) {
          clearCacheForLanguage(dialect);
        }
      }
    }
  }
private void clearCacheForDerivedLanguages(@NotNull Language language)