use of com.intellij.ide.util.newProjectWizard.modes.ImportMode in project intellij-community by JetBrains.
the class AddModuleWizard method initModuleWizard.
private void initModuleWizard(@Nullable final Project project, @Nullable final String defaultPath) {
myWizardContext.addContextListener(new WizardContext.Listener() {
public void buttonsUpdateRequested() {
updateButtons();
}
public void nextStepRequested() {
doNextAction();
}
});
myWizardMode = new ImportMode(myImportProviders);
StepSequence sequence = myWizardMode.getSteps(myWizardContext, DefaultModulesProvider.createForProject(project));
appendSteps(sequence);
for (ProjectImportProvider provider : myImportProviders) {
provider.getBuilder().setFileToImport(defaultPath);
}
if (myImportProviders.length == 1) {
final ProjectImportBuilder builder = myImportProviders[0].getBuilder();
myWizardContext.setProjectBuilder(builder);
builder.setUpdate(getWizardContext().getProject() != null);
}
init();
}
Aggregations