Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-03-14 20:04:30 +0000
committerjames2002-03-14 20:04:30 +0000
commit9622a24da4b92deb89cc4729c7750c053fd5390d (patch)
treee3fee0a34bb89e06f755e9dc8d937bd494f78e55
parent13f77539735992618cfbba3a40db41789d0321d0 (diff)
downloadeclipse.platform.team-9622a24da4b92deb89cc4729c7750c053fd5390d.tar.gz
eclipse.platform.team-9622a24da4b92deb89cc4729c7750c053fd5390d.tar.xz
eclipse.platform.team-9622a24da4b92deb89cc4729c7750c053fd5390d.zip
11193: Wrong action enablement
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java2
3 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java
index 69087220d..d42d4f2d9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java
@@ -219,7 +219,11 @@ public class ForceCommitSyncAction extends MergeAction {
protected boolean isEnabled(ITeamNode node) {
// The force commit action is enabled only for conflicting and incoming changes
SyncSet set = new SyncSet(new StructuredSelection(node));
- return (set.hasIncomingChanges() || set.hasConflicts());
+ if (syncMode == SyncView.SYNC_OUTGOING) {
+ return set.hasConflicts();
+ } else {
+ return set.hasIncomingChanges() || set.hasConflicts();
+ }
}
/**
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java
index 87569e892..be25078a6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java
@@ -315,7 +315,11 @@ public class ForceUpdateSyncAction extends MergeAction {
protected boolean isEnabled(ITeamNode node) {
// The force update action is enabled only for conflicting and outgoing changes
SyncSet set = new SyncSet(new StructuredSelection(node));
- return (set.hasOutgoingChanges() || set.hasConflicts());
+ if (syncMode == SyncView.SYNC_INCOMING) {
+ return set.hasConflicts();
+ } else {
+ return set.hasOutgoingChanges() || set.hasConflicts();
+ }
}
/**
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java
index 44e76544e..07a7489a7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java
@@ -43,7 +43,7 @@ abstract class MergeAction extends Action {
private CVSSyncCompareInput diffModel;
private ISelectionProvider selectionProvider;
- private int syncMode;
+ protected int syncMode;
private Shell shell;
/**

Back to the top