### Eclipse Workspace Patch 1.0 #P org.eclipse.update.core Index: src/org/eclipse/update/core/Utilities.java =================================================================== RCS file: /home/eclipse/org.eclipse.update.core/src/org/eclipse/update/core/Utilities.java,v retrieving revision 1.54 diff -u -r1.54 Utilities.java --- src/org/eclipse/update/core/Utilities.java 28 Apr 2006 15:10:32 -0000 1.54 +++ src/org/eclipse/update/core/Utilities.java 4 May 2006 17:50:21 -0000 @@ -221,13 +221,19 @@ status = new Status(IStatus.ERROR, id, code, completeString.toString(), e); } CoreException ce = new CoreException(status); - if ( e instanceof CoreException) { + + if ( e instanceof FatalIOException) { + ce = new CoreExceptionWithRootCause(status); + ((CoreExceptionWithRootCause)ce).setRootException(e); + } + /* for when we move to 1.5 + if ( e instanceof CoreException) { ce.initCause(e.getCause()); } else { ce.initCause(e); } if (e != null) - ce.setStackTrace(e.getStackTrace()); + ce.setStackTrace(e.getStackTrace());*/ return ce; } Index: .settings/org.eclipse.jdt.core.prefs =================================================================== RCS file: /home/eclipse/org.eclipse.update.core/.settings/org.eclipse.jdt.core.prefs,v retrieving revision 1.1 diff -u -r1.1 org.eclipse.jdt.core.prefs --- .settings/org.eclipse.jdt.core.prefs 3 May 2006 18:33:21 -0000 1.1 +++ .settings/org.eclipse.jdt.core.prefs 4 May 2006 17:50:21 -0000 @@ -1,5 +1,6 @@ -#Mon May 01 09:58:55 EDT 2006 +#Thu May 04 13:48:45 EDT 2006 eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 org.eclipse.jdt.core.compiler.compliance=1.4 org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning Index: src/org/eclipse/update/internal/mirror/MirrorSite.java =================================================================== RCS file: /home/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/mirror/MirrorSite.java,v retrieving revision 1.17 diff -u -r1.17 MirrorSite.java --- src/org/eclipse/update/internal/mirror/MirrorSite.java 27 Apr 2006 17:11:21 -0000 1.17 +++ src/org/eclipse/update/internal/mirror/MirrorSite.java 4 May 2006 17:50:21 -0000 @@ -44,6 +44,7 @@ import org.eclipse.update.core.model.CategoryModel; import org.eclipse.update.core.model.SiteModelFactory; import org.eclipse.update.core.model.URLEntryModel; +import org.eclipse.update.internal.core.CoreExceptionWithRootCause; import org.eclipse.update.internal.core.FatalIOException; import org.eclipse.update.internal.core.ISiteContentConsumer; import org.eclipse.update.internal.core.UpdateCore; @@ -246,7 +247,10 @@ try { provider.getPluginEntryArchiveReferences(pluginsToInstall[i], null); } catch (CoreException ce) { - if ( ignoreNonPresentPlugins && (ce.getCause() != null) && (ce.getCause() instanceof FatalIOException) ) { + if ( ignoreNonPresentPlugins && + (ce instanceof CoreExceptionWithRootCause) && + (((CoreExceptionWithRootCause)ce).getRootException() != null) && + (((CoreExceptionWithRootCause)ce).getRootException() instanceof FatalIOException) ) { System.out.println("Could not mirror plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site"); //$NON-NLS-1$//$NON-NLS-2$ } else { throw ce; @@ -293,7 +297,10 @@ storePluginArchive(references[0]); addDownloadedPluginEntry(pluginsToInstall[i]); } catch (CoreException ce) { - if ( ignoreNonPresentPlugins && (ce.getCause() != null) && (ce.getCause() instanceof FatalIOException) ) { + if ( ignoreNonPresentPlugins && + (ce instanceof CoreExceptionWithRootCause) && + (((CoreExceptionWithRootCause)ce).getRootException() != null) && + (((CoreExceptionWithRootCause)ce).getRootException() instanceof FatalIOException) ) { System.out.println("Could not write plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site"); //$NON-NLS-1$ //$NON-NLS-2$ } else { //System.out.println("ignoreNonPresentPlugins:"+ignoreNonPresentPlugins); //$NON-NLS-1$ Index: .settings/org.eclipse.jdt.ui.prefs =================================================================== RCS file: .settings/org.eclipse.jdt.ui.prefs diff -N .settings/org.eclipse.jdt.ui.prefs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .settings/org.eclipse.jdt.ui.prefs 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,3 @@ +#Thu May 04 13:48:18 EDT 2006 +eclipse.preferences.version=1 +internal.default.compliance=default Index: src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java =================================================================== RCS file: src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java diff -N src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,25 @@ +package org.eclipse.update.internal.core; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; + +public class CoreExceptionWithRootCause extends CoreException { + + private static final long serialVersionUID = 6832993239926767403L; + + private Throwable e = null; + + public CoreExceptionWithRootCause(IStatus status) { + super(status); + } + + public void setRootException(Throwable e) { + this.e = e; + } + + public Throwable getRootException() { + return e; + } + + +}