private static WizardContext initContext(@Nullable Project project, @Nullable String defaultPath, Disposable parentDisposable) {
    WizardContext context = new WizardContext(project, parentDisposable);
    if (defaultPath == null && project != null) {
      defaultPath = project.getBasePath();
    }
    if (defaultPath != null) {
      context.setProjectFileDirectory(Paths.get(defaultPath), true);
      context.setProjectName(defaultPath.substring(FileUtil.toSystemIndependentName(defaultPath).lastIndexOf("/") + 1));
    }
    return context;
  }
private static WizardContext initContext(@Nullable Project project, @Nullable String defaultPath, Disposable parentDisposable)