@Nullable
  private static PsiFile getFile(@NotNull AnActionEvent e) {
    Editor editor = e.getData(CommonDataKeys.EDITOR);
    return editor == null ? null : e.getData(CommonDataKeys.PSI_FILE);
  }
@Nullable
  private static PsiFile getFile(@NotNull AnActionEvent e)