Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-10-06 20:28:43 +0000
committerMichael Valenta2004-10-06 20:28:43 +0000
commitf9819f75d694740f47c7b3bf22b101f61a6a6c0a (patch)
tree945c693ef996a1cdaf5e314a4361f87de27f4c55
parent96322cf9e74b203aedd4cf7ad5e83457084a0a1e (diff)
downloadeclipse.platform.team-f9819f75d694740f47c7b3bf22b101f61a6a6c0a.tar.gz
eclipse.platform.team-f9819f75d694740f47c7b3bf22b101f61a6a6c0a.tar.xz
eclipse.platform.team-f9819f75d694740f47c7b3bf22b101f61a6a6c0a.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java19
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ChangeSetCapability.java4
5 files changed, 31 insertions, 12 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java
index 892fc09e7..b0e57b3eb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSChangeSetCapability.java
@@ -28,7 +28,7 @@ public class CVSChangeSetCapability extends ChangeSetCapability {
* @see org.eclipse.team.ui.synchronize.ChangeSetCapability#supportsActiveChangeSets()
*/
public boolean supportsActiveChangeSets() {
- return false;
+ return getActiveChangeSetManager() != null;
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
index fd9cfaac9..fe44bf05e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
@@ -155,8 +155,16 @@ public class CVSParticipant extends SubscriberParticipant {
*/
public ChangeSetCapability getChangeSetCapability() {
if (capability == null) {
- capability = new CVSChangeSetCapability();
+ capability = createChangeSetCapability();
}
return capability;
}
+
+ /**
+ * Create the change set capability for this particpant.
+ * @return the created capability
+ */
+ protected CVSChangeSetCapability createChangeSetCapability() {
+ return new CVSChangeSetCapability();
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
index 97c42107f..fa088f061 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.subscribers.SubscriberChangeSetCollector;
import org.eclipse.team.core.synchronize.*;
import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
import org.eclipse.team.internal.ccvs.core.CVSTag;
@@ -196,4 +197,22 @@ public class CompareParticipant extends CVSParticipant implements IPropertyChang
protected String getShortTaskName() {
return Policy.bind("Participant.comparing"); //$NON-NLS-1$
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipant#createChangeSetCapability()
+ */
+ protected CVSChangeSetCapability createChangeSetCapability() {
+ return new CVSChangeSetCapability() {
+ public SubscriberChangeSetCollector getActiveChangeSetManager() {
+ return CVSUIPlugin.getPlugin().getChangeSetManager();
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#enableActiveChangeSetsFor(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
+ */
+ public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
+ return super.enableActiveChangeSetsFor(configuration) ||
+ configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY;
+ }
+ };
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
index 7924a4c88..dfc41cf34 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
@@ -126,14 +126,6 @@ public class WorkspaceSynchronizeParticipant extends ScopableSubscriberParticipa
}
public class WorkspaceChangeSetCapability extends CVSChangeSetCapability {
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ChangeSetCapability#supportsActiveChangeSets()
- */
- public boolean supportsActiveChangeSets() {
- return true;
- }
-
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ChangeSetCapability#createChangeSet(org.eclipse.team.core.synchronize.SyncInfo[])
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ChangeSetCapability.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ChangeSetCapability.java
index 932393d6d..3908403a3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ChangeSetCapability.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ChangeSetCapability.java
@@ -123,7 +123,7 @@ public abstract class ChangeSetCapability {
* @return whether checked-in change sets should be enabled for the given state
* in the configuration
*/
- public final boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
+ public boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
return supportsCheckedInChangeSets() &&
(configuration.getMode() == ISynchronizePageConfiguration.INCOMING_MODE ||
configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY);
@@ -136,7 +136,7 @@ public abstract class ChangeSetCapability {
* @return whether active change sets should be enabled for the given state
* in the configuration
*/
- public final boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
+ public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
return supportsActiveChangeSets() &&
configuration.getMode() == ISynchronizePageConfiguration.OUTGOING_MODE;
}

Back to the top