• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipe - How to Switch to Another Folder

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes, I have to check out the code of the same project from the Repository to another folder; say, Folder B rather than Folder A, on my local disk.

In Eclipse, how do I switch to the Folder B?

I understand that I can do File --> Switch Workspace; however, if I go to another workspace, I have to configure server, etc., in that workspace.

How do I use all the same settings already configured for the Folder A but work on the code in the Folder B? Thank you.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can copy settings from workspace to workspace by by exporting them (File | Export | General | Preferences) in the one workspace, and then importing them in the other workspace.

It would not be a good idea to check out the same project twice into different folders in Eclipse because Eclipse uses the folder name, rather than the folder name, to keep track of things.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, it's not that bad, which, perhaps is unfortunate, since I have a major production project that exists in about 5 different versions on my system right now. It's a sordid tale involving a programmer who made an unauthorized commit to the main trunk and a Beta Tester who doesn't have enough time to finish testing. All while I'm trying to do development AND support temporary fixes to the current production source.

If you want 2 copies of the same project in the same workspace, just check out another copy, but override the project's folder location on the checkout dialog.

If you literally want to replace what's in a project with an alternative version of the project, you can either brute-force delete the current project using the Project menu/Delete + Delete Files option followed by a new checkout OR you can do a Team/Switch Branch/Tag menu operation.

Per-project settings are (mostly) contained in the ".project" file that's in the root of the project. Classpath settings are in the ".classpath" file, but with careful design, the classpath can be made portable. Both of these files are straightforward text files and may be manually edited, but for best results I recommend only doing so when Eclipse is not running (or the project is closed).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic