private static @Nullable ServerPageFile getServerPageFile(PsiElement element) {
    final PsiFile psiFile = PsiUtilCore.getTemplateLanguageFile(element);
    return psiFile instanceof ServerPageFile ? (ServerPageFile)psiFile : null;
  }
private static @Nullable ServerPageFile getServerPageFile(PsiElement element)