What is the right way to create the settings dialogs for a custom language's new project wizard? For instance, out of the box it does not prompt for SDK.
In case you're still wondering how to do it, you have to create your own ModuleType and override modifyProjectTypeStep like this:
@Nullable @Override public ModuleWizardStep modifyProjectTypeStep(@NotNull SettingsStep settingsStep, @NotNull final ModuleBuilder moduleBuilder) { return ProjectWizardStepFactory.getInstance().createJavaSettingsStep(settingsStep, moduleBuilder, new Condition<SdkTypeId>() { @Override public boolean value(SdkTypeId sdkType) { return moduleBuilder.isSuitableSdkType(sdkType); } }); }
You can also customize the last step (where you configure the project's name and location) by overriding modifySettingsStep, and you can add your own steps in createWizardSteps.
So `createWizardSteps` seems to work really well, except there's always an extra Project Settings step at the end. Is there any way to have the Project Settings step come first?
Thanks Yann, unfortunately, I don't see any mention of how to move the last step which takes the project/module name and path. Ideally, I'd like that step to come first so I can use its information in the following steps.
I would also like to set up the path first, so that I can use it in following steps. People from Jetbrains, any idea how this would be possible, or if some modification to the API would be possible?
In case you're still wondering how to do it, you have to create your own ModuleType and override modifyProjectTypeStep like this:
So `createWizardSteps` seems to work really well, except there's always an extra Project Settings step at the end. Is there any way to have the Project Settings step come first?
Please check out http://www.jetbrains.org/intellij/sdk/docs/tutorials/project_wizard.html
Thanks Yann, unfortunately, I don't see any mention of how to move the last step which takes the project/module name and path. Ideally, I'd like that step to come first so I can use its information in the following steps.
Hi Cary,
I had the same problem, but I looked at the source code and it seems that the last step is mandatory, and cannot be moved before other steps.
See here: https://github.com/JetBrains/intellij-community/blob/master/java/idea-ui/src/com/intellij/ide/projectWizard/NewProjectWizard.java#L55
I would also like to set up the path first, so that I can use it in following steps. People from Jetbrains, any idea how this would be possible, or if some modification to the API would be possible?
Thanks.