19

I don't know what went wrong, because this was working before, but all of the sudden I don't have any files in my eclipse package explorer.

The workspace path appears to be correct and the file permissions are correct.

Can anyone think of what's wrong?

Colleen
  • 23,899
  • 12
  • 45
  • 75
  • is the files available in workspace folder or not??? – himanshu Feb 22 '12 at 04:42
  • 1
    you can import them in ur eclipse so you'll get all ur files back in eclipse.Go to File=>Import=>Existing Projects into Workspace.After that browse ur projects path in Select root directory field and press finish. – himanshu Feb 22 '12 at 04:51
  • 1
    Did you try `Alt+shift+Q, P`? – Nishant Feb 22 '12 at 04:54
  • Are you sure you are looking at the package explorer? – ThomasW Feb 22 '12 at 04:55
  • 1
    @Nishant She has package explorer but files are not there....Read the question carefully... – himanshu Feb 22 '12 at 04:55
  • I'm wondering if it might be possible that the poster is mistaking the Package Explorer for something else. Given how flexible Eclipse is it is possible to have something else display where the Package Explorer normally is. – ThomasW Feb 22 '12 at 10:20
  • Yes, I'm sure I'm looking at the package explorer, assuming that the package explorer is the thing that says "Package Explorer" on top :) I did discover the import option, although I am still confused as to how I "lost" the files in the first place. – Colleen Feb 22 '12 at 21:11
  • 1
    out of curiosity, what does Alt+shift+q, P do? – Colleen Feb 22 '12 at 21:12
  • I have the same problem. Anyone have any other solutions? For me, the workspace was set up on a separate computer, so I assume that the metadata is the problem. I tried importing the settings, but didn't help. When I tried to import existing, it said there wasn't anything there. – shim Oct 23 '12 at 05:26
  • I just had this happen to me in Eclipse Juno on 'nix with my project in a dropbox folder. I copied the files to another directory and then imported them back in. – Attila Hooper Apr 23 '13 at 13:07
  • Seeing nothing in project explorer after importing 'existing projects' can happen without a meaningful error if the project exists in the workspace. Moving it out can resolve it or you can [tell Eclipse how to open it](https://stackoverflow.com/questions/3367952/opening-an-eclipse-project-already-in-my-workspace). – candied_orange Oct 04 '17 at 16:50

17 Answers17

18
  • Refresh the project
  • If that does not work, close and open the project again. enter image description here
S Krishna
  • 1,255
  • 13
  • 9
  • How did you blur the left and right portions of this image? – Gabriel Staples Nov 24 '22 at 04:12
  • I found a way! Use GIMP. Select a region to blur --> click Filters --> Blur --> Gaussian Blur... --> in the box that comes up, increase the "Blur Radius" to get more blur. Ensure the "Preview" box is checked. When the preview shows sufficient blur, click the "OK" button to apply the blur. Reference: https://www.thewindowsclub.com/how-to-blur-images-and-background-using-gimp – Gabriel Staples Nov 29 '22 at 00:17
  • I added a Q&A: [Graphic Design: How do I blur a section, selection, or region of an image in GIMP?](https://graphicdesign.stackexchange.com/a/159421/111479) – Gabriel Staples Nov 29 '22 at 00:40
  • this method did not work for me; deleting the project and re-importing did the trick – Hamzahfrq Feb 10 '23 at 10:16
17

I had the same problem (Probably caused when I cancelled a copying to my Dropbox folder) I only needed to click File → Import → General → Existing Projects into Workspace and select the missing projects in the window that appeared.

Mike
  • 14,010
  • 29
  • 101
  • 161
Zerato
  • 683
  • 9
  • 18
6

Workaround

  1. Create a blank workspace
    • Navigate to (File > Switch to workplace > Other)
    • Clik Browse > Make new folder
    • Click Ok in browse window
    • Click ok in create workspace window
  2. Import your existing project into the new workspace
    • Navigate to File > Import
    • Click General > Existing project into workspace
    • Click Next
    • Browse and select your previous project
    • Click on Finish

Congrats! Now you can see your project in the package explorer by importing it.

S Krishna
  • 1,255
  • 13
  • 9
  • I'm not sure why creating a new workspace solves this problem, but it works! I can see all my code files again! – Ahi Tuna Feb 04 '19 at 16:11
4

Project Explorer -> click on "View Menu" View Menu -> Top Level Elements -> Click on "Projects" Projects

Lyth
  • 2,171
  • 2
  • 29
  • 37
2

Don't know what causes the problem, but found a way to get the files back into the package explorer.

If you go into the path of your workspace and find your projects, then you can pack them all into a zip archive file, and from this zip archive file you can import your projects again by using the File → Import → General → Existing Projects into Workspace menu.

I don't know what causes the problem, but in my case I think it have something to do with me having my workspace in a dropbox folder.

ps. I don't know if you actually can take more than one project into one zip file and make it work, I have only tried it with one project pr. ZIP-file, but it shouldn't matter.

Mike
  • 14,010
  • 29
  • 101
  • 161
Kim
  • 397
  • 1
  • 10
2

In 2020 on OSX I just went to Project -> Refresh and wham! my files appeared.

duhaime
  • 25,611
  • 17
  • 169
  • 224
1

I had started the wrong installation of eclipse. When I started the correct installation my code showed up fine. I have both C++ and Java EE installs.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Be Kind To New Users
  • 9,672
  • 13
  • 78
  • 125
1

Just refresh all the projects, you able to see all missed files after you import from a workspace.

Begyner
  • 11
  • 2
1

1) Make sure that you use the right workspace.

2) Choose your "workspace"-Folder "/YourWorkspace", NOT your project folder"/YourWorkspace/yourProject"

