Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Eclipe - How to Switch to Another Folder

 
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.
 
author
Posts: 5856
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.
 
Saloon Keeper
Posts: 22637
153
Android Eclipse IDE Tomcat Server Redhat Java 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).
 
Slime does not pay. Always keep your tiny ad dry.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic