remember = false;
}
}
// if we don't remember the workspace, show the dialog
if (!remember || switch_failed) {
SelectWorkspace dialog = new SelectWorkspace(shell);
// if the user cancelled, we can't do anything as we need a workspace, so in this case, we tell them and exit
if (dialog.open() == Window.CANCEL) {
MessageDialog.openError(shell, "Error",
"The application can not start without a workspace root and will now exit.");
try {
PlatformUI.getWorkbench().close();
} catch (Exception err) {
}
return false;
}
// tell Eclipse what the selected location was and continue
instanceLoc.set(new URL("file", null, dialog.getSelectedWorkspaceLocation()), false);
}
else {
// set the last used location and continue
instanceLoc.set(new URL("file", null, lastUsedWs), false);
}