Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-08-05 15:06:41 -0400
committerJean Michel-Lemieux2003-08-05 15:06:41 -0400
commit66af8f94b7c9af0d86619dd687996a1e7cfaa659 (patch)
treeb61166afe8e4aff5805c7681620e1ea10d87c549
parent7a493b7f05e28c59fafed4ccd486426038af3adb (diff)
downloadeclipse.platform.team-66af8f94b7c9af0d86619dd687996a1e7cfaa659.tar.gz
eclipse.platform.team-66af8f94b7c9af0d86619dd687996a1e7cfaa659.tar.xz
eclipse.platform.team-66af8f94b7c9af0d86619dd687996a1e7cfaa659.zip
Updated enablement for sync view actions
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java9
4 files changed, 31 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 58382dfda..55b2f597b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -262,7 +262,7 @@ CVSAction.refreshMultipleQuestion={0} Would you like to refresh the projects of
CommitAction.commitFailed=Problems encountered performing commit
CommitSyncAction.questionRelease=You have changes that conflict with the server. Release those changes?
-CommitSyncAction.titleRelease=Release Conflicts?
+CommitSyncAction.titleRelease=Confirm Overwrite
CommitSyncAction.releaseAll=Release all changes, overriding any conflicting changes on the server.
CommitSyncAction.releasePart=Only release the changes that don't conflict with changes on the server.
CommitSyncAction.cancelRelease=Cancel the release operation.
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
index 4c5832707..ced35e588 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
@@ -10,10 +10,20 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.subscriber;
+import org.eclipse.team.core.subscribers.SyncInfo;
+import org.eclipse.team.ui.sync.SyncInfoDirectionFilter;
+import org.eclipse.team.ui.sync.SyncInfoFilter;
import org.eclipse.team.ui.sync.SyncInfoSet;
public class OverrideAndCommitAction extends SubscriberCommitAction {
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
+ */
+ protected SyncInfoFilter getSyncInfoFilter() {
+ return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING, SyncInfo.INCOMING});
+ }
+
protected boolean promptForConflictHandling(SyncInfoSet syncSet) {
// If there is a conflict in the syncSet, we need to prompt the user before proceeding.
if (syncSet.hasConflicts() || syncSet.hasIncomingChanges()) {
@@ -22,10 +32,8 @@ public class OverrideAndCommitAction extends SubscriberCommitAction {
// Yes, synchronize conflicts as well
break;
case 1:
- // No, only synchronize non-conflicting changes.
- syncSet.removeConflictingNodes();
- syncSet.removeIncomingNodes();
- break;
+ // No, stop here
+ return false;
case 2:
default:
// Cancel
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java
index 6a224ae81..344eeb4a9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java
@@ -31,6 +31,8 @@ import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
import org.eclipse.team.internal.ccvs.ui.sync.ToolTipMessageDialog;
import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.sync.SyncInfoDirectionFilter;
+import org.eclipse.team.ui.sync.SyncInfoFilter;
import org.eclipse.team.ui.sync.SyncInfoSet;
public class SubscriberCommitAction extends CVSSubscriberAction {
@@ -38,6 +40,13 @@ public class SubscriberCommitAction extends CVSSubscriberAction {
private String comment;
/* (non-Javadoc)
+ * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
+ */
+ protected SyncInfoFilter getSyncInfoFilter() {
+ return new SyncInfoDirectionFilter(new int[] {SyncInfo.OUTGOING});
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getFilteredSyncInfoSet(org.eclipse.team.internal.ui.sync.views.SyncInfo[])
*/
protected SyncInfoSet getFilteredSyncInfoSet(SyncInfo[] selectedResources) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
index 669d2b334..a8bd65767 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
@@ -25,6 +25,8 @@ import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.operations.ReplaceOperation;
+import org.eclipse.team.ui.sync.SyncInfoDirectionFilter;
+import org.eclipse.team.ui.sync.SyncInfoFilter;
import org.eclipse.team.ui.sync.SyncInfoSet;
/**
@@ -33,6 +35,13 @@ import org.eclipse.team.ui.sync.SyncInfoSet;
public class WorkspaceUpdateAction extends SafeUpdateAction {
/* (non-Javadoc)
+ * @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
+ */
+ protected SyncInfoFilter getSyncInfoFilter() {
+ return new SyncInfoDirectionFilter(new int[] {SyncInfo.INCOMING, SyncInfo.CONFLICTING});
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateAction#runUpdateDeletions(org.eclipse.team.core.subscribers.SyncInfo[], org.eclipse.core.runtime.IProgressMonitor)
*/
protected void runUpdateDeletions(SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {

Back to the top