Search in sources :

Example 1 with ImportMode

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();
}
Also used : ProjectImportProvider(com.intellij.projectImport.ProjectImportProvider) ImportMode(com.intellij.ide.util.newProjectWizard.modes.ImportMode) WizardContext(com.intellij.ide.util.projectWizard.WizardContext) ProjectImportBuilder(com.intellij.projectImport.ProjectImportBuilder)

Aggregations

ImportMode (com.intellij.ide.util.newProjectWizard.modes.ImportMode)1 WizardContext (com.intellij.ide.util.projectWizard.WizardContext)1 ProjectImportBuilder (com.intellij.projectImport.ProjectImportBuilder)1 ProjectImportProvider (com.intellij.projectImport.ProjectImportProvider)1