public static boolean isInTemplateLanguageFile(@NotNull PsiElement element) {
    PsiFile psiFile = element.getContainingFile();
    if (psiFile == null) {
      return false;
    }

    Language language = psiFile.getViewProvider().getBaseLanguage();
    return language instanceof TemplateLanguage;
  }
public static boolean isInTemplateLanguageFile(@NotNull PsiElement element)