How to add custom project template to intellij plugin?

Answered

I am trying to create a plugin which show some predefined project as templates. I tried a lot but did get any success. please anyone around to suggest. I am trying something like to get predefined added through following in plugin.xml file

<projectTemplate projectType="JAVA_MODULE" templatePath="resources/projectTemplates/sample-template.zip"
                     category="false"/>
4 comments
Comment actions Permalink

What exactly is the problem? Please see Java plugin in IntelliJ Community sources as sample:

 

<projectTemplate projectType="JAVA_MODULE" templatePath="resources/projectTemplates/Java/Command_Line_App.zip"/>
0
Comment actions Permalink

Hi Yann Cebron

Thank you for your response. I have just started the plugin development after completing the official documentation and created some samples. But I am trying to add my existing project templates in plugin but it doesn't show anything in File->Wizard under java module. Could you please specify any specific sample with link to get quick help please.

 

Thanks

0
Comment actions Permalink

I don't understand what the problem could be, see my sample above from Java plugin which is available in IJ Community sources.

0
Comment actions Permalink

Hi Yann

 

Thank you for your help it's fixed now with following code snippet.

<projectTemplate projectType="CORDA" templatePath="/projectTemplates/sample.zip"
category="true" />
also zip must be created first using tools->save as template then save it to resource.

Thanks
0

Please sign in to leave a comment.