summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2012-05-15 12:50:43 (EDT)
committerIan Bull2012-05-15 12:50:43 (EDT)
commitcb3694589d14417cbbce60197f5b787dae4d04f5 (patch)
tree8632674204be2b75e82745438608849cd731bf79
parent94ce7f80072142e392b024a108525f7310c904a8 (diff)
downloadrt.equinox.p2-cb3694589d14417cbbce60197f5b787dae4d04f5.zip
rt.equinox.p2-cb3694589d14417cbbce60197f5b787dae4d04f5.tar.gz
rt.equinox.p2-cb3694589d14417cbbce60197f5b787dae4d04f5.tar.bz2
When a repository fails to load, we continue the update check. All the repositories that fail to load are 'accumulated' and shown to the user, but the update check proceeds with the available repositories. This commit changes the visibility of a method in an API class from private to protected. However, this class is marked as 'noextend' so really shouldn't be considered new API.
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java2
2 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
index e1f89a9..e8a3822 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
@@ -77,6 +77,7 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
//cancel any load that is already running
Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI()) {
+
public IStatus runModal(IProgressMonitor monitor) {
SubMonitor sub = SubMonitor.convert(monitor, getProgressTaskName(), 1000);
IStatus status = super.runModal(sub.newChild(500));
@@ -87,6 +88,12 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
} catch (OperationCanceledException e) {
return Status.CANCEL_STATUS;
}
+ if (shouldAccumulateFailures()) {
+ // If we are accumulating failures, don't return a combined status here. By returning OK,
+ // we are indicating that the operation should continue with the repositories that
+ // did load.
+ return Status.OK_STATUS;
+ }
return status;
}
};
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
index bae1955..19fef37 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
@@ -146,7 +146,7 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
}
}
- private boolean shouldAccumulateFailures() {
+ protected boolean shouldAccumulateFailures() {
return getProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS) != null;
}