Java Development Tools

Prompting for an Eclipse workspace location

By Sal Pece

TheServerSide.com

If you're working with IBM's Rational Application Developer (IRAD), Zend Studio, Photran or any of the other rapid application development tools that are based on Eclipse, you've probably got more than one active workspace.

Switching between workspaces

A nice addition to the Eclipse platform that came about a few years ago was the ability to switch between code repository locations from directly within the tool using the File--> Switch Workspace option. In a similar vein, the ability to create multiple shortcuts and point each shortcut at a different workspace using the -data switch was also a very useful feature. However, sometimes you have so many workspaces going, and it takes so long for each workspace to start up, that you actually want to be prompted for a workspace location on start-up. So, how do you configure Eclipse to do that?

Prompting for a workspace location

The trick is to dig into the org.eclipse.ui.ide.prefs file in the \configuration sub-folder of the Eclipse installation directory. You'll find all sorts of interesting options in there, including the SHOW_WORKSPACE_SELECTION_DIALOG setting. Updating this switch to true will cause Eclipse to prompt you for a workspace location every time you start the tool. Sure, it can be a tad annoying if you're always going to the same workspace location, but if you're juggling between three or four on a daily basis, it can be a godsend.


Sample org.eclipse.ui.ide.prefs file

RECENT_WORKSPACES_PROTOCOL=3 
MAX_RECENT_WORKSPACES=5 
SHOW_WORKSPACE_SELECTION_DIALOG=true 
eclipse.preferences.version=1 
RECENT_WORKSPACES=C\:\\workspaces\

 

08 Jun 2011

Related Content

Related Resources

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.