javaeclipseide

Eclipse showing java project src folder view as all packages and subpackages


Not sure how to really ask this question since I don't know what everything is called but I'll try to do the best I can.

So as I was cleaning up my classes. I right clicked my project and selected refresh. Then all of a sudden my project view changed, the src folder shows everything as packages and '.' separated subpackages. And all my code package declarations seems now to be undiscoverable.

I've attached a photo, hopefully you can petter understand this...How can I fix this to have the correct directory view/structure.

Edit:

Here is what I have linked to my JAVA build path

I don't understand what is happening? How can all of a sudden my project screw up like it has? Any help will be much appreciated


Solution

  • Look at the 'Java Build Path' in the project 'Properties' and check that you have the correct 'Source' folders. It looks like you may have just 'src' as a source folder when you should have 'src/main/java', 'src/test/java'...