134
votes

It seems like all my projects (except one) disappeared from the view Project Explorer.

I'm using Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911

Note: all the projects are present on the file system.

How to bring them back? Any ideas?

30
This issue seems to be still existing in Eclipse Kepler edition on Linux. All in sudden all my projects disappeared after I launched Eclipse.tonga
Happens to me too. I post an automatic solution with a script. No more tedious importing procedure!Luca Davanzo

30 Answers

175
votes

This happened to me. I'm still not sure how, but the reason was that my workspace meta data had become corrupted, probably due to Eclipse being improperly shutdown. The solution, as explained here, is to:

Note, steps 2 & 3 are optional if Eclipse isn't crashing, but just not showing any projects.

  1. Close Eclipse.
  2. cd /home/user/workspace/.metadata/.plugins
  3. mv org.eclipse.core.resources org.eclipse.core.resources_bak
  4. Start Eclipse
  5. Do File->Import
  6. General->Existing Projects into Workspace
  7. Click the "Select root directory" field and browse to each subfolder in your workspace folder, and import.

For me, this was very tedious, since I had several dozen projects in my workspace, but it's the only solution I found short of restoring my entire workspace from a backup.

Edit: This answer is now quite old, and better solutions may now exist. Although I haven't had need to try it, I recommend attempting @antonagestam's solution first, as others have suggested it may be faster and more effective.

Edit: Since it's fairly simple, I'd recommend trying antonagestam's solution first. However, this problem recently re-occurred for me, and that solution did not work in my case. But neither did it interfere with this solution.

83
votes

I had the same problem in Aptana, all of a sudden my projects were gone. Solved it by going to the drop-down menu in Project Explorer and going Top Level Elements -> Projects.

31
votes

Go to

File --> Import --> General --> Existing Project into Workspace

Then, In Root Directory Enter the workspace path where all your projects saved & click refresh as below

enter image description here

And Click Finish

enter image description here

15
votes

I was having the same problem for Android projects in Eclipse. This link was very helpful in restoring the missing projects.

  1. Go to 'File->Import->General->From Existing Project'.
  2. Select the root folder to the Workspace.
  3. Click on the 'Refresh' button.
  4. Select the required projects and click 'Finish' button.
13
votes

I had the same problem in Luna,

Suddenly my projects were gone in start-up.
I solved this by select Deselect working set option in the drop-down menu in Project Explorer.

Note: I post this answer even this is not a right answer for this question. Since I search for Luna and came here,while trying with discussed things I was find this solution. This may help others.

11
votes

Click on Windows > Open Perspectives > java , Press Ok. Project Explore will come back on screen..

4
votes

My solution is open view menu and select "Top Level Elements" and set "Projects"

3
votes

If any of the previous methods don't work for you then delete your old workspace, create a new workspace and put it by default. You can do this by launching Eclipse twice - the second time it asks you for the workspace ;). Then re-import all your projects there and say "problem, goodbye".

3
votes

Today 22-03-2016, I check again this question and using ECLIPSE MARS I solved with:

  • Having Eclipse opened, go on FILE -> RESTART

Go on same workspace and I have all project on "PROJECT EXPLORER"

Sometime also this operation, will solve (Clicking on Projects dor see all project!!)

 my problem

So Other solution is:

SOLUTION

2
votes

if you use the "Task List" view of Eclipse, it will sometimes try to hide files or projects that it thinks are not associated with a given task (i.e. any file that was not opened while you had a certain task selected as the current task). If you want Eclipse to stop hiding files in that case, you can just delete all tasks.

Or you may also restart your eclipse and by just closing the project and then opening it again (from the right mouse click context menu) the files will be restored.

If that doesnt get your projects back then check the "filters option" (Click on right corner of Project Explorer tab and open context menu. Select Filters option from menu) and make sure that your projects type isnt checked.

2
votes

you should check the active Working Set - make sure it is off.

2
votes

Mona is correct - Make sure that you have the task list set to show ALL as the image shows. Click the arrow to the left of the project if you want to re-factor your filter. Reset your perspective if you do not see the task list.

show all projects in eclipse

1
votes

