Moving project to another folder in Eclipse

EclipseEclipse Pdt

Eclipse Problem Overview


I generally have my working projects sitting on folders on my Desktop. When they are completed I just move them to a c:\dev\. The thing is I'm doing it in a rather archaic way.

1. move project files
2. delete project on Eclipse
3. create new project on Eclipse on the new location

How to you guys move projects around?

If I could alter the: File -> Properties -> Resource -> Location path it would be dead simple!

Example move:

c:\user\desktop\project_123
c:\dev\project_123

Eclipse Solutions


Solution 1 - Eclipse

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. This will also preserve your CVS or other SCM metadata, but will also bring all your modifications as well, and you won't lose any memberships in Working Sets, launch configurations, or other things that Eclipse associates with your project.

Solution 2 - Eclipse

Use Eclipse's Move menu item

Open Navigator view, right click on your project and click Move. Then select the destination directory.

Navigator View > Right Click > Move

Note it doesn't seem to work in Package Explorer (at least not in Neon). The move dialog from Package Explorer is different, so use the Navigator window.

enter image description here

enter image description here

Solution 3 - Eclipse

I don't know whether eclipse has made modifs since the date of this post... In my case I had moved a project folder manually and I wanted Eclipse to open the project on this new location. This is what I did (and it seems to work).

  • (I'm using eclipse "helios" v 3.6.2)

  • File menu | Import ...

  • General | Existing projects into Workspace

  • Select root directory = top directory of your project on the new location

  • Finish

Solution 4 - Eclipse

I rarely have any projects in Eclipse that aren't under source control, so all I would need to do is check the project out in the new location.

If you don't have source control, Eclipse works with CVS rather well out of the box, and it's pretty simple to setup CVS to run locally without a server: http://www.tortoisecvs.org/faq.html#cvsinit

Solution 5 - Eclipse

WHEN EVERYTHING ELSE FAILS:

Copying an Eclipse project from one directory (let's call it old_dir) to another directory (let's call it new_dir):

  1. Open Eclipse and specify the copied working directory in your new_dir.

  2. Once it opens the project in the this new_dir, the projects listed under Project Explorer Tab might still be the ones contained in the old_dir (you can check it by right clicking each and following through: "Resource -> Linked Resource" to see the Path Variables values). Thus, they have to be removed from this work space. Delete the Nios 2 Application Project and the BSP Project from the Project Explorer Tab by right clicking on it and selecting Delete option which will pop a new window. In the pop-up window, make sure that the Delete project contents on disk check box is UNCHECKED before clicking OK to delete the Projects. Otherwise, it will delete it from the old_dir where you copied the project from.

  3. Right click in the Project Explorer Tab Area → Import → General → Existing Projects into Workspace and add the copied Nios2 Application Project and the BSP Project from the new_dir.

  4. Right click in the Project Explorer Tab Area → Index → Rebuild, otherwise the Nios2 Application Project will not be able to use the includes provided by the BSP Project.

  5. Click on Project → Clean → OK to clean and rebuild the whole project.

  6. When using console to talk to the NIOS, make sure elf's path is updated to the new project directory as well!

Solution 6 - Eclipse

I copied the whole project to a new directory. After setting Eclipse to the new workspace it recognises the project instantly. Thus it was nothing further to do. I use Eclipse IDE for C/C++ Developers, Version Luna Service Release 2 (4.4.2).

Solution 7 - Eclipse

Right click on your project->copy.

right click in project explorer free space and right click->pase.

chose new folder and project name.

Solution 8 - Eclipse

For Eclipse Oxygen, to move a Java project, djb's accepted answer works well (in my experience just now), except having read comment by Basic May 14 '12 at 9:27, I tried to add my project XMLDiff to C:...\SVN\trunk\Internal Projects, and I got a failure with the rather cryptic message:

> Problems encountered while moving resources. > > Resource already exists on disk.

I had to move the project to C:...\SVN\trunk\Internal Projects\XMLDiff by creating a new folder, XMLDiff, in the browse dialog, and the result was C:...\SVN\trunk\Internal Projects\XMLDiff, not C:...\SVN\trunk\Internal Projects\XMLDiff\XMLDiff.

So this must have changed between Basic's experience in 2012 and Eclipse.3.

Solution 9 - Eclipse

For Eclipse Oxygen

Project Properties -> Resource -> Linked Resources -> Linked Resources (Tab)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFrankieView Question on Stackoverflow
Solution 1 - EclipsedjbView Answer on Stackoverflow
Solution 2 - EclipsetypoerrprView Answer on Stackoverflow
Solution 3 - Eclipselate-at-the-partyView Answer on Stackoverflow
Solution 4 - EclipseRodney GitzelView Answer on Stackoverflow
Solution 5 - EclipseAlex AleyanView Answer on Stackoverflow
Solution 6 - EclipseChris_PankView Answer on Stackoverflow
Solution 7 - EclipsemohammadsdtmndView Answer on Stackoverflow
Solution 8 - EclipseTamiasView Answer on Stackoverflow
Solution 9 - Eclipseuser207064View Answer on Stackoverflow