Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-11 15:25:05 +0000
committerMichael Valenta2004-05-11 15:25:05 +0000
commit62cdb6590ecb4d936c87127e650ae56cadbacb90 (patch)
tree4b9d68c164a0812603de1713a0e065d5fbb4e6cb
parentc3677700a50256dd933b16a53479144456120c72 (diff)
downloadeclipse.platform.team-62cdb6590ecb4d936c87127e650ae56cadbacb90.tar.gz
eclipse.platform.team-62cdb6590ecb4d936c87127e650ae56cadbacb90.tar.xz
eclipse.platform.team-62cdb6590ecb4d936c87127e650ae56cadbacb90.zip
Fix checkout problem
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
index 22b0c9fb4..38655ef59 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
@@ -171,11 +171,11 @@ public abstract class CVSOperation extends TeamOperation {
* @param project
* @return
*/
- protected boolean promptToOverwrite(String title, String msg) {
+ protected boolean promptToOverwrite(final String title, final String msg) {
if (!confirmOverwrite) {
return true;
}
- String buttons[];
+ final String buttons[];
if (involvesMultipleResources()) {
buttons = new String[] {
IDialogConstants.YES_LABEL,
@@ -185,24 +185,26 @@ public abstract class CVSOperation extends TeamOperation {
} else {
buttons = new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL};
}
- Shell displayShell = getShell();
+ final Shell displayShell = getShell();
if (displayShell == null) {
// We couldn't get a shell (perhaps due to shutdown)
return false;
}
- final MessageDialog dialog =
- new MessageDialog(displayShell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
// run in syncExec because callback is from an operation,
// which is probably not running in the UI thread.
+ final int[] code = new int[] {0};
displayShell.getDisplay().syncExec(
new Runnable() {
public void run() {
+ MessageDialog dialog =
+ new MessageDialog(displayShell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
dialog.open();
+ code[0] = dialog.getReturnCode();
}
});
if (involvesMultipleResources()) {
- switch (dialog.getReturnCode()) {
+ switch (code[0]) {
case 0://Yes
return true;
case 1://Yes to all
@@ -215,7 +217,7 @@ public abstract class CVSOperation extends TeamOperation {
throw new OperationCanceledException();
}
} else {
- return dialog.getReturnCode() == 0;
+ return code[0] == 0;
}
}

Back to the top