File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Joined: May 14, 2008
Posts: 5852

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: 17417

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

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Eclipe - How to Switch to Another Folder
It's not a secret anymore!