Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving project to another folder in Eclipse

People also ask

Can I move Eclipse workspace to another folder?

Close Eclipse. Open the location of the workspace and cut paste the entire directory (which contains the ". metadata" directory into the intended location. Restart Eclipse with newly copied folder as the workspace (parent directory of ".

How do I move a package to another package in Eclipse?

Right-click the package you want to move, and select " Refactor/Rename..." -- NOT " Move "! Modify the name of the package to reflect its desired new position in the package hierarchy, e.g. Prepend any new parent package name(s) if you are moving the package to downwards in the package hierarchy.

How do I change the default project location in Eclipse?

Step 1: First open the eclipse in its default workspace. Step 2: Go to menu File -> Switch Workspace -> Other. We will get the UI as below. Step 3: Click on Browse button and configure the required location.


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.


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


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


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


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!


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).