protected boolean isInTemplateLanguageFile(PsiElement element) {
    PsiFile file = element.getContainingFile();
    return file == null || file.getLanguage() instanceof TemplateLanguage;
  }
protected boolean isInTemplateLanguageFile(PsiElement element)