• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipe - How to Switch to Another Folder

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic