Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-08-04 01:32:11 -0400
committerIgor Fedorenko2011-08-04 01:47:26 -0400
commit32465e99d2e90bb73d248e571b10c4eecf9fcf1a (patch)
tree76e20385ac5a4b4be107a87ca39d7698a117f2b9
parent69257df2ca151b98e75b65d5e4f97b25b4131dc7 (diff)
downloadm2e-core-32465e99d2e90bb73d248e571b10c4eecf9fcf1a.tar.gz
m2e-core-32465e99d2e90bb73d248e571b10c4eecf9fcf1a.tar.xz
m2e-core-32465e99d2e90bb73d248e571b10c4eecf9fcf1a.zip
344592 disovery wizard should show installation failure details
When installation fails for one reason or another, discover wizard now shows failure details in a pop-up dialog and also logs the problem to the log. This is consistent with standard p2 discover ui behaviour and is particularly useful for troubleshooting p2 dependency resolution problems. Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java
index e660b724..3793e826 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenDiscoveryWizard.java
@@ -15,9 +15,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.equinox.internal.p2.discovery.Catalog;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.m2e.internal.discovery.MavenDiscoveryIcons;
import org.eclipse.m2e.internal.discovery.Messages;
import org.eclipse.ui.statushandlers.StatusManager;
@@ -42,13 +39,10 @@ public class MavenDiscoveryWizard extends DiscoveryWizard {
try {
return MavenDiscoveryUi.install(getCatalogPage().getInstallableConnectors(), null, getContainer());
} catch(CoreException e) {
- IWizardPage page = getContainer().getCurrentPage();
- if (page instanceof WizardPage) {
- ((WizardPage) page).setMessage(e.getMessage(), IMessageProvider.ERROR);
- } else {
- // This should never happen, but just in case.
- StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- }
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=344592
+ // users need to be able to troubleshoot installation failures, so let them see all the details
+ // TODO meaningful slf4j log
+ StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
return false;
}
}

Back to the top