Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-04-19 00:02:31 -0400
committerJean Michel-Lemieux2002-04-19 00:02:31 -0400
commitabdfc77df343b0c63a8d50ae95dfe10df7301652 (patch)
tree7471c04a353c9429910fa02ba0bed70ec0f5010b
parente50154f613f3149152e65f31340c0ca5ceeb2afd (diff)
downloadeclipse.platform.team-abdfc77df343b0c63a8d50ae95dfe10df7301652.tar.gz
eclipse.platform.team-abdfc77df343b0c63a8d50ae95dfe10df7301652.tar.xz
eclipse.platform.team-abdfc77df343b0c63a8d50ae95dfe10df7301652.zip
Bug 12790: No chance to abort on second 'replace from repository'Root_saveDirtyEditorsBranch
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithAction.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java1
2 files changed, 10 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithAction.java
index ce65c3878..e231a02e8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithAction.java
@@ -61,7 +61,16 @@ public abstract class ReplaceWithAction extends TeamAction {
throw new InterruptedException();
}
}
+
protected boolean getConfirmOverwrite() {
return confirmOverwrite;
}
+
+ /**
+ * It's important to note that actions have state and subclasses should
+ * reset the confirmation setting before calling getConfirmOverwrite().
+ */
+ protected void setConfirmOverwrite(boolean shouldConfirm) {
+ this.confirmOverwrite = shouldConfirm;
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
index 5a9f94bee..375debfe3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
@@ -30,6 +30,7 @@ public class ReplaceWithRemoteAction extends ReplaceWithAction {
public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
try {
// Check if any resource is dirty.
+ setConfirmOverwrite(true);
IResource[] candidateResources = getSelectedResources();
List targetResources = new ArrayList();
for (int i = 0; i < candidateResources.length; i++) {

Back to the top