When this happened to me I had somehow set the Project Explorer to only display Working Sets. I had none, so nothing was displayed.

To fix it, I went to the Project Explorer View Menu (next to the Minimize and Maximize icons in the Project Explorer), Top Level Elements -> Projects.

Thanks to @antonagestam for pointing me in the right direction.

1
votes

It seems it happens to us all. I was happily hacking away at javascript, nowhere near all the nasty hibernate java stuff, and boom, "cant find org.jboss.logging.BasicLoging". I havent touched anything!. After an hour or so of trying to make that appear, restarting servers, mysql, eclipse, adding jars that weren't needed before,I deployed the fix all solution, the off button. Then zap, no project. (I am still none the wiser as to why calling Configuration() should now require jboss-logging...jar, maybe I needed it all along for when bad things happen)

My input is

  1. use git, keep as little of your stuff in the eclipse workspace area as possible. Then just import project from existing git repo when eclipse loses it's marbles.

  2. I also lost my server config. it's there but eclipse insists there no server config stuff and bombs. So make another one, I've expressed my feelings about eclipse in my new server name, and copy your apache xml configs (workspace/Servers/I_Love_Eclipse) over from the original perfectly good directory.

1
votes

Not sure how/why, but this happened to me once when I added a task to Mylyn. Seemed that mylyn was filtering my projects. When I deleted the task they all came back.

1
votes

None of the answers provided here worked for me. My Enterprise Explorer was completely grey and I couldn't even import or reimport projects.

In my .metadata.log I saw this error:

assertion failed: working set with same name already registered

So I deleted these file:

.metadata.plugins\org.eclipse.ui.workbench\workingsets.xml

Now I can see all my projects. I didn't have to add them back again.

1
votes

I found a solution that worked better for me. Under my home folder I found a workspace/.metadata folder. I copied this folder into my eclipse workspace, replacing the .metadata folder that had been there. When I started Eclipse everything was back to the way I had left it - all projects present, all open files were still open, etc. Just like nothing had happened! I'm using Neon.

1
votes

Got this issue on returning to an Eclipse project on a VM after leaving it untouched for maybe a couple of weeks.

I started to apply the accepted answer, but when I got to the step of renaming the folder and had exited Eclipse, I saw there was an instance of Eclipse still running. I realized Windows had for some reason started a second instance of Eclipse when I hit the taskbar button. The second instance had been unable to access the workspace while the first instance was using it.

Once I undid my folder rename, and closed and restarted the original instance of Eclipse, I was able to use File->Switch Workspace to get my normal workspace back.

0
votes

Solution that Cerin provide, importing each time that this problem happens, could be boring.

So I've implemented a script that control if workspace setting exits: if not, restore it to default.

I have an eclipse shortcut icon on the top panel that execute:

 /opt/eclipse/checkWorkspace && /opt/eclipse/eclipse

Script checkWorkspace is the seguent:

#!/bin/bash

ECLIPSE_CONFIG_PATH="/opt/eclipse/configuration"
ECLIPSE_CONFIG_FILE="config.ini"
ECLIPSE_CONFIG_SETTING="osgi.instance.area.default"
DEFAULT_WORKSPACE_PATH="@user.home/workspace"
ECLIPSE_LOG="/var/log/eclipse.log"

cd ${ECLIPSE_CONFIG_PATH}

function sedeasy {
  sed -i "s/$(echo $1 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')/$(echo $2 | sed -e 's/[\/&]/\\&/g')/g" $3
}

WORKSPACE_EXISTS=$(cat ${ECLIPSE_CONFIG_FILE} | grep ${ECLIPSE_CONFIG_SETTING})

# If workspace setting doesn't exists 
if [ -z "$WORKSPACE_EXISTS" ]; then
  echo "worskspace setting not exists, resetting to default." >> ${ECLIPSE_LOG}
  newConf=${ECLIPSE_CONFIG_SETTING}"="${DEFAULT_WORKSPACE_PATH}
  echo ${newConf} >> ${ECLIPSE_CONFIG_FILE}     
else    
   # if setting exist but it is empty
   vals=(${WORKSPACE_EXISTS//=/ }) 
   length=$(echo ${#vals[@]})
   if [ "${length}" -lt 2 ]; then
       newConf=${ECLIPSE_CONFIG_SETTING}"="${DEFAULT_WORKSPACE_PATH}
       confToReplace=$(echo ${vals[0]})
       sedeasy ${confToReplace} ${newConf} ${ECLIPSE_CONFIG_FILE}
       echo "worskspace exists but is empty, resetting to default." >> ${ECLIPSE_LOG}
   else
      echo "Worskspace already set:" "${vals[1]}"
   fi
fi

Maybe could be semplified, but works.

0
votes

I tried many solutions. I found mine in the drop down menu of the Entreprise Explorer: - Deleting org.eclipse.core.resources has no effect. - "Top Level Elements -> Projects" was already checked for me; swtiching with Documents has no effect. - Selecting all extensions in the filter option of the drop down menu has no effect at first sight, maybe it solve part of the problem.

The solution come from "Unselecting documents" (third choice in the Entreprise Explorer drop down menu). I think that choice reset the filtering of documents displayed in the Explorer.

Hope it'll helps JN Gerbaux

0
votes

Tedious but it worked for me (Kepler):

  1. Using the OS zip utility, zip everything below the project workspace folder to a zip file, to be placed in a separate directory (will use c:\tmp\workspace.zip as an example).

  2. Unzip workspace.zip to the c:\tmp directory. Assume there's a project folder called Project1

    a. Ensure all the files in Project1 have Full Control permissions for Everyone or at least 777 permissions.

  3. Remove all the project folders in the Eclipse workspace.

  4. Recreate each project one by one according to its original type (Java, Dynamic Web, etc.). (Will use Project1 as an example.) Do not add anything.

  5. In Eclipse, do File -> Import -> File System. Then select c:\tmp\Project1 as a source

  6. Select the workspace Project1 as a destination. Do not overwrite any file.

  7. In Eclipse, refresh the project and test it. It should work.

0
votes

Also had this Problem.

My Solution was to uncheck the Box PyDev: Closed Projects, even if those hidden Projects are PHP and NOT Python Projects. (Strange BUG in Eclipse/Aptana???)

Be aware that even "Closed Projects" (a Topic above Pydev closed projects) is also unchecked. So you have to uncheck both Settings.

this: eclipse shows only "open projects" in project explorer

0
votes

All of my projects were closed and I had hid the closed projects in the settings. So to open projects go to top right view menu, and uncheck Closed Projects option. Assuming it is checked already.

enter image description here

0
votes

Do the following steps

         File --> Import --> Existing Projects into Workspace

         Select the root directory as ur old root folder

         Finish.

Yahoo.. There is ur old projects again in ur project explorer

0
votes

1) File > import > Existing projects into workspace 2) Choose your workspace folder 3) select all of your projects 4) finish

All are OK with above way !!!

0
votes

File - Import - Existing projects into workspace - browse - choose your workspase - done!

0
votes

If Eclipse was killed during a shutdown, the projects database may become corrupted (the project database is normally located in: workspace/.metadata/org.eclipse.core.resources/.root/1.tree).

A message like this will be logged in Workspace/.metadata/.log:

!MESSAGE Could not read metadata for '.../.metadata/.plugins/org.eclipse.core.resources/.root/.markers'.

The data is lost. You need to import your projects again (File->Import -> General->Existing Projects into Workspace).

The list of projects that were in the workspace can still be seen in .metadata/org.eclipse.core.resources/.projects/.

Projects located outside the workspace will have a .location file with the path to the project.

0
votes

I also had the same problem.

file>restart. Projects and modules appeared after restarting the eclipse, but faced new error; An internal error occurred during: "AppXray Indexing...". java.lang.NullPointerException.

So it's good to be on safe side, import the project again in a new workspace.

0
votes

if you go to Quick Access and type in Projects you will get it your projects back.

0
votes

Choose
File > Switch Workspace> 'MyWorkSpace'

Eclipse restarts and if you are as lucky as me, the projects are mapped correctly.


In my case I have the developer environment on a shared server with about 10-15 users that may accidentally change things that affects other users.

Tip of the day: Don't do that...