private static @Nullable VirtualFile getProjectDir(AnActionEvent e) {
    VirtualFile projectFileDir = e.getData(PlatformCoreDataKeys.PROJECT_FILE_DIRECTORY);
    return projectFileDir != null && projectFileDir.isValid() ? projectFileDir : null;
  }
private static @Nullable VirtualFile getProjectDir(AnActionEvent e)