@Nullable
  public static JspFile getJspFile(final PsiElement element) {
    final PsiFile psiFile = PsiUtilCore.getTemplateLanguageFile(element);
    return psiFile instanceof JspFile ? (JspFile)psiFile : null;

    /*final FileViewProvider provider = element.getContainingFile().getViewProvider();
    PsiFile file = provider.getPsi(StdLanguages.JSP);
    if (file instanceof JspFile) return (JspFile)file;
    file = provider.getPsi(StdLanguages.JSPX);
    return file instanceof JspFile ? (JspFile)file : null;*/
  }
@Nullable
  public static JspFile getJspFile(final PsiElement element)