Alternatively delete your project from your "YourWorkspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECTNAME/.location"

and restart.

Hope this helps

Birol Efe
  • 1,605
  • 16
  • 14
1

I had the same problem. I was not able to see the imported files in Eclipse, but there were visible in File Explorer. After a while, I noticed that all the files were imported. They had their names changed from myFile.class to ._myFile.class.

  1. I deleted all the imported files from my workspace by using File Explorer.
  2. By using the same File Explorer, I copy-pasted the folders/files in the workspace.
  3. Then in Eclipse, I refreshed the project (F5 or click-right -> Refresh or File -> Refresh)
0

I faced the same issue and the reason was that I choose double click on Eclipse Icon, then I need to choose Work Space.

Here I made mistake. You do not need to select folder in which has all your project files e.g //Desktop//User//Selenium//S1A//all files related to project

In that case for workspace you choose //Desktop//User//Selenium, import your project by clicking Import for eclipse 2020 and choosing File path //Desktop//User//Selenium//S1A.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Gaj Julije
  • 1,538
  • 15
  • 32
0

may be a rare case like in mine, but if you played with colors this may be an issue and especially, if you changed theming and did not restart, which may correct some problematic visual stuff.

Andreas Covidiot
  • 4,286
  • 5
  • 51
  • 96
0

Import>Existing Projects into Workspace> Select root directory> Select the folder

0

The solution that helped me:

  1. create a new folder (=Java-Package) with a new name. I used the System-Filemanager.
  2. copy the disappearing files to the new folder (=Java-Package).
  3. correct the links (JavaCommand 'import') to the new folder.
  4. delete the old files and the old folder.

As the problem happened in my case:

  • I am using Eclipse IDE 2021-12 (4.22.0) for my Java project.
  • After importing an existing Project into Workspace all was fine.
  • While building the project, same files disappeared from the 'Project Explorer'-Tree.
  • These files still do exist as the System-File-Explorer shows. So no file got deleted. But no more listed.
  • After Refresh (F5) most of the files got listed again in the 'Project Explorer'-Tree.
  • Without doing anything an Eclipse background process let files again disappear from the 'Project Explorer' - Tree. Compilation of the project leads to missing files.
  • Sometimes 3 files disappeared. Some seconds later more files disappeared. Sometimes it leads to an empty Java-Package.
  • This disappearance of some files happened without any input from me. It was done by the Eclipse background process. It felt like watching a movie.
  • What does not help in my case: Restarting of eclipse, Close and Open the project, editing the files.
0

In my case, the problem was due to an unwanted nested project in a subfolder. There is a pre-set filter that hides folders in that case.

For some reasons, the sub project was not shown in Project Explorer.

My solution :

  • delete the project (without deleting project contents on disk)
  • import existing projects into workspace, and do not import nested project.
Nico7as
  • 176
  • 1
  • 7
0

You might have filtered the resource out of the project. Select the project, right click, choose properties. Under Resource, choose "Resource filters" - check that the name of the folder or the files was not filtered in the list under "Exclude all" (if there is one)

Mike
  • 51
  • 5
0

Try this :

  click : window > new window 
  or
  click : file > refresh

it's work for me. Hope it work for you guys too.

ariJourney
  • 21
  • 4