List<ModuleWizardStep> (ProjectFromSourcesBuilder builder, ProjectDescriptor projectDescriptor, Icon stepIcon) { final List<ModuleWizardStep> steps = new ArrayList<>(); final ModuleInsight moduleInsight = new JavaModuleInsight(new DelegatingProgressIndicator(), builder.getExistingModuleNames(), builder.getExistingProjectLibraryNames()); steps.add(new LibrariesDetectionStep(builder, projectDescriptor, moduleInsight, stepIcon, "reference.dialogs.new.project.fromCode.page1")); steps.add(new ModulesDetectionStep(this, builder, projectDescriptor, moduleInsight, stepIcon, "reference.dialogs.new.project.fromCode.page2")); if (builder.getContext().isCreatingNewProject()) { final ModuleWizardStep jdkStep = ProjectWizardStepFactory.getInstance().createProjectJdkStep(builder.getContext()); steps.add(jdkStep); if (jdkStep instanceof ProjectJdkStep) { ((ProjectJdkStep)jdkStep).setProjectDescriptor(projectDescriptor); } } return steps; }