18038
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
index e0a6650..3dcf164 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
@@ -678,10 +678,8 @@
* Installation has been cancelled, abort and revert
*/
private void abort() throws CoreException {
- // throws an exception that will be caught by the install
- // the install will abort the consumer.
- CoreException exp = Utilities.newCoreException(Policy.bind("Feature.InstallationCancelled"), null); //$NON-NLS-1$
- throw new InstallAbortedException(exp);
+ String msg = Policy.bind("Feature.InstallationCancelled"); //$NON-NLS-1$
+ throw new InstallAbortedException(msg,null);
}
/*
@@ -840,12 +838,9 @@
int result = verificationListener.prompt(vr);
if (result == IVerificationListener.CHOICE_ABORT) {
- CoreException exp = Utilities
- .newCoreException(
- Policy.bind("JarVerificationService.CancelInstall"),
- //$NON-NLS-1$
- vr.getVerificationException());
- throw new InstallAbortedException(exp);
+ String msg = Policy.bind("JarVerificationService.CancelInstall"); //$NON-NLS-1$
+ Exception e = vr.getVerificationException();
+ throw new InstallAbortedException(msg,e);
}
if (result == IVerificationListener.CHOICE_ERROR) {
throw Utilities
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
index b226765..6a20374 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
@@ -4,7 +4,7 @@
* All Rights Reserved.
*/
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.*;
/**
* Exception thrown when the user cancelled an installation.
@@ -19,7 +19,7 @@
*
* @since 2.0
*/
- public InstallAbortedException(CoreException exp) {
- super(exp.getStatus());
+ public InstallAbortedException(String msg,Exception e) {
+ super(new Status(IStatus.INFO,"org.eclipse.update.core",IStatus.OK,msg,e));
}
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfiguredSite.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfiguredSite.java
index 93d1b0b..d1eeb32 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfiguredSite.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfiguredSite.java
@@ -207,42 +207,30 @@
installedFeatureRef =
getSite().install(feature, verificationListener, monitor);
- if (monitor!=null && monitor.isCanceled()){
- if (UpdateManagerPlugin.DEBUG
- && UpdateManagerPlugin.DEBUG_SHOW_INSTALL) {
- UpdateManagerPlugin.debug(
- "Install cancelled: "
- + installedFeatureRef.getURL().toExternalForm());
- }
+ if (UpdateManagerPlugin.DEBUG
+ && UpdateManagerPlugin.DEBUG_SHOW_INSTALL) {
+ UpdateManagerPlugin.debug(
+ "Sucessfully installed: "
+ + installedFeatureRef.getURL().toExternalForm());
+ }
- // everything done ok
- activity.setStatus(IActivity.STATUS_NOK);
- } else {
- if (UpdateManagerPlugin.DEBUG
- && UpdateManagerPlugin.DEBUG_SHOW_INSTALL) {
- UpdateManagerPlugin.debug(
- "Sucessfully installed: "
- + installedFeatureRef.getURL().toExternalForm());
+ if (installedFeatureRef!=null){
+ try {
+ installedFeature = installedFeatureRef.getFeature();
+ } catch (CoreException e) {
+ UpdateManagerPlugin.warn(null,e);
}
-
- if (installedFeatureRef!=null){
- try {
- installedFeature = installedFeatureRef.getFeature();
- } catch (CoreException e) {
- UpdateManagerPlugin.warn(null,e);
- }
- }
-
- // everything done ok
- activity.setStatus(IActivity.STATUS_OK);
- // notify listeners
- Object[] siteListeners = listeners.getListeners();
- for (int i = 0; i < siteListeners.length; i++) {
- if (installedFeature != null) {
- IConfiguredSiteChangedListener listener =
- ((IConfiguredSiteChangedListener) siteListeners[i]);
- listener.featureInstalled(installedFeature);
- }
+ }
+
+ // everything done ok
+ activity.setStatus(IActivity.STATUS_OK);
+ // notify listeners
+ Object[] siteListeners = listeners.getListeners();
+ for (int i = 0; i < siteListeners.length; i++) {
+ if (installedFeature != null) {
+ IConfiguredSiteChangedListener listener =
+ ((IConfiguredSiteChangedListener) siteListeners[i]);
+ listener.featureInstalled(installedFeature);
}
}
} catch (CoreException e) {
@@ -254,13 +242,12 @@
SiteManager.getLocalSite().getCurrentConfiguration();
((InstallConfiguration) current).addActivityModel(activity);
}
-
- // call the configure task
+ // call the configure task
if (installedFeature!=null)
configure(installedFeature, false);
/*callInstallHandler*/
-
- return installedFeatureRef;
+
+ return installedFeatureRef;
}
/*
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
index 2eb13d8..8a5bfc6 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
@@ -128,11 +128,8 @@
int result = listener.prompt(verificationResult);
if (result == IVerificationListener.CHOICE_ABORT) {
- CoreException exp= Utilities
- .newCoreException(Policy.bind("JarVerificationService.CancelInstall"),
- //$NON-NLS-1$
- verificationResult.getVerificationException());
- throw new InstallAbortedException(exp);
+ Exception e = verificationResult.getVerificationException();
+ throw new InstallAbortedException(Policy.bind("JarVerificationService.CancelInstall"),e);
}
if (result == IVerificationListener.CHOICE_ERROR) {
throw Utilities
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFile.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFile.java
index 81f1e60..e61af44 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFile.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFile.java
@@ -68,12 +68,7 @@
IFeature localFeature = createExecutableFeature(sourceFeature);
IFeatureReference localFeatureReference = null;
- try{
- localFeatureReference = sourceFeature.install(localFeature, verificationListener, monitor);
- } catch (InstallAbortedException e){
- // warn user
- UpdateManagerPlugin.warn("Install aborted:");
- }
+ localFeatureReference = sourceFeature.install(localFeature, verificationListener, monitor);
return localFeatureReference;
}
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPlugin.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPlugin.java
index f8b891e..dc9428b 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPlugin.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPlugin.java
@@ -174,14 +174,21 @@
}
public static void log(IStatus status, boolean showErrorDialog) {
- if (showErrorDialog)
- ErrorDialog.openError(
+ if (status.getSeverity()!=IStatus.INFO){
+ if (showErrorDialog)
+ ErrorDialog.openError(
+ getActiveWorkbenchShell(),
+ null,
+ null,
+ status);
+ //ResourcesPlugin.getPlugin().getLog().log(status);
+ Platform.getPlugin("org.eclipse.core.runtime").getLog().log(status);
+ } else {
+ MessageDialog.openInformation(
getActiveWorkbenchShell(),
null,
- null,
- status);
- //ResourcesPlugin.getPlugin().getLog().log(status);
- Platform.getPlugin("org.eclipse.core.runtime").getLog().log(status);
+ status.getMessage());
+ }
}
public static IFeature[] searchSite(