How-to copy files from plugin resources to project directory

I Have plugin with template files, for example plugin structure:

     *plugin java files*

i need to make a plugin, which will be copy that files from template directory (arrive with plugin)  into project directory.

action will be in context menu in project above button @NEW

This will be like new project template.

or will be cool, if it will appear in @NEW PROJECT -> NEW CUSTOM PROJECT near with Bootstrap application for example

plugin available for PHPStorm and WebStorm.

or also could be available for IntelliJ IDEA with another template files.

Questions are:

How to copy files from plugin to project directory?
Or how to unpack plugin to plugins directory, and i will be available to copy files through java methods?
Or how to inject this functionality in start-menu for creation project ?

Comment actions Permalink

Please have a look at com.intellij.platform.templates.ArchivedTemplatesFactory

Comment actions Permalink

where i can see the reference?

Comment actions Permalink

It's in Intellij community codebase. What build do you use as SDK for your plugin?

Comment actions Permalink

JDK 1.6
and Plugin SDK from the box (IntelliJ IDEA 12 CE)


Please sign in to leave a comment.