How can I change a project's location pointer in Eclipse?

Redsandro picture Redsandro · May 24, 2013 · Viewed 67.3k times · Source

A project has moved to a different location, so Eclipse won't open the project. You'll immediately think about simply changing the pointer to the location, but in Eclipse they try to make this impossible for some reason.

You cannot change the project location in the Project Explorer properties.

You can go to [workspace]/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/ProjectName and try to edit .location which is the pointer to the project, but this file is purposely stored in binary.

How do I change this .location, is there a tool for that? Any other way to simply point my old project entry to it's new location?

Answer

Kai picture Kai · May 24, 2013

Delete the project from eclipse.

ENSURE THAT THE CHECK BOX is UNSELECTED, during this delete

And then import the project by File -> Import -> Import existing project and choose it from the new location.

Don't try to modify the eclipse files manually!