How to make a new Eclipse project template?

I’ve just done a bit of research on this for our own nefarious purposes, and found the answer.

You need to create an Eclipse plugin that uses the org.eclipse.ui.newWizards package. You can define your own category or use an existing one once you find the category ID. To create a new project wizard rather than a new resource wizard, you need to set the “project=true”.

Also, your plugin must contain a class that implement org.eclipse.ui.INewWizard. Clicking on the class link from the plugin.xml editor will do the trick.

That class must do all the work in the performFinish override, and must return true to indicate that it actually did its thing and the wizard can close. This is where you create files, directories, set natures, and so forth.

Leave a Comment