aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Source Folder Management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Source Folder Management" Watch "Eclipse Source Folder Management" New topic
Author

Eclipse Source Folder Management

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.

[My Blog]
All roads lead to JavaRanch
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I agree with Tim. I think it would be better to keep the sources within your project.
 
 
subject: Eclipse Source Folder Management