Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
View
16 plugins/net.bioclipse.ui/src/net/bioclipse/ui/dialogs/PickWorkspaceDialog.java
@@ -34,6 +34,7 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Label;
/**
* Dialog that lets/forces a user to enter/select a workspace that will be used when saving all configuration files and
@@ -183,8 +184,10 @@ public void handleEvent(Event event) {
// checkbox below
_RememberWorkspaceButton = new Button(inner, SWT.CHECK);
- _RememberWorkspaceButton.setText("Remember workspace");
- _RememberWorkspaceButton.setSelection(_preferences.getBoolean(_KeyRememberWorkspace, false));
+ _RememberWorkspaceButton.setText("Always start with default workspace");
+ _RememberWorkspaceButton.setSelection(!_preferences.getBoolean(_KeyRememberWorkspace, false));
+ new Label(inner, SWT.NONE);
+ new Label(inner, SWT.NONE);
return inner;
} catch (Exception err) {
@@ -393,6 +396,12 @@ protected void okPressed() {
_lastUsedWorkspaces.removeAll(remove);
}
+ String wsps = getWorkspacePathSuggestion();
+
+ if ( !_lastUsedWorkspaces.contains( wsps ) ) {
+ _lastUsedWorkspaces.add( wsps );
+ }
+
// create a string concatenation of all our last used workspaces
StringBuffer buf = new StringBuffer();
for (int i = 0; i < _lastUsedWorkspaces.size(); i++) {
@@ -401,9 +410,10 @@ protected void okPressed() {
buf.append(_SplitChar);
}
}
+
// save them onto our preferences
- _preferences.putBoolean(_KeyRememberWorkspace, _RememberWorkspaceButton.getSelection());
+ _preferences.putBoolean(_KeyRememberWorkspace, !_RememberWorkspaceButton.getSelection());
_preferences.putBoolean(_KeyLastUsedWorkspaces, true);
_preferences.put(_KeyLastUsedWorkspaces, buf.toString());

No commit comments for this range

Something went wrong with that request. Please try again.