ProjectData (ProjectData current) { assert myProjectOrNull != null : "must not be called when creating a new project"; SelectExternalProjectDialog d = new SelectExternalProjectDialog(GradleConstants.SYSTEM_ID, myProjectOrNull, current); if (!d.showAndGet()) { return current; } return d.getResult(); }