private static Language getLanguage(PsiElement element) {
    Language lang = element.getLanguage();
    if (lang == XMLLanguage.INSTANCE) {
      PsiElement parent = element.getParent();
      lang = parent.getLanguage();
    }
    return lang;
  }
private static Language getLanguage(PsiElement element)