diff options
author | Ian Bull | 2012-05-15 16:50:43 +0000 |
---|---|---|
committer | Ian Bull | 2012-05-15 16:50:43 +0000 |
commit | cb3694589d14417cbbce60197f5b787dae4d04f5 (patch) | |
tree | 8632674204be2b75e82745438608849cd731bf79 | |
parent | 94ce7f80072142e392b024a108525f7310c904a8 (diff) | |
download | rt.equinox.p2-I20120515-1900.tar.gz rt.equinox.p2-I20120515-1900.tar.xz rt.equinox.p2-I20120515-1900.zip |
Bug 349628 - No update proposed when there are repository with errorsv20120515-1650I20120523-2100I20120523-1900I20120522-2100I20120522-1900I20120521-2100I20120521-1900I20120520-2100I20120520-1900I20120519-2100I20120519-1900I20120518-2345I20120518-2145I20120518-1730I20120518-1530I20120517-1915I20120516-2100I20120516-1900I20120515-2300I20120515-2200I20120515-2145I20120515-2100I20120515-1900
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.
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 e1f89a97a..e8a3822b0 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 bae1955af..19fef37dd 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; } |