private boolean isInPsiFile(@NotNull PsiElement element) {
    PsiFile file = element.getContainingFile();
    return file != null && myFile.getViewProvider() == file.getViewProvider();
  }
private boolean isInPsiFile(@NotNull PsiElement element)