Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-01-23 14:23:58 -0500
committerMichael Valenta2004-01-23 14:23:58 -0500
commit3fed011c38e7afa84716f25b2b2ec7e91e3a6960 (patch)
tree7677e4f765d00dcaa0eaf2443e083a1ea6c9825b
parentded9852c6f9673aa1fb4440a02f84289746d6fb5 (diff)
downloadeclipse.platform.team-3fed011c38e7afa84716f25b2b2ec7e91e3a6960.tar.gz
eclipse.platform.team-3fed011c38e7afa84716f25b2b2ec7e91e3a6960.tar.xz
eclipse.platform.team-3fed011c38e7afa84716f25b2b2ec7e91e3a6960.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/BackgroundEventHandler.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FastSyncInfoFilter.java164
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FilteredSyncInfoCollector.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISyncSetChangedListener.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/MutableSyncInfoSet.java21
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SyncInfoFilter.java149
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java10
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java14
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSLocalCompareConfiguration.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeViewPage.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateAction.java28
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java6
28 files changed, 293 insertions, 211 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/BackgroundEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/BackgroundEventHandler.java
index 46dc3da27..751ca782f 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/BackgroundEventHandler.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/BackgroundEventHandler.java
@@ -250,7 +250,7 @@ public abstract class BackgroundEventHandler {
System.out.println("Event processed on " + getName() + ":" + event.toString()); //$NON-NLS-1$ //$NON-NLS-2$
}
if(isReadyForDispath()) {
- dispatchEvents();
+ dispatchEvents(Policy.subMonitorFor(subMonitor, 1));
processingEventsDuration = System.currentTimeMillis();
}
} catch (CoreException e) {
@@ -267,7 +267,7 @@ public abstract class BackgroundEventHandler {
/**
* Notify clients of processed events.
*/
- protected abstract void dispatchEvents() throws TeamException;
+ protected abstract void dispatchEvents(IProgressMonitor monitor) throws TeamException;
/**
* Returns <code>true</code> if processed events should be dispatched and
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FastSyncInfoFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FastSyncInfoFilter.java
new file mode 100644
index 000000000..06d2ddf75
--- /dev/null
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FastSyncInfoFilter.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.core.subscribers;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+
+
+/**
+ * A SyncInfoFilter can be used to control, at a fine grain, {@link SyncInfo}
+ * instances in a SyncInfoSet.
+ *
+ * @see SyncInfoSet
+ * @since 3.0
+ */
+public class FastSyncInfoFilter extends SyncInfoFilter {
+
+ public static FastSyncInfoFilter getDirectionAndChangeFilter(int direction, int change) {
+ return new AndSyncInfoFilter(new FastSyncInfoFilter[]{new SyncInfoDirectionFilter(direction), new SyncInfoChangeTypeFilter(change)});
+ }
+
+ public static abstract class CompoundSyncInfoFilter extends FastSyncInfoFilter {
+ protected FastSyncInfoFilter[] filters;
+ public CompoundSyncInfoFilter(FastSyncInfoFilter[] filters) {
+ this.filters = filters;
+ }
+ }
+
+ /**
+ * Selects SyncInfo which match all child filters
+ */
+ public static class AndSyncInfoFilter extends CompoundSyncInfoFilter {
+ public AndSyncInfoFilter(FastSyncInfoFilter[] filters) {
+ super(filters);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
+ */
+ public boolean select(SyncInfo info) {
+ for (int i = 0; i < filters.length; i++) {
+ FastSyncInfoFilter filter = filters[i];
+ if (!filter.select(info)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ }
+
+ public static class AutomergableFilter extends FastSyncInfoFilter {
+ public boolean select(SyncInfo info) {
+ return (info.getKind() & SyncInfo.AUTOMERGE_CONFLICT) != 0;
+ }
+ }
+
+ public static class PseudoConflictFilter extends FastSyncInfoFilter {
+ public boolean select(SyncInfo info) {
+ return info.getKind() != 0 && (info.getKind() & SyncInfo.PSEUDO_CONFLICT) == 0;
+ }
+ }
+
+ /**
+ * Selects SyncInfo that match any of the child filters.
+ */
+ public static class OrSyncInfoFilter extends CompoundSyncInfoFilter {
+ public OrSyncInfoFilter(FastSyncInfoFilter[] filters) {
+ super(filters);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
+ */
+ public boolean select(SyncInfo info) {
+ for (int i = 0; i < filters.length; i++) {
+ FastSyncInfoFilter filter = filters[i];
+ if (filter.select(info)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+ public static class SyncInfoChangeTypeFilter extends FastSyncInfoFilter {
+
+ private int[] changeFilters = new int[]{SyncInfo.ADDITION, SyncInfo.DELETION, SyncInfo.CHANGE};
+
+ public SyncInfoChangeTypeFilter(int[] changeFilters) {
+ this.changeFilters = changeFilters;
+ }
+
+ public SyncInfoChangeTypeFilter(int change) {
+ this(new int[]{change});
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
+ */
+ public boolean select(SyncInfo info) {
+ int syncKind = info.getKind();
+ for (int i = 0; i < changeFilters.length; i++) {
+ int filter = changeFilters[i];
+ if ((syncKind & SyncInfo.CHANGE_MASK) == filter)
+ return true;
+ }
+ return false;
+ }
+
+ }
+
+ public static class SyncInfoDirectionFilter extends FastSyncInfoFilter {
+
+ int[] directionFilters = new int[] {SyncInfo.OUTGOING, SyncInfo.INCOMING, SyncInfo.CONFLICTING};
+
+ public SyncInfoDirectionFilter(int[] directionFilters) {
+ this.directionFilters = directionFilters;
+ }
+
+ public SyncInfoDirectionFilter(int direction) {
+ this(new int[] { direction });
+ }
+
+ /* (non-Javadoc)
+ * @see SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
+ */
+ public boolean select(SyncInfo info) {
+ int syncKind = info.getKind();
+ for (int i = 0; i < directionFilters.length; i++) {
+ int filter = directionFilters[i];
+ if ((syncKind & SyncInfo.DIRECTION_MASK) == filter)
+ return true;
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Return true if the provided SyncInfo matches the filter. The default
+ * behavior it to include resources whose syncKind is non-zero.
+ *
+ * @param info
+ * @return
+ */
+ public boolean select(SyncInfo info) {
+ return info.getKind() != 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.subscribers.SyncInfoFilter#select(org.eclipse.team.core.subscribers.SyncInfo, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public final boolean select(SyncInfo info, IProgressMonitor monitor) {
+ return select(info);
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FilteredSyncInfoCollector.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FilteredSyncInfoCollector.java
index 4433c18be..04f99b14d 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FilteredSyncInfoCollector.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/FilteredSyncInfoCollector.java
@@ -39,7 +39,7 @@ public final class FilteredSyncInfoCollector {
filteredInput = new SyncSetInputFromSyncSet(workingSetInput.getSyncSet());
if(filter == null) {
setFilter(new SyncInfoFilter() {
- public boolean select(SyncInfo info) {
+ public boolean select(SyncInfo info, IProgressMonitor monitor) {
return true;
}
}, null);
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISyncSetChangedListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISyncSetChangedListener.java
index 35554b70c..5ecce0b9e 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISyncSetChangedListener.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISyncSetChangedListener.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.team.core.subscribers;
+import org.eclipse.core.runtime.IProgressMonitor;
+
/**
* Classes which implement this interface provide methods that deal with the
* events that are generated as a {@link ISyncInfoSet} changes.
@@ -31,5 +33,5 @@ public interface ISyncSetChangedListener {
*
* @param event an event containing information about the change.
*/
- public void syncSetChanged(ISyncInfoSetChangeEvent event);
+ public void syncSetChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor);
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/MutableSyncInfoSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/MutableSyncInfoSet.java
index 945db4551..b67b5e848 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/MutableSyncInfoSet.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/MutableSyncInfoSet.java
@@ -14,7 +14,8 @@ import java.util.*;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.*;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.internal.core.Policy;
import org.eclipse.team.internal.core.subscribers.SyncSetChangedEvent;
public class MutableSyncInfoSet extends SyncInfoSet {
@@ -91,11 +92,11 @@ public class MutableSyncInfoSet extends SyncInfoSet {
* This method is invoked by a SyncSetInput provider when the
* provider is done providing new input to the SyncSet
*/
- public void endInput() {
- fireChanges();
+ public void endInput(IProgressMonitor monitor) {
+ fireChanges(monitor);
}
- private void fireChanges() {
+ private void fireChanges(final IProgressMonitor monitor) {
// Use a synchronized block to ensure that the event we send is static
final SyncSetChangedEvent event;
synchronized(this) {
@@ -110,6 +111,7 @@ public class MutableSyncInfoSet extends SyncInfoSet {
allListeners = (ISyncSetChangedListener[]) listeners.toArray(new ISyncSetChangedListener[listeners.size()]);
}
// Fire the events using an ISafeRunnable
+ monitor.beginTask(null, 100 * allListeners.length);
for (int i = 0; i < allListeners.length; i++) {
final ISyncSetChangedListener listener = allListeners[i];
Platform.run(new ISafeRunnable() {
@@ -117,11 +119,12 @@ public class MutableSyncInfoSet extends SyncInfoSet {
// don't log the exception....it is already being logged in Platform#run
}
public void run() throws Exception {
- listener.syncSetChanged(event);
+ listener.syncSetChanged(event, Policy.subMonitorFor(monitor, 100));
}
});
}
+ monitor.done();
}
private boolean removeFromParents(IResource resource, IResource parent) {
@@ -187,7 +190,7 @@ public class MutableSyncInfoSet extends SyncInfoSet {
/**
* Indicate whether the set has nodes matching the given filter
*/
- public boolean hasNodes(SyncInfoFilter filter) {
+ public boolean hasNodes(FastSyncInfoFilter filter) {
SyncInfo[] infos = members();
for (int i = 0; i < infos.length; i++) {
SyncInfo info = infos[i];
@@ -201,7 +204,7 @@ public class MutableSyncInfoSet extends SyncInfoSet {
/**
* Removes all nodes from this set that do not match the given filter
*/
- public void selectNodes(SyncInfoFilter filter) {
+ public void selectNodes(FastSyncInfoFilter filter) {
SyncInfo[] infos = members();
for (int i = 0; i < infos.length; i++) {
SyncInfo info = infos[i];
@@ -214,7 +217,7 @@ public class MutableSyncInfoSet extends SyncInfoSet {
/**
* Removes all nodes from this set that match the given filter
*/
- public void rejectNodes(SyncInfoFilter filter) {
+ public void rejectNodes(FastSyncInfoFilter filter) {
SyncInfo[] infos = members();
for (int i = 0; i < infos.length; i++) {
SyncInfo info = infos[i];
@@ -227,7 +230,7 @@ public class MutableSyncInfoSet extends SyncInfoSet {
/**
* Return all nodes in this set that match the given filter
*/
- public SyncInfo[] getNodes(SyncInfoFilter filter) {
+ public SyncInfo[] getNodes(FastSyncInfoFilter filter) {
List result = new ArrayList();
SyncInfo[] infos = members();
for (int i = 0; i < infos.length; i++) {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SyncInfoFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SyncInfoFilter.java
index d2ef18788..a9e0b3738 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SyncInfoFilter.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SyncInfoFilter.java
@@ -10,145 +10,36 @@
*******************************************************************************/
package org.eclipse.team.core.subscribers;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
/**
- * A SyncInfoFilter can be used to control, at a fine grain, {@link SyncInfo}
- * instances in a SyncInfoSet.
- *
- * @see SyncInfoSet
- * @since 3.0
+ * A <code>SyncInfoFilter</code> tests a <code>SyncInfo</code> for inclusion
+ * in a <code>SyncInfoSet</code>.
*/
-public class SyncInfoFilter {
-
- public static SyncInfoFilter getDirectionAndChangeFilter(int direction, int change) {
- return new AndSyncInfoFilter(new SyncInfoFilter[]{new SyncInfoDirectionFilter(direction), new SyncInfoChangeTypeFilter(change)});
- }
-
- public static abstract class CompoundSyncInfoFilter extends SyncInfoFilter {
- protected SyncInfoFilter[] filters;
- public CompoundSyncInfoFilter(SyncInfoFilter[] filters) {
- this.filters = filters;
- }
- }
+public abstract class SyncInfoFilter {
/**
- * Selects SyncInfo which match all child filters
+ * Filter that selects those <code>SyncInfo</code> whose contents do not match.
*/
- public static class AndSyncInfoFilter extends CompoundSyncInfoFilter {
- public AndSyncInfoFilter(SyncInfoFilter[] filters) {
- super(filters);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- for (int i = 0; i < filters.length; i++) {
- SyncInfoFilter filter = filters[i];
- if (!filter.select(info)) {
- return false;
- }
- }
- return true;
- }
-
- }
-
- public static class AutomergableFilter extends SyncInfoFilter {
- public boolean select(SyncInfo info) {
- return (info.getKind() & SyncInfo.AUTOMERGE_CONFLICT) != 0;
- }
- }
-
- public static class PseudoConflictFilter extends SyncInfoFilter {
- public boolean select(SyncInfo info) {
- return info.getKind() != 0 && (info.getKind() & SyncInfo.PSEUDO_CONFLICT) == 0;
+ public static class ContentComparisonSyncInfoFilter extends SyncInfoFilter {
+ ContentComparisonCriteria criteria = new ContentComparisonCriteria(false);
+ public boolean select(SyncInfo info, IProgressMonitor monitor) {
+ ISubscriberResource remote = info.getRemote();
+ IResource local = info.getLocal();
+ if (remote == null) return local.exists();
+ if (!local.exists()) return true;
+ return !criteria.compare(local, remote, monitor);
}
}
/**
- * Selects SyncInfo that match any of the child filters.
- */
- public static class OrSyncInfoFilter extends CompoundSyncInfoFilter {
- public OrSyncInfoFilter(SyncInfoFilter[] filters) {
- super(filters);
- }
- /* (non-Javadoc)
- * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- for (int i = 0; i < filters.length; i++) {
- SyncInfoFilter filter = filters[i];
- if (filter.select(info)) {
- return true;
- }
- }
- return false;
- }
- }
-
- public static class SyncInfoChangeTypeFilter extends SyncInfoFilter {
-
- private int[] changeFilters = new int[]{SyncInfo.ADDITION, SyncInfo.DELETION, SyncInfo.CHANGE};
-
- public SyncInfoChangeTypeFilter(int[] changeFilters) {
- this.changeFilters = changeFilters;
- }
-
- public SyncInfoChangeTypeFilter(int change) {
- this(new int[]{change});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ccvs.syncviews.views.SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- int syncKind = info.getKind();
- for (int i = 0; i < changeFilters.length; i++) {
- int filter = changeFilters[i];
- if ((syncKind & SyncInfo.CHANGE_MASK) == filter)
- return true;
- }
- return false;
- }
-
- }
-
- public static class SyncInfoDirectionFilter extends SyncInfoFilter {
-
- int[] directionFilters = new int[] {SyncInfo.OUTGOING, SyncInfo.INCOMING, SyncInfo.CONFLICTING};
-
- public SyncInfoDirectionFilter(int[] directionFilters) {
- this.directionFilters = directionFilters;
- }
-
- public SyncInfoDirectionFilter(int direction) {
- this(new int[] { direction });
- }
-
- /* (non-Javadoc)
- * @see SyncSetFilter#select(org.eclipse.team.core.sync.SyncInfo)
- */
- public boolean select(SyncInfo info) {
- int syncKind = info.getKind();
- for (int i = 0; i < directionFilters.length; i++) {
- int filter = directionFilters[i];
- if ((syncKind & SyncInfo.DIRECTION_MASK) == filter)
- return true;
- }
- return false;
- }
- }
-
- /**
- * Return true if the provided SyncInfo matches the filter. The default
- * behavior it to include resources whose syncKind is non-zero.
+ * Return true if the provided SyncInfo matches the filter.
*
- * @param info
+ * @param info the sync info to be tested
+ * @param monitor a progress monitor
* @return
*/
- public boolean select(SyncInfo info) {
- return info.getKind() != 0;
- }
-} \ No newline at end of file
+ public abstract boolean select(SyncInfo info, IProgressMonitor monitor);
+
+}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
index 6c9bd5302..bcc1cbe63 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
@@ -216,14 +216,14 @@ public class SubscriberEventHandler extends BackgroundEventHandler {
* for each event type.
* @param events
*/
- private void dispatchEvents(SubscriberEvent[] events) {
+ private void dispatchEvents(SubscriberEvent[] events, IProgressMonitor monitor) {
// this will batch the following set changes until endInput is called.
set.getSyncSet().beginInput();
for (int i = 0; i < events.length; i++) {
SubscriberEvent event = events[i];
switch (event.getType()) {
case SubscriberEvent.CHANGE :
- set.collect(event.getResult());
+ set.collect(event.getResult(), monitor);
break;
case SubscriberEvent.REMOVAL :
if (event.getDepth() == IResource.DEPTH_INFINITE) {
@@ -234,7 +234,7 @@ public class SubscriberEventHandler extends BackgroundEventHandler {
break;
}
}
- set.getSyncSet().endInput();
+ set.getSyncSet().endInput(monitor);
}
/**
@@ -300,8 +300,8 @@ public class SubscriberEventHandler extends BackgroundEventHandler {
/* (non-Javadoc)
* @see org.eclipse.team.core.subscribers.BackgroundEventHandler#dispatchEvents()
*/
- protected void dispatchEvents() {
- dispatchEvents((SubscriberEvent[]) resultCache.toArray(new SubscriberEvent[resultCache.size()]));
+ protected void dispatchEvents(IProgressMonitor monitor) {
+ dispatchEvents((SubscriberEvent[]) resultCache.toArray(new SubscriberEvent[resultCache.size()]), monitor);
resultCache.clear();
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java
index 0feb8842e..bb6e27d7a 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncInfoWorkingSetFilter.java
@@ -20,7 +20,7 @@ import org.eclipse.team.internal.core.TeamPlugin;
/**
* WorkingSet filter for a SyncSet.
*/
-public class SyncInfoWorkingSetFilter extends SyncInfoFilter {
+public class SyncInfoWorkingSetFilter extends FastSyncInfoFilter {
private IResource[] resources;
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
index 6987b8c15..3ff5ea4cc 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInput.java
@@ -14,6 +14,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
+import org.eclipse.team.internal.core.Policy;
/**
* This is the superclass for all SyncSet input providers
@@ -21,7 +22,7 @@ import org.eclipse.team.core.subscribers.*;
public abstract class SyncSetInput {
private MutableSyncInfoSet syncSet = new MutableSyncInfoSet();
- private SyncInfoFilter filter = new SyncInfoFilter();
+ private SyncInfoFilter filter = new FastSyncInfoFilter();
public MutableSyncInfoSet getSyncSet() {
return syncSet;
@@ -44,19 +45,22 @@ public abstract class SyncSetInput {
*/
public void reset(IProgressMonitor monitor) throws TeamException {
try {
+ monitor = Policy.monitorFor(monitor);
+ monitor.beginTask(null, 100);
syncSet.beginInput();
syncSet.clear();
- fetchInput(monitor);
+ fetchInput(Policy.subMonitorFor(monitor, 90));
} finally {
- getSyncSet().endInput();
+ getSyncSet().endInput(Policy.subMonitorFor(monitor, 10));
+ monitor.done();
}
}
/**
* Collect the change in the provided sync info.
*/
- protected void collect(SyncInfo info) {
- boolean isOutOfSync = filter.select(info);
+ protected void collect(SyncInfo info, IProgressMonitor monitor) {
+ boolean isOutOfSync = filter.select(info, monitor);
SyncInfo oldInfo = syncSet.getSyncInfo(info.getLocal());
boolean wasOutOfSync = oldInfo != null;
if (isOutOfSync) {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java
index d7041b146..50ecb8302 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SyncSetInputFromSyncSet.java
@@ -44,32 +44,32 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncSetCha
if (inputSyncSet == null) return;
SyncInfo[] infos = inputSyncSet.members();
for (int i = 0; i < infos.length; i++) {
- collect(infos[i]);
+ collect(infos[i], monitor);
}
}
/* (non-Javadoc)
* @see org.eclipse.team.ccvs.syncviews.views.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.ccvs.syncviews.views.SyncSetChangedEvent)
*/
- public void syncSetChanged(ISyncInfoSetChangeEvent event) {
+ public void syncSetChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
MutableSyncInfoSet syncSet = getSyncSet();
try {
syncSet.beginInput();
if (event.isReset()) {
syncSet.clear();
}
- syncSetChanged(event.getChangedResources());
- syncSetChanged(event.getAddedResources());
+ syncSetChanged(event.getChangedResources(), monitor);
+ syncSetChanged(event.getAddedResources(), monitor);
remove(event.getRemovedResources());
} finally {
- getSyncSet().endInput();
+ getSyncSet().endInput(monitor);
}
}
- private void syncSetChanged(SyncInfo[] infos) {
+ private void syncSetChanged(SyncInfo[] infos, IProgressMonitor monitor) {
for (int i = 0; i < infos.length; i++) {
- collect(infos[i]);
+ collect(infos[i], monitor);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
index 10ef4de4c..0adeceef3 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java
@@ -171,4 +171,10 @@ public class CVSCompareSubscriber extends CVSSyncTreeSubscriber implements ITeam
}
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getCacheFileContentsHint()
+ */
+ protected boolean getCacheFileContentsHint() {
+ return true;
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java
index 4f921b0c2..59d40773c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java
@@ -70,7 +70,7 @@ public class DeferredResourceChangeHandler extends BackgroundEventHandler {
/* (non-Javadoc)
* @see org.eclipse.team.core.subscribers.BackgroundEventHandler#dispatchEvents()
*/
- protected void dispatchEvents() throws TeamException {
+ protected void dispatchEvents(IProgressMonitor monitor) throws TeamException {
EclipseSynchronizer.getInstance().ignoreFilesChanged(getParents(changedIgnoreFiles));
changedIgnoreFiles.clear();
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
index fb0381d0b..815a334de 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
@@ -27,7 +27,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.subscribers.SyncInfoFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
import org.eclipse.team.ui.synchronize.*;
import org.eclipse.ui.help.WorkbenchHelp;
@@ -88,7 +88,7 @@ public class ReleaseCommentDialog extends DetailsDialog {
cc.setLeftEditable(false);
TeamSubscriberParticipant participant = CVSUIPlugin.getPlugin().getCvsWorkspaceSynchronizeParticipant();
- SyncInfoFilter.SyncInfoDirectionFilter filter = new SyncInfoFilter.SyncInfoDirectionFilter(SyncInfo.OUTGOING);
+ FastSyncInfoFilter.SyncInfoDirectionFilter filter = new FastSyncInfoFilter.SyncInfoDirectionFilter(SyncInfo.OUTGOING);
compareEditorInput = new SyncInfoSetCompareInput(cc,
new SyncInfoSetCompareConfiguration(null, participant.getTeamSubscriberSyncInfoCollector().getSyncInfoSet()));
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSLocalCompareConfiguration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSLocalCompareConfiguration.java
index d2a45f889..bfa3803bb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSLocalCompareConfiguration.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSLocalCompareConfiguration.java
@@ -17,6 +17,8 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.subscribers.*;
+import org.eclipse.team.core.subscribers.FilteredSyncInfoCollector;
import org.eclipse.team.core.subscribers.TeamSubscriberSyncInfoCollector;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
@@ -31,6 +33,7 @@ public class CVSLocalCompareConfiguration extends SyncInfoSetCompareConfiguratio
private CVSCompareSubscriber subscriber;
private TeamSubscriberSyncInfoCollector collector;
private RefreshAction refreshAction;
+ private FilteredSyncInfoCollector filteredSyncSet;
/**
* Return a <code>SyncInfoSetCompareConfiguration</code> that can be used in a
@@ -50,11 +53,13 @@ public class CVSLocalCompareConfiguration extends SyncInfoSetCompareConfiguratio
super("org.eclipse.team.cvs.ui.compare-participant", collector.getSyncInfoSet());
this.subscriber = subscriber;
this.collector = collector;
+ this.filteredSyncSet = new FilteredSyncInfoCollector(collector.getSyncInfoSet(), null, new SyncInfoFilter.ContentComparisonSyncInfoFilter());
}
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoSetCompareConfiguration#dispose()
*/
protected void dispose() {
+ filteredSyncSet.dispose();
collector.dispose();
subscriber.dispose();
super.dispose();
@@ -90,4 +95,10 @@ public class CVSLocalCompareConfiguration extends SyncInfoSetCompareConfiguratio
refreshAction = new RefreshAction(viewer, ((CVSSyncTreeSubscriber)collector.getTeamSubscriber()).getName(), collector, null /* no listener */, false);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.SyncInfoSetCompareConfiguration#getSyncSet()
+ */
+ public SyncInfoSet getSyncSet() {
+ return filteredSyncSet.getSyncInfoSet();
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeViewPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeViewPage.java
index 075fae7e6..565bc4229 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeViewPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeViewPage.java
@@ -13,6 +13,7 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import java.util.*;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
@@ -110,7 +111,7 @@ public class CVSSynchronizeViewPage extends TeamSubscriberParticipantPage implem
*
* @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
*/
- public void syncSetChanged(ISyncInfoSetChangeEvent event) {
+ public void syncSetChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
StructuredViewer viewer = (StructuredViewer)getChangesViewer();
if (viewer != null && getSyncInfoSet() != null) {
IStructuredContentProvider cp = (IStructuredContentProvider) viewer.getContentProvider();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
index b162cfc02..472ab2a8e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
@@ -19,8 +19,8 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.OrSyncInfoFilter;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.OrSyncInfoFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Update;
@@ -44,9 +44,9 @@ public class MergeUpdateAction extends SafeUpdateAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
// Update works for all incoming and conflicting nodes
- return new OrSyncInfoFilter(new SyncInfoFilter[] {
+ return new OrSyncInfoFilter(new FastSyncInfoFilter[] {
new SyncInfoDirectionFilter(SyncInfo.INCOMING),
new SyncInfoDirectionFilter(SyncInfo.CONFLICTING)
});
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 328b3ea62..f161f917e 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
@@ -13,14 +13,14 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.core.subscribers.SyncInfoSet;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
public class OverrideAndCommitAction extends SubscriberCommitAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING});
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
index 4703f3b44..a0b461d3a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.operations.OverrideAndUpdateOperation;
@@ -33,15 +33,15 @@ public class OverrideAndUpdateAction extends CVSSubscriberAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING});
}
- private SyncInfoFilter getConflictingAdditionFilter() {
- return new SyncInfoFilter.AndSyncInfoFilter(
- new SyncInfoFilter[] {
- new SyncInfoFilter.SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING}),
- new SyncInfoFilter.SyncInfoChangeTypeFilter(new int[] {SyncInfo.ADDITION})
+ private FastSyncInfoFilter getConflictingAdditionFilter() {
+ return new FastSyncInfoFilter.AndSyncInfoFilter(
+ new FastSyncInfoFilter[] {
+ new FastSyncInfoFilter.SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING}),
+ new FastSyncInfoFilter.SyncInfoChangeTypeFilter(new int[] {SyncInfo.ADDITION})
});
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateAction.java
index 04fb8a2fc..4fb018403 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateAction.java
@@ -20,7 +20,7 @@ import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.*;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.*;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
@@ -47,7 +47,7 @@ public abstract class SafeUpdateAction extends CVSSubscriberAction {
try {
// First, remove any known failure cases
- SyncInfoFilter failFilter = getKnownFailureCases();
+ FastSyncInfoFilter failFilter = getKnownFailureCases();
SyncInfo[] willFail = syncSet.getNodes(failFilter);
syncSet.rejectNodes(failFilter);
skippedFiles.clear();
@@ -63,7 +63,7 @@ public abstract class SafeUpdateAction extends CVSSubscriberAction {
final MutableSyncInfoSet failedSet = createFailedSet(syncSet, willFail, (IFile[]) skippedFiles.toArray(new IFile[skippedFiles.size()]));
// Remove all these from the original sync set
- syncSet.rejectNodes(new SyncInfoFilter() {
+ syncSet.rejectNodes(new FastSyncInfoFilter() {
public boolean select(SyncInfo info) {
return failedSet.getSyncInfo(info.getLocal()) != null;
}
@@ -199,21 +199,21 @@ public abstract class SafeUpdateAction extends CVSSubscriberAction {
* Return a filter which selects the cases that we know ahead of time
* will fail on an update
*/
- protected SyncInfoFilter getKnownFailureCases() {
- return new OrSyncInfoFilter(new SyncInfoFilter[] {
+ protected FastSyncInfoFilter getKnownFailureCases() {
+ return new OrSyncInfoFilter(new FastSyncInfoFilter[] {
// Conflicting additions of files will fail
- new AndSyncInfoFilter(new SyncInfoFilter[] {
- SyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.ADDITION),
- new SyncInfoFilter() {
+ new AndSyncInfoFilter(new FastSyncInfoFilter[] {
+ FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.ADDITION),
+ new FastSyncInfoFilter() {
public boolean select(SyncInfo info) {
return info.getLocal().getType() == IResource.FILE;
}
}
}),
// Conflicting changes involving a deletion on one side will aways fail
- new AndSyncInfoFilter(new SyncInfoFilter[] {
- SyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
- new SyncInfoFilter() {
+ new AndSyncInfoFilter(new FastSyncInfoFilter[] {
+ FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
+ new FastSyncInfoFilter() {
public boolean select(SyncInfo info) {
ISubscriberResource remote = info.getRemote();
ISubscriberResource base = info.getBase();
@@ -229,9 +229,9 @@ public abstract class SafeUpdateAction extends CVSSubscriberAction {
}),
// Conflicts where the file type is binary will work but are not merged
// so they should be skipped
- new AndSyncInfoFilter(new SyncInfoFilter[] {
- SyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
- new SyncInfoFilter() {
+ new AndSyncInfoFilter(new FastSyncInfoFilter[] {
+ FastSyncInfoFilter.getDirectionAndChangeFilter(SyncInfo.CONFLICTING, SyncInfo.CHANGE),
+ new FastSyncInfoFilter() {
public boolean select(SyncInfo info) {
IResource local = info.getLocal();
if (local.getType() == IResource.FILE) {
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 c5552737a..a30ee3e35 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
@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
@@ -38,7 +38,7 @@ public class SubscriberCommitAction extends CVSSubscriberAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.OUTGOING});
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java
index 4b3690795..55a0650ec 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
@@ -30,7 +30,7 @@ public class SubscriberConfirmMergedAction extends CVSSubscriberAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING});
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
index a72eb1b65..316fe4c02 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
@@ -19,8 +19,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.subscribers.MutableSyncInfoSet;
-import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ccvs.ui.AdaptableResourceList;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
@@ -183,7 +181,7 @@ public abstract class SyncInfoSetDetailsDialog extends DetailsDialog {
protected void filterSyncSet() {
// Keep only the checked resources
if (selectedResources != null) {
- getSyncSet().selectNodes(new SyncInfoFilter() {
+ getSyncSet().selectNodes(new FastSyncInfoFilter() {
public boolean select(SyncInfo info) {
IResource local = info.getLocal();
for (int i = 0; i < selectedResources.length; i++) {
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 9ec686272..0924da22e 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
@@ -19,7 +19,7 @@ import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.core.subscribers.SyncInfoSet;
-import org.eclipse.team.core.subscribers.SyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
@@ -35,7 +35,7 @@ public class WorkspaceUpdateAction extends SafeUpdateAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
*/
- protected SyncInfoFilter getSyncInfoFilter() {
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.INCOMING, SyncInfo.CONFLICTING});
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
index 20248ee84..4fda4ac3e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -61,7 +62,7 @@ public class ChangesSection extends Composite {
* Listen to sync set changes so that we can update message to user and totals.
*/
private ISyncSetChangedListener changedListener = new ISyncSetChangedListener() {
- public void syncSetChanged(ISyncInfoSetChangeEvent event) {
+ public void syncSetChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
calculateDescription();
}
};
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
index d4a537644..7a796783b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize.actions;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -73,7 +74,7 @@ public class StatusLineContributionGroup extends ActionGroup implements ISyncSet
*
* @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
*/
- public void syncSetChanged(ISyncInfoSetChangeEvent event) {
+ public void syncSetChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
if (collector != null) {
SyncInfoSet set = collector.getSyncInfoSet();
final int workspaceConflicting = (int) set.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
index 8784db09b..f036a0f92 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
@@ -15,12 +15,12 @@ import java.util.Set;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Control;
import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
/**
* This class provides the contents for a StructuredViewer using a SyncSet as the model
@@ -89,7 +89,7 @@ public abstract class SyncSetContentProvider implements IStructuredContentProvid
/* (non-Javadoc)
* @see org.eclipse.team.ccvs.syncviews.views.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.ccvs.syncviews.views.SyncSetChangedEvent)
*/
- public void syncSetChanged(final ISyncInfoSetChangeEvent event) {
+ public void syncSetChanged(final ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
final Control ctrl = viewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
index 915921ab2..0d49e02b1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
@@ -215,9 +215,9 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti
}
getFilteredSyncInfoCollector().setFilter(
- new SyncInfoFilter.AndSyncInfoFilter(
- new SyncInfoFilter[] {
- new SyncInfoFilter.SyncInfoDirectionFilter(modeFilter)
+ new FastSyncInfoFilter.AndSyncInfoFilter(
+ new FastSyncInfoFilter[] {
+ new FastSyncInfoFilter.SyncInfoDirectionFilter(modeFilter)
}), new NullProgressMonitor());
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
index b0e56cb6c..204c76f8f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.subscribers.SyncInfoFilter;
+import org.eclipse.team.core.subscribers.FastSyncInfoFilter;
import org.eclipse.team.internal.ui.actions.TeamAction;
import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
import org.eclipse.ui.*;
@@ -78,8 +78,8 @@ public abstract class SubscriberAction extends TeamAction implements IViewAction
return info != null && getSyncInfoFilter().select(info);
}
- protected SyncInfoFilter getSyncInfoFilter() {
- return new SyncInfoFilter();
+ protected FastSyncInfoFilter getSyncInfoFilter() {
+ return new FastSyncInfoFilter();
}
/**

Back to the top