Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-05-13 09:05:22 -0400
committerJean Michel-Lemieux2002-05-13 09:05:22 -0400
commit872539d9c11db6e6fd9b293054f0f048122cd159 (patch)
tree1dfce99b4fb06e94a133cd372b84797bfe2679cc /bundles/org.eclipse.team.cvs.ui
parent61d74942ceaabbd53c699d3a519a161566864ba3 (diff)
downloadeclipse.platform.team-872539d9c11db6e6fd9b293054f0f048122cd159.tar.gz
eclipse.platform.team-872539d9c11db6e6fd9b293054f0f048122cd159.tar.xz
eclipse.platform.team-872539d9c11db6e6fd9b293054f0f048122cd159.zip
Bug 15837: Prompt when saving in sync view: shouldn't prompt if file already outgoing
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
index 15482ff17..601470c6d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
@@ -47,7 +47,6 @@ import org.eclipse.team.internal.ui.sync.TeamFile;
public class CVSSyncCompareInput extends SyncCompareInput {
private IResource[] resources;
- private TeamFile previousTeamFile = null;
private boolean onlyOutgoing = false;
public CVSSyncCompareInput(IResource[] resources) {
@@ -217,7 +216,16 @@ public class CVSSyncCompareInput extends SyncCompareInput {
// prompt user with warning
Shell shell = getShell();
if(shell != null) {
- promptForConfirmMerge(getShell());
+ // prompt
+ if(source instanceof TeamFile) {
+ TeamFile file = (TeamFile)source;
+ int direction = file.getChangeDirection();
+ int type = file.getChangeType();
+ if(direction == IRemoteSyncElement.INCOMING ||
+ direction == IRemoteSyncElement.CONFLICTING) {
+ promptForConfirmMerge(getShell());
+ }
+ }
}
}
@@ -250,7 +258,6 @@ public class CVSSyncCompareInput extends SyncCompareInput {
if(!store.getBoolean(ICVSUIConstants.PREF_PROMPT_ON_SAVING_IN_SYNC)) {
return;
};
-
shell.getDisplay().syncExec(new Runnable() {
public void run() {
AvoidableMessageDialog dialog = new AvoidableMessageDialog(
@@ -371,5 +378,4 @@ public class CVSSyncCompareInput extends SyncCompareInput {
private static boolean isDirty(IFile file) {
return isDirty(CVSWorkspaceRoot.getCVSFileFor(file));
}
-
}

Back to the top