Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the Resource Location of an existing Eclipse project

Tags:

eclipse

I have wanted to do this a few times, for various reasons.

Firstly in the case where I have specified the Location incorrectly when I created the project. This project is part of a larger project, and I either want to go up or down a directory level to include more or less other stuff.

Secondly in the case where I have an existing eclipse project. I want to reuse the project on a different source tree (actually a different subversion branch of the same project).

The Resource Location field seems to be read only. The only way of achieving the above that I've found is creating a new project. Does anyone have any way of doing this?

Edit: I only want to change the Resource Location, not move the whole project.

like image 384
qbert220 Avatar asked Jun 28 '11 14:06

qbert220


People also ask

How do I move an Eclipse project to another folder?

Right click on the Eclipse project in the Package Explorer, select Refactor, then select Move... In the dialog that comes up, enter or navigate to the new location and click OK.

Can I move my Eclipse workspace?

The best way is to close Eclipse and physically only move the hidden . metadata directory to where you want it to be. That way only your workspace is migrated leaving your projects at their original locations. However, your method is OK if you are fine with migrating your projects with the workspace.


2 Answers

The location of a project is the location of its .project file. So you need to delete project (Do NOT select delete content checkbox), then move the .project file to a new location and import the project from there.

Creating new project does pretty much the same except you do not loose any project specifics/types.

like image 175
Max Avatar answered Sep 19 '22 14:09

Max


Yes. You can do that by using the following option:

On the Project, Right click and select option "Refactor" and then choose the option "Move". This will pop up a dialog box. Specify the folder where you want your project to be.

Once the move operation is successful, your project is moved to a new location and you will see that Resource Location is pointing to a new folder that you have specified.

like image 41
jajalvipul Avatar answered Sep 20 '22 14:09

jajalvipul