Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 132245 Details for
Bug 272400
Need better director error reporting on product export
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated patch
272400.txt (text/plain), 3.64 KB, created by
Andrew Niefer
on 2009-04-17 10:42:28 EDT
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2009-04-17 10:42:28 EDT
Size:
3.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.core >Index: src_ant/org/eclipse/pde/internal/core/ant/ExportBuildListener.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ExportBuildListener.java,v >retrieving revision 1.3 >diff -u -r1.3 ExportBuildListener.java >--- src_ant/org/eclipse/pde/internal/core/ant/ExportBuildListener.java 2 Jan 2008 15:56:18 -0000 1.3 >+++ src_ant/org/eclipse/pde/internal/core/ant/ExportBuildListener.java 17 Apr 2009 14:41:42 -0000 >@@ -10,10 +10,9 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.core.ant; > >-import org.apache.tools.ant.BuildEvent; >-import org.apache.tools.ant.BuildListener; >-import org.apache.tools.ant.Project; >+import org.apache.tools.ant.*; > import org.eclipse.pde.internal.core.exports.FeatureExportOperation; >+import org.eclipse.pde.internal.core.exports.ProductExportOperation; > > public class ExportBuildListener implements BuildListener { > >@@ -50,7 +49,20 @@ > /* (non-Javadoc) > * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent) > */ >+ private static final String RUN_DIRECTOR = "runDirector"; //$NON-NLS-1$ >+ private static final String DIRECTOR_OUTPUT = "p2.director.java.output"; //$NON-NLS-1$ >+ > public void taskFinished(BuildEvent event) { >+ if (event.getException() != null && event.getTarget().getName().equals(RUN_DIRECTOR)) { >+ String directorOutput = event.getProject().getProperty(DIRECTOR_OUTPUT); >+ if (directorOutput != null) { >+ int idx = directorOutput.indexOf("Installation failed."); //$NON-NLS-1$ >+ if (idx > -1) { >+ String part2 = directorOutput.substring(idx); >+ ProductExportOperation.setErrorMessage(part2); >+ } >+ } >+ } > } > > /* (non-Javadoc) >Index: src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java,v >retrieving revision 1.50 >diff -u -r1.50 ProductExportOperation.java >--- src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 16 Apr 2009 19:35:43 -0000 1.50 >+++ src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 17 Apr 2009 14:41:42 -0000 >@@ -36,6 +36,16 @@ > private String fRoot; > private IProduct fProduct; > >+ protected static String errorMessage; >+ >+ public static void setErrorMessage(String message) { >+ errorMessage = message; >+ } >+ >+ public static String getErrorMessage() { >+ return errorMessage; >+ } >+ > public ProductExportOperation(FeatureExportInfo info, String name, IProduct product, String root) { > super(info, name); > fProduct = product; >@@ -51,6 +61,7 @@ > configurations = new String[][] {{TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL()}}; > > cleanupBuildRepo(); >+ errorMessage = null; > > try { > monitor.beginTask("", 10); //$NON-NLS-1$ >@@ -67,6 +78,8 @@ > } catch (InvocationTargetException e) { > return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e.getTargetException()); > } catch (CoreException e) { >+ if (errorMessage != null) >+ return new MultiStatus(PDECore.PLUGIN_ID, 0, new IStatus[] {e.getStatus()}, errorMessage, null); > return e.getStatus(); > } finally { > // Clean up generated files >@@ -86,6 +99,7 @@ > > } finally { > monitor.done(); >+ errorMessage = null; > } > return Status.OK_STATUS; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272400
:
131995
|
132245
|
133401