Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion team/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.team.core; singleton:=true
Bundle-Version: 3.10.1000.qualifier
Bundle-Version: 3.10.1100.qualifier
Bundle-Activator: org.eclipse.team.internal.core.TeamPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.core.Messages;
Expand Down Expand Up @@ -91,24 +92,18 @@ public IResource[] refresh(IResource[] resources, int depth, IProgressMonitor mo
*/
protected IResource[] refresh(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
IResource[] changedResources = null;
monitor.beginTask(null, 100);
SubMonitor mon = SubMonitor.convert(monitor, 100);
try {
monitor.setTaskName(NLS.bind(Messages.SynchronizationCacheRefreshOperation_0,
mon.setTaskName(NLS.bind(Messages.SynchronizationCacheRefreshOperation_0,
resource.getFullPath().makeRelative().toString()));

// build the remote tree only if an initial tree hasn't been provided
IResourceVariant tree = fetchVariant(resource, depth, Policy.subMonitorFor(monitor, 70));
IResourceVariant tree = fetchVariant(resource, depth, mon.split(70));

// update the known remote handles
IProgressMonitor sub = Policy.infiniteSubMonitorFor(monitor, 30);
try {
sub.beginTask(null, 64);
changedResources = collectChanges(resource, tree, depth, Policy.subMonitorFor(sub, 64));
} finally {
sub.done();
}
changedResources = collectChanges(resource, tree, depth, mon.split(30));
} finally {
monitor.done();
mon.done();
}
if (changedResources == null) {
return new IResource[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
Expand Down Expand Up @@ -368,12 +369,7 @@ protected synchronized boolean isQueueEmpty() {
protected IStatus processEvents(IProgressMonitor monitor) {
errors.clear();
try {
// It's hard to know how much work is going to happen
// since the queue can grow. Use the current queue size as a hint to
// an infinite progress monitor
monitor.beginTask(null, IProgressMonitor.UNKNOWN);
IProgressMonitor subMonitor = Policy.infiniteSubMonitorFor(monitor, 90);
subMonitor.beginTask(null, 1024);
SubMonitor subMonitor = SubMonitor.convert(monitor, 1024);

Event event;
timeOfLastDispatch = System.currentTimeMillis();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,4 @@ public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks
return SubMonitor.convert(monitor, ticks);
}

public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
if (monitor == null) {
return new NullProgressMonitor();
}
if (monitor instanceof NullProgressMonitor) {
return monitor;
}
return new InfiniteSubProgressMonitor(monitor, ticks);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.ProgressMonitorWrapper;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.team.core.ITeamStatus;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.TeamStatus;
Expand Down Expand Up @@ -110,11 +111,11 @@ protected void collectAll(
int depth,
IProgressMonitor monitor) {

monitor.beginTask(null, IProgressMonitor.UNKNOWN);
SubMonitor subMonitor = SubMonitor.convert(monitor);
try {

// Create a monitor that will handle preemption and dispatch if required
IProgressMonitor collectionMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN) {
IProgressMonitor collectionMonitor = new ProgressMonitorWrapper(subMonitor) {
boolean dispatching = false;
@Override
public void subTask(String name) {
Expand Down
Loading