Does Eclipse support the concept of reusa开发者_JS百科ble "project structures" via scripting/configging?
For instance if I want all of my projects - upon creation - to take on the form:
MyProjectRoot/
src/
fizz/
buzz/
docs/
Is there a way to define this project structure somewhere (XML, etc.), and then link a new project to that structure?
I know I can write an ant/maven script to do this for me, but having a resource like this would save me from a lot of manual copying & pasting the same buildscript.
Thanks in advance!
Out of the box, I don't think this exists.
One option is to create a template project and save the dir tree off somewhere. Then when you need a new project that should follow template, you can copy the dir tree and use File -> Import.
Another option that I'd recommend is to just use Maven and have Maven dictate dir structure. Eclipse can then import that maven project.
Yes it is possible. But not easily. You basically have to create your own plugin, which frankly I don't see the juice being worth the squeeze. Now, if you are learning/using Maven, then you already have a very good directory layout defined for you. Getting that directory structure imported into Eclipse is a one-line command in your shell. And if you decide to switch to NetBeans then you don't even have too run that shell command (native integration ftw)!
But of course, you are constrained to Maven best-practices for directory layout (good, bad or indifferent).
I'm including a link to the Eclipse Help documentation, in the case you decide to go down the custom plugin route. Good luck!
Custom project types in Eclipse
精彩评论