Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-04-24 00:54:45 -0400
committerSusan Franklin2008-04-24 00:54:45 -0400
commitb07b9c1c60ef04c3993b89acbc14f837f3b9acb7 (patch)
tree58ec73ce6bce0a75f1a36242d72739f587bad2d3 /bundles
parent630a3528181fe8c7b694d463abc5e1b7901a50d7 (diff)
downloadrt.equinox.p2-b07b9c1c60ef04c3993b89acbc14f837f3b9acb7.tar.gz
rt.equinox.p2-b07b9c1c60ef04c3993b89acbc14f837f3b9acb7.tar.xz
rt.equinox.p2-b07b9c1c60ef04c3993b89acbc14f837f3b9acb7.zip
Bug 227686 -[ui] NPE when refreshing repo added as a zip file
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java3
2 files changed, 10 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java
index 7962ac8f5..3fd56d24d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java
@@ -100,17 +100,14 @@ public class ProvisioningOperationRunner {
}
return status;
} catch (final ExecutionException e) {
- final IStatus[] status = new IStatus[1];
- shell.getDisplay().asyncExec(new Runnable() {
- public void run() {
- status[0] = ProvUI.handleException(e.getCause(), NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel()), errorStyle);
- if (noPrompt) {
- thisJob.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- thisJob.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
- }
- }
- });
- return status[0];
+ if (noPrompt) {
+ thisJob.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+ thisJob.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
+ }
+ String message = e.getCause().getLocalizedMessage();
+ if (message == null)
+ message = NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel());
+ return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, e.getCause());
}
}
};
@@ -135,7 +132,7 @@ public class ProvisioningOperationRunner {
this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
}
- return ProvUI.handleException(e.getCause(), NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel()), errorStyle);
+ return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel()), e.getCause());
}
}
};
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java
index e1b51a7d4..53ce08b4e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java
@@ -23,8 +23,8 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
+import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
import org.eclipse.equinox.internal.provisional.p2.ui.policy.IQueryProvider;
import org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement;
@@ -276,7 +276,6 @@ public class AvailableIUGroup extends StructuredIUGroup {
ProvisioningUtil.loadMetadataRepository(location, null);
} catch (ProvisionException e) {
// ignore because we were doing this "for free."
- return;
}
display.asyncExec(new Runnable() {
public void run() {

Back to the top