Search in sources :

Example 1 with NewProjectWizardDynamic

use of com.android.tools.idea.npw.NewProjectWizardDynamic in project android by JetBrains.

the class AndroidNewProjectAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    // TODO: Temporary! This will be the main code path after we completely convert over NewProjectWizardDynamic
    if (Boolean.getBoolean("use.npw.modelwizard") && (e.getModifiers() & InputEvent.SHIFT_MASK) == 0) {
        NewProjectModel model = new NewProjectModel();
        ModelWizard wizard = new ModelWizard.Builder().addStep(new ConfigureAndroidProjectStep(model)).build();
        new StudioWizardDialogBuilder(wizard, "Create New Project").build().show();
    } else {
        try {
            NewProjectWizardDynamic dialog = new NewProjectWizardDynamic(null, null);
            dialog.init();
            dialog.show();
        } catch (IllegalStateException error) {
            Logger.getInstance(AndroidNewProjectAction.class).warn("Unable to launch New Project Wizard", error);
        }
    }
}
Also used : NewProjectWizardDynamic(com.android.tools.idea.npw.NewProjectWizardDynamic) StudioWizardDialogBuilder(com.android.tools.idea.ui.wizard.StudioWizardDialogBuilder) StudioWizardDialogBuilder(com.android.tools.idea.ui.wizard.StudioWizardDialogBuilder) NewProjectModel(com.android.tools.idea.npw.project.NewProjectModel) ModelWizard(com.android.tools.idea.wizard.model.ModelWizard) ConfigureAndroidProjectStep(com.android.tools.idea.npw.project.ConfigureAndroidProjectStep)

Aggregations

NewProjectWizardDynamic (com.android.tools.idea.npw.NewProjectWizardDynamic)1 ConfigureAndroidProjectStep (com.android.tools.idea.npw.project.ConfigureAndroidProjectStep)1 NewProjectModel (com.android.tools.idea.npw.project.NewProjectModel)1 StudioWizardDialogBuilder (com.android.tools.idea.ui.wizard.StudioWizardDialogBuilder)1 ModelWizard (com.android.tools.idea.wizard.model.ModelWizard)1