private static Language findLanguage(Language baseLanguage, FileViewProvider viewProvider) {
    Set<Language> languages = viewProvider.getLanguages();

    for (Language actualLanguage : languages) {
      if (actualLanguage.isKindOf(baseLanguage) && actualLanguage instanceof IgnoreLanguage) {
        return actualLanguage;
      }
    }

    throw new AssertionError("Language " + baseLanguage + " doesn't participate in view provider " +
                             viewProvider + ": " + new ArrayList<>(languages));
  }
private static Language findLanguage(Language baseLanguage, FileViewProvider viewProvider)