Eclipse won't show files in package explorer
Asked Answered
R

18

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?

Roxyroy answered 22/2, 2012 at 4:31 Comment(11)
is the files available in workspace folder or not???Grady
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.Grady
Did you try Alt+shift+Q, P?Photoactive
Are you sure you are looking at the package explorer?Ransack
@Photoactive She has package explorer but files are not there....Read the question carefully...Grady
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.Ransack
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.Roxyroy
out of curiosity, what does Alt+shift+q, P do?Roxyroy
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.Trapezoid
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.Dishonesty
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.Beadroll
S
19
  • Refresh the project
  • If that does not work, close and open the project again. enter image description here
Strawberry answered 1/2, 2019 at 16:21 Comment(4)
How did you blur the left and right portions of this image?Aborigine
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: thewindowsclub.com/how-to-blur-images-and-background-using-gimpAborigine
I added a Q&A: Graphic Design: How do I blur a section, selection, or region of an image in GIMP?Aborigine
this method did not work for me; deleting the project and re-importing did the trickExcoriation
C
18

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.

Chilt answered 5/8, 2013 at 15:39 Comment(0)
S
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.

Strawberry answered 5/1, 2018 at 20:39 Comment(1)
I'm not sure why creating a new workspace solves this problem, but it works! I can see all my code files again!Monotype
T
4

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

Taryntaryne answered 8/2, 2017 at 16:5 Comment(0)
D
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.

Debauched answered 14/1, 2013 at 20:9 Comment(0)
A
2

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

Antilles answered 18/1, 2020 at 21:48 Comment(0)
N
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.

Neckcloth answered 18/6, 2016 at 1:20 Comment(0)
C
1

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

Carillo answered 26/6, 2018 at 12:27 Comment(0)
D
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

Discography answered 26/7, 2019 at 10:26 Comment(0)
B
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)
Bagpipes answered 12/6, 2020 at 15:40 Comment(0)
R
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.

Remittent answered 2/11, 2020 at 15:30 Comment(0)
G
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.

Graceless answered 23/9, 2021 at 10:48 Comment(0)
B
0

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

Brindabrindell answered 28/10, 2021 at 7:35 Comment(0)
T
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.
Topee answered 9/12, 2021 at 13:49 Comment(0)
H
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.
Hostetter answered 1/6, 2022 at 7:8 Comment(0)
E
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)

Elis answered 7/12, 2022 at 18:0 Comment(0)
T
0

Try this :

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

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

Thigmotropism answered 21/4, 2023 at 15:28 Comment(0)
J
0

Reset your Perspective, Go to Window->perspective->Reset perspective.

Jesusa answered 25/7, 2024 at 10:13 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.