How to make a new Eclipse project template?

天大地大妈咪最大 提交于 2019-11-27 11:21:38
Nevena

You need to write an Eclipse plugin for that, and concentrate on New Project Wizard. About writing Eclipse plugins, it is covered in Stack Overflow question How to write a plugin for Eclipse?.

Mark Storer

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!