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