I want to set up a new Eclipse project with a directory structure as follows:
Myproject/
src/
config/
java/
test/
config/
java/
lib
Where src/ and test/ are both “source” folders (they contain either .xml or .java files). Obviously, src/config/ contains all the XML config files for my primary Java source files (which get packaged under src/java/).
What I’d like to achieve (if possible) would be to just see the following in Package Explorer:
MyProject
src/config
src/java
test/config
test/java
lib
But instead, after adding all fource “source” folders to the project, I see this:
MyProject
src
src/config
src/java
test
test/config
test/java
lib
This is most annoying!! When I go into Project Properties >> Java Build Path >> Source I see the same folders listed as source folders as directly above:
MyProject/src
MyProject/src/config
MyProject/src/java
MyProject/test
MyProject/test/config
MyProject/test/java
Is there any way to force Package Explorer to present my 4 source folders and not even list the src/ and test/ folders? It just seems bulky, unnecessary and annoying, since I’ll never be adding anything to them directly. Everything will be added to their config/ and java/ subdirectories.
Use the Navigator view instead of the Package view. It provides a hierarchical view of your project instead of showing every package at the same level.