use of com.android.tools.idea.npw.project.NewProjectModel in project android by JetBrains.
the class AndroidModuleBuilder method createWizardAdaptor.
private void createWizardAdaptor(@NotNull AbstractWizard hostWizard, @NotNull WizardType type) {
Preconditions.checkState(myWizardAdapter == null, "Attempting to create a Wizard Adaptor when one already exists.");
ModelWizard.Builder builder = new ModelWizard.Builder();
if (type == WizardType.PROJECT) {
NewProjectModel projectModel = new NewProjectModel();
builder.addStep(new ConfigureAndroidProjectStep(projectModel));
// TODO: more steps once they are complete.
} else {
throw new UnsupportedOperationException();
// TODO: once new module wizard is complete, register it here.
// NewModuleModel moduleModel = new NewModuleModel();
// builder.addStep(new ConfigureAndroidModuleStep(moduleModel));
}
myWizardAdapter = new IdeaWizardAdapter(hostWizard, builder.build());
}
use of com.android.tools.idea.npw.project.NewProjectModel 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);
}
}
}
Aggregations