private static @NotNull @NlsSafe String generateProjectName(@NotNull String externalProjectPath) {
    File projectFile = new File(externalProjectPath);
    if (projectFile.isFile()) {
      return projectFile.getParentFile().getName();
    }
    else {
      return projectFile.getName();
    }
  }
private static @NotNull @NlsSafe String generateProjectName(@NotNull String externalProjectPath)