I have managed to add this functionality by creating a new plugin. I hacked together the plugin using several tutorials on the subject:
File templates https://platform.netbeans.org/tutorials/nbm-filetemplates.html
New Wizard https://platform.netbeans.org/tutorials/691/nbm-wizard.html
Basically the plugin has a global options panel, that will allow you to choose the location of a zip file.
Then you can right click a folder in your project and do New -> Other -> Directory Structure.
The wizard will ask for a name to be used as the parent folder to extract the zip into.
Using a zip is useful because it not only can setup the directory structure but it can also populate files that are used on a regular basis.
For me I build Symfony 2 applications and i am constantly creating new bundles so my zip contains:
- Controller
- DefaultController.php
- Entity
- Default.php
- Form
- DefaultForm.php
- Resources
- views
- Default
- index.html.twig
- create.html.twig
- view.html.twig
- edit.html.twig
- delete.html.twig
- Default
- views
You dont have to include files in the zip it can purely be folder structure though.
I have published the source as a public repo on github: https://github.com/chasen/NBCustomDirectoryStructurePlugin