• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse Source Folder Management

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some very basic source folder management issues. I've restructured my src folder into a separate directory outside the eclipse project directory. How can I make it as a source folder for eclipse? Secondly, there are some *.bak files in my source folder. Can I use include/exclude pattern to exclude them?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right-Click on your project, and select Properties.
Java Build Path -> Source -> Link Source
Click the Browse Button and select the external folder where your sources are.
Enter a folder name, or leave the default name if it suits you. This name will be used in your Eclipse project.
Leave Ignore nesting conflicts on, and click next.

Here, you can add "*.bak" in Exclusion Patterns, but I don't think it's needed, because bak file won't be compiled anyway.
Click Finish.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18282
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although you can - and sometimes I do - set up an entire Eclipse projects directory outside of the workspace directory, I don't recommend only setting up parts of a project that way. Make it all or nothing. If you do that, then you don't need to declare the src folder as external, since "external" means external to the project subtree.

I had the other setup in olden days. C projects often seemed to end up that way. It wasn't much fun to maintain.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Tim. I think it would be better to keep the sources within your project.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic