public @NotNull PsiFile getPsiFile() {
    Document document = myEditor.getDocument();
    PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document);
    return Objects.requireNonNull(psiFile, () -> "Can't find a psi file for the " + document + " in " + myEditor);
  }
public @NotNull PsiFile getPsiFile()