Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Custom Project template in Eclipse IDE

I have been using Eclipse IDE for a long time. Its a really great IDE for Java/C/C++ (and other languages with its THOUSANDS of plugins). Every once in a while, I get the need for creating a Javax interface. To do this normally, I would setup the new java project then add what I need. But, wouldn't it be nice if I could just make a template project to automatically include the code for the files. How would I go about doing this? It it even possible? The Eclipse CDT can make a new project type. So can the Google ADT and Google App engine. So I would imagine it is possible. But how?

like image 644
Mohit Deshpande Avatar asked May 03 '10 23:05

Mohit Deshpande


People also ask

How do I import a template into eclipse?

To import a code template: Click Import to open the "Import Templates" browser. Select the relevant XML file containing the template information. Click Open.

How do I create a Visual Studio template?

Go to Documents\Visual Studio Version\Templates\ProjectTemplates and create a new folder to separate your template from the default templates of visual studio. You will see the newly created template as shown below. Give the name of the project and click on 'Ok' button.


1 Answers

You must write your Eclipse plug-in that implements org.eclipse.ui.newWizards extension point. You can extend an existing "New Java Project" wizard, and provide your custom project layout implementation (see the API).

like image 81
Michael Spector Avatar answered Oct 15 '22 08:10

Michael Spector