Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RefreshResourceMappingParticipantJob.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java6
3 files changed, 12 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RefreshResourceMappingParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RefreshResourceMappingParticipantJob.java
index f504f4efc..456818e8a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RefreshResourceMappingParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RefreshResourceMappingParticipantJob.java
@@ -26,7 +26,7 @@ public class RefreshResourceMappingParticipantJob extends RefreshParticipantJob
super(participant, jobName, taskName, resources, listener);
}
- protected RefreshChangeListener doRefresh(IProgressMonitor monitor) throws CoreException {
+ protected void doRefresh(RefreshChangeListener changeListener, IProgressMonitor monitor) throws CoreException {
// TODO Auto-generated method stub
ISynchronizationContext context = ((ResourceMappingSynchronizeParticipant)getParticipant()).getContext();
IDiffChangeListener listener = null;
@@ -36,7 +36,6 @@ public class RefreshResourceMappingParticipantJob extends RefreshParticipantJob
} finally {
context.getDiffTree().removeDiffChangeListener(listener);
}
- return null;
}
private ResourceTraversal[] getTraversals() {
@@ -64,4 +63,9 @@ public class RefreshResourceMappingParticipantJob extends RefreshParticipantJob
}
+ protected RefreshChangeListener getChangeListener() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
index f8a66d92a..382699421 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
@@ -306,7 +306,7 @@ public abstract class RefreshParticipantJob extends Job {
RefreshEvent event = new RefreshEvent(reschedule ? IRefreshEvent.SCHEDULED_REFRESH : IRefreshEvent.USER_REFRESH, roots, participant);
IStatus status = null;
NonblockingProgressMonitor wrappedMonitor = null;
- RefreshChangeListener changeListener = null;
+ RefreshChangeListener changeListener = getChangeListener();
try {
event.setStartTime(System.currentTimeMillis());
if(monitor.isCanceled()) {
@@ -317,7 +317,7 @@ public abstract class RefreshParticipantJob extends Job {
// Perform the refresh
monitor.setTaskName(getName());
wrappedMonitor = new NonblockingProgressMonitor(monitor, this);
- changeListener = doRefresh(wrappedMonitor);
+ doRefresh(changeListener, wrappedMonitor);
// Prepare the results
setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf(! isJobModal()));
} catch(OperationCanceledException e2) {
@@ -368,7 +368,7 @@ public abstract class RefreshParticipantJob extends Job {
}
}
- protected abstract RefreshChangeListener doRefresh(IProgressMonitor monitor) throws CoreException;
+ protected abstract void doRefresh(RefreshChangeListener changeListener, IProgressMonitor monitor) throws CoreException;
/**
* Return the total number of changes covered by the resources
@@ -475,6 +475,8 @@ public abstract class RefreshParticipantJob extends Job {
protected abstract void handleProgressGroupSet(IProgressMonitor group);
+ protected abstract RefreshChangeListener getChangeListener();
+
protected IResource[] getResources() {
return resources;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
index 8bb53cc35..22fb2bda3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
@@ -77,10 +77,7 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
return super.belongsTo(family);
}
- protected RefreshChangeListener doRefresh(IProgressMonitor monitor) throws TeamException {
- // Set-up change listener so that we can determine the changes found
- // during this refresh.
- RefreshChangeListener changeListener = getChangeListener();
+ protected void doRefresh(RefreshChangeListener changeListener, IProgressMonitor monitor) throws TeamException {
Subscriber subscriber = getSubscriber();
if (subscriber != null) {
try {
@@ -90,6 +87,5 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
subscriber.removeListener(changeListener);
}
}
- return changeListener;
}
}

Back to the top