Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-02-04 18:47:28 +0000
committerjames2002-02-04 18:47:28 +0000
commit32bbe8040ad833604bfc38ed3accc26c37de7fea (patch)
treecefe0bc8145cbb852e6e76225d1088d28d7a2f42
parent2b81a8e3ef94337913b863b8e1c553c1740dfd6f (diff)
downloadeclipse.platform.team-32bbe8040ad833604bfc38ed3accc26c37de7fea.tar.gz
eclipse.platform.team-32bbe8040ad833604bfc38ed3accc26c37de7fea.tar.xz
eclipse.platform.team-32bbe8040ad833604bfc38ed3accc26c37de7fea.zip
Fix shell creation
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
index 0bfaa3a95..a3e8e6828 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
@@ -88,15 +88,20 @@ public class WorkbenchUserAuthenticator implements IUserAuthenticator {
* @param userMutable whether the user can be changed in the dialog
* @param result a String array of length two in which to put the result
*/
- private void promptForPassword(ICVSRepositoryLocation location, String username, String message, boolean userMutable, String[] result) {
- Shell shell = new Shell();
- UserValidationDialog dialog = new UserValidationDialog(shell, location.getLocation(), (username==null)?"":username, message);
- dialog.setUsernameMutable(userMutable);
- dialog.open();
+ private void promptForPassword(final ICVSRepositoryLocation location, final String username, final String message, final boolean userMutable, final String[] result) {
+ final Display display = Display.getDefault();
+ display.syncExec(new Runnable() {
+ public void run() {
+ Shell shell = new Shell(display);
+ UserValidationDialog dialog = new UserValidationDialog(shell, location.getLocation(), (username==null)?"":username, message);
+ dialog.setUsernameMutable(userMutable);
+ dialog.open();
- shell.dispose();
- result[0] = dialog.getUsername();
- result[1] = dialog.getPassword();
+ shell.dispose();
+ result[0] = dialog.getUsername();
+ result[1] = dialog.getPassword();
+ }
+ });
}
/**
* @see IUserAuthenticator#cachePassword

Back to the top