Adding a project template
I'm trying to write a plugin that (for now) just adds a template to the "New Project" dialog. This is all I have so far in my project.xml, and it doesn't seem to be working.
...
<extensions defaultExtensionNs="com.intellij">
<projectTemplate projectType="Java" templatePath="resources/projectTemplates/Java/Sample.zip"
category="true"/>
</extensions>
...
Absolutely nothing changes. There's no option to create my template. I know the plugin is running, since it actually does other things, but I can't figure out how to add a project template. I'm assuming I have to implement some interface, but I can't find which one. Any suggestions?
Please sign in to leave a comment.
I think you need to set the category attribute to false. Your current code registers a project template category which doesn't contain any templates and is therefore not shown in the UI.
Nope, still nothing.
Could you please check that the .zip extension is matched by the resource patterns in Settings | Compiler?
It is. Still nothing.
As far as I can see the correct projectType value for a regular Java application is "JAVA_MODULE", not "Java".
Still no change.
What's the contents of your Sample.zip? In particular, does it contain .idea/description.html and .idea/project-template.xml?
Thanks for the response. Here's my project template. I believe it has everything required, although I'm having a hard time finding documentation on manually creating project templates, so I just looked at what was in the default ones.
Attachment(s):
Sample_Robot.zip
This looks correct as far as I can tell.
Are there any exceptions in idea.log when you start IDEA with your plugin and open the new project wizard?
Is the full code of your plugin available somewhere?
hi,Thomas Clark
i met the same issue, could you give me some help about above question, thanks a lot !