Meaningless Drivel is fun!*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipe - How to Switch to Another Folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipe - How to Switch to Another Folder" Watch "Eclipe - How to Switch to Another Folder" New topic
Author

Eclipe - How to Switch to Another Folder

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
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

Joined: May 14, 2008
Posts: 5830
    
    7

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.


JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

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


Customer surveys are for companies who didn't pay proper attention to begin with.
 
jQuery in Action, 2nd edition
 
subject: Eclipe - How to Switch to Another Folder