Bug 166972 [Workbench] Migrate org.eclipse.ui.ide.workbench to IApplication
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEApplication.java
if (!checkValidWorkspace(shell, instanceLoc.getURL())) {
				return false;
			}
            
            
            try {
                if (instanceLoc.lock()) {
                    writeWorkspaceVersion();
                    return true;
                }
                
                  
                
                
                
                File workspaceDirectory = new File(instanceLoc.getURL().getFile());
                if (workspaceDirectory.exists()) {
	                MessageDialog.openError(
	                        shell,
	                        IDEWorkbenchMessages.IDEApplication_workspaceCannotLockTitle,
	                        IDEWorkbenchMessages.IDEApplication_workspaceCannotLockMessage);
                } else {
                	MessageDialog.openError(
                			shell, 
                			IDEWorkbenchMessages.IDEApplication_workspaceCannotBeSetTitle,
                			IDEWorkbenchMessages.IDEApplication_workspaceCannotBeSetMessage);
                }
            } catch (IOException e) {
                IDEWorkbenchPlugin.log("Could not obtain lock for workspace location",