public static PsiFile getPsiFile(@NotNull final Editor editor, final Project project) {
    return PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
  }
public static PsiFile getPsiFile(@NotNull final Editor editor, final Project project)