Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-05-12 17:42:26 +0000
committerSusan Franklin2010-05-12 17:42:26 +0000
commitd29725a15328688a3f47c0c1bf112bed0ef70e2b (patch)
treec3e42a679caa13f67044441139ee19da3493398c
parentf19abed12ad5dbed3a6d97d0eb7fa71ba236d513 (diff)
downloadrt.equinox.p2-d29725a15328688a3f47c0c1bf112bed0ef70e2b.tar.gz
rt.equinox.p2-d29725a15328688a3f47c0c1bf112bed0ef70e2b.tar.xz
rt.equinox.p2-d29725a15328688a3f47c0c1bf112bed0ef70e2b.zip
Bug 305375 - [ui] Many dialogs about unavailable sites
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java16
2 files changed, 10 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
index 83f0c058e..f2ce43ad5 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
@@ -36,6 +36,8 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
}
return;
}
+ // Report any missing repositories.
+ job.reportAccumulatedStatus();
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
getProvisioningUI().openUpdateWizard(false, operation, job);
}
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 312ac4041..8d67bdb37 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
@@ -143,23 +143,23 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
}
private boolean shouldAccumulateFailures() {
- return getProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER) != null;
+ return getProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS) != null;
}
/**
- * Report the accumulated status to the repository tracker. If there has been
+ * Report the accumulated status for repository load failures. If there has been
* no status accumulated, or if the job has been cancelled, do not report
- * anything.
+ * anything. Detailed errors have already been logged.
*/
public void reportAccumulatedStatus() {
IStatus status = getCurrentStatus();
if (status.isOK() || status.getSeverity() == IStatus.CANCEL)
return;
- // report status
- int flags = StatusManager.LOG;
- if (ui.getPolicy().getRepositoriesVisible())
- flags = flags | StatusManager.SHOW;
- StatusManager.getManager().handle(status, flags);
+
+ // If user is unaware of individual sites, nothing to report here.
+ if (!ui.getPolicy().getRepositoriesVisible())
+ return;
+ StatusManager.getManager().handle(status, StatusManager.SHOW);
// Reset the accumulated status so that next time we only report the newly not found repos.
accumulatedStatus = null;
}

Back to the top