Eclipse not showing src file

I have three different projects in my eclipse, and yesterday the src file became invisible in one of the projects. Two days ago, everything was fine, and I have no idea how this happened. I do not see the src file in the project explorer or in the package explorer.

Project Explorer:

Project explorer

However, if I look using the navigator, I can see all the files in directories.

Navigator:

Navigator

I am using Eclipse Indigo SR2 and IBM Rational ClearCase for the first two projects. The other is my local test project.

Does anyone know how I can return to src file in project explorer?

Thanks.

+7
source share
7 answers

Check your Java build path to make sure src is present. Right-click the project and select Build Path β†’ Configure Build Path. If the src directory is not in the build path, it will not be displayed in the Java area, as you showed, but it will be present in the navigator.

+3
source

Try right-clicking on the project and clicking on the "Update" button.

+11
source

I had the same problem today because I am switching to the wrong view model. I suggest you switch "project explorer" to "batch explorer".

+2
source

I had the same problem in the Neon folder - src. One subdirectory in the src folder will be displayed, but there will be no other subdirectory, not the parent src file itself. No matter what I did in the buildpath configuration, only one subdirectory will be displayed. It looked like some corruption in the settings. None of the above solutions worked for me, including deleting the project and all files, and then re-checking.

That work switched to the old workspace by importing the project and then switching back to the workspace with the problem. Magically, the project with the problem again reacted to my changes in the configuration of the build path. I'm not sure if I needed to do an intermediate import step from the old workspace or not - maybe just switching back and forth might work, but I'm not sure.

+1
source

Try to delete (delete) the project without deleting the files (there is a checkbox that allows you to save the project files).

Then re-import the project. Not sure if this will solve your problem, but I ran into the same problem and delete-> re-import resolved it for me.

0
source

I had this problem today, and the problem was that the β€œsrc” folder was incorrect on the Source tab of the Configure Build Path window. He was there, but the path was wrong, so he had a red X. Deleting this entry and re-adding the path "src" (from the project) made the folder "src" return to the package hierarchy.

In my case, this was due to the sharing of the workspace between user accounts, the paths to the workspace and the folder below were not the same. One user accessed workspaces locally, another accessed a mapped drive, etc.

By fixing this and then standardizing the path to being identical for everyone with access, I solved the underlying problem that caused this problem.

0
source

Reboot the eclipse workspace.

Also change the open perspective in eclipse.

-one
source

All Articles