* [webhelp] Fixes for TXP00152, TXP00002, test build 27 Jul 22:26 * [webhelp] Fixes for Part #4 TXP00010, EXCEPT decimal numbers in section titles * [webhelp] Fixes for Part #5 TXP00017 * [webhelp] Fixes for Part #4 TXP00010 - removed numbers from page section titles in "Custom Language Support Tutorial" and "Testing a Custom Language Plugin". * [webhelp] Removed numbers from page section titles in rest of project *.md files. * [new webhelp] Build #44 changes * [new webhelp] Maintenance merge from master * [new webhelp] Add placeholder file for webhelp import. * [webhelp] Correct redirects for file name changes * [webhelp] TOC not needed in webhelp * [format] {:toc} not needed for webhelp * add {:disable-links} to ensure demo links are not interpreted as real links. * Put all badges on the same line to simplify composition. * formatter.md: fix upsource link * fix some links * api_changes_list.md: remove note * migrate to webhelp - initial * fix GH edit URL * remove sdkdocs-template setup in VCS config * remove recently_updated.md * restore COC/CONTRIBUTING.md * api_changes_list.md: remove note * useful_links.md: IPE Co-authored-by: JohnHake <john.hake@jetbrains.com> Co-authored-by: Yann Cébron <yann.cebron@jetbrains.com>
2.9 KiB
This tutorial shows how to add an extra step to the Project Wizard to provide additional project configuration settings.
Pre-Requirements
Create an empty plugin project. See Creating a Plugin Project to know how to do it.
Register Module Builder
Project configuration settings depend on the project's module type.
Register a new com.intellij.moduleBuilder
extension point in the plugin.xml
configuration file.
<extensions defaultExtensionNs="com.intellij">
<moduleBuilder builderClass="org.intellij.sdk.project.wizard.DemoModuleWizardStep"
id="DEMO_STEP"
order="first"/>
</extensions>
Create a Custom Module Builder
Extend ModuleBuilder
class to provide custom configuration.
public class DemoModuleWizardStep extends ModuleBuilder {
public void setupRootModel(ModifiableRootModel modifiableRootModel) throws ConfigurationException {
}
}
Define Module Type
Set a module type for the extra wizard step to provide.
In this example, choose an EMPTY
module type.
public class DemoModuleWizardStep extends ModuleBuilder {
public void setupRootModel(ModifiableRootModel modifiableRootModel) throws ConfigurationException {
}
public ModuleType getModuleType() {
return ModuleType.EMPTY; //or it could be any other module type
}
}
Design and Implement Wizard Steps
Provide an implementation of a custom UI component to be added to the Wizard. In this case, leave it as a label.
public class DemoModuleWizardStep extends ModuleBuilder {
public void setupRootModel(ModifiableRootModel modifiableRootModel) throws ConfigurationException {
}
public ModuleType getModuleType() {
return ModuleType.EMPTY;
}
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext, @NotNull ModulesProvider modulesProvider) {
return new ModuleWizardStep[]{new ModuleWizardStep() {
@Override
public JComponent getComponent() {
return new JLabel("Put your content here");
}
@Override
public void updateDataModel() {
}
}};
}
}
Checking UI Appearance
After compiling and running the plugin, create a new project using a source-compiled instance of IntelliJ IDEA.
Choose an Empty Module type, click next, and get to the just added extra step.
Modify and tune the UI component depending on requirements.