Exception while launching "New Project Wizard" programmatically
Answered
I'm trying to launch the "New Project Wizard" programmatically.
Code;
NewProjectWizard wizard = new NewProjectWizard(null, ModulesProvider.EMPTY_MODULES_PROVIDER, null);
NewProjectUtil.createNewProject(wizard);
Exception:
Caused by: java.lang.NoClassDefFoundError: com/intellij/ide/util/newProjectWizard/AbstractProjectWizard
This approach taken from Flutter IntelliJ plugin. The code compiles successfully but exception occurs at runtime.
How can I resolve this problem?
Please sign in to leave a comment.
Hi,
This class is a part of the com.intellij.java module. To access it, you should add:
<depends>com.intellij.java</depends>
to your plugin.xml file.
Also, see the table on https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html#modules-specific-to-functionality page.
Karol Lewandowski Thanks!