How to use an existing Project as a template for a new one with Eclipse (CDT)?

我的梦境 提交于 2019-12-07 06:12:28

问题


I'd like to use one of my Projects where everything is configured fine and how it is need to start working as a "template" for creating a new Project within eclipse with CDT.

So that time for configuring and writing a working project can be safed because it was already made somewhere else.

Any hints?


回答1:


You could always right-click the project, choose "copy" and then hit ctrl+v (command+v on mac) to paste a new copy of the project into the workspace, then delete the source files that you don't need, leaving only the project configuration.




回答2:


Just some ideas:

  1. You can also use File->Export to export the C/C++ project settings, and include those with the project itself (like on a git repo?)
  2. You could make your 'perfect' starting project and use that as a git repo. Then, when you want to use it, just clone and disconnect (under the team menu) the template. Finally, you can re-share to a new repo?
  3. Save the project as 'read-only' and use it as a starting point (now use Save as..) (Not tested, just an idea)

Finally, if you want to do it right, your going to have to write up a plugin! Yay!

Good starting point if you choose this route from this SO link

More on making Eclipse plugins (a bit old)

Good luck! And let us know if you come up with anything else...



来源:https://stackoverflow.com/questions/8243121/how-to-use-an-existing-project-as-a-template-for-a-new-one-with-eclipse-cdt

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