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 66873 Details for
Bug 186576
Plug-in test hangs when launched from a singleton plug-in project.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch.
org.eclipse.hyades.test.tools.core.internal.util_patch_defect_186576.txt (text/plain), 3.17 KB, created by
Paul Slauenwhite
on 2007-05-11 11:11:49 EDT
(
hide
)
Description:
Patch.
Filename:
MIME Type:
Creator:
Paul Slauenwhite
Created:
2007-05-11 11:11:49 EDT
Size:
3.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.test.tools.core >Index: src/org/eclipse/hyades/test/tools/core/internal/util/ManifestUtil.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.tools.core/src/org/eclipse/hyades/test/tools/core/internal/util/ManifestUtil.java,v >retrieving revision 1.2 >diff -u -r1.2 ManifestUtil.java >--- src/org/eclipse/hyades/test/tools/core/internal/util/ManifestUtil.java 26 Apr 2007 16:27:39 -0000 1.2 >+++ src/org/eclipse/hyades/test/tools/core/internal/util/ManifestUtil.java 11 May 2007 15:11:25 -0000 >@@ -40,7 +40,7 @@ > * > * @author Julien Canches > * @author Paul E. Slauenwhite >- * @version April 26, 2007 >+ * @version May 11, 2007 > * @since April 26, 2007 > */ > public class ManifestUtil { >@@ -105,17 +105,27 @@ > > try { > >- String propertyValue = new Manifest(manifestFile.getContents(true)).getMainAttributes().getValue(propertyName); >+ String[] propertyValues = getPropertyValues(manifestFile, propertyName); > >- if(propertyValue != null){ >- >- propertyValue = propertyValue.trim(); >- >- if((propertyName.equals(VERSION_PROPERTY)) && (propertyValue.endsWith(".qualifier"))){ //$NON-NLS-1$ >- propertyValue = (propertyValue.substring(0, (propertyValue.length() - 10))); >+ if(propertyValues != null){ >+ >+ if(propertyValues.length > 1){ >+ >+ StringBuffer propertyValue = new StringBuffer(); >+ >+ for (int counter = 0; counter < propertyValues.length; counter++) { >+ >+ if(propertyValue.length() > 0){ >+ propertyValue.append(", "); //$NON-NLS-1$ >+ } >+ >+ propertyValue.append(propertyValues[counter]); >+ } >+ >+ return (propertyValue.toString()); > } > >- return propertyValue; >+ return (propertyValues[0]); > } > } > catch (Exception e) { >@@ -143,10 +153,35 @@ > */ > public static String[] getPropertyValues(IFile manifestFile, String propertyName) { > >- String propertyValue = getPropertyValue(manifestFile, propertyName); >- >- if(propertyValue != null){ >- return (propertyValue.split("\\s*,\\s*")); >+ try { >+ >+ String propertyValue = new Manifest(manifestFile.getContents(true)).getMainAttributes().getValue(propertyName); >+ >+ if(propertyValue != null){ >+ >+ propertyValue = propertyValue.trim(); >+ >+ String[] propertyValues = propertyValue.split("\\s*,\\s*"); //$NON-NLS-1$ >+ int colonIndex = -1; >+ >+ for (int counter = 0; counter < propertyValues.length; counter++) { >+ >+ colonIndex = propertyValues[counter].indexOf(';'); >+ >+ if(colonIndex != -1){ >+ propertyValues[counter] = propertyValues[counter].substring(0, colonIndex).trim(); >+ } >+ >+ if((propertyName.equals(VERSION_PROPERTY)) && (propertyValues[counter].endsWith(".qualifier"))){ //$NON-NLS-1$ >+ propertyValues[counter] = propertyValues[counter].substring(0, (propertyValues[counter].length() - 10)); >+ } >+ } >+ >+ return propertyValues; >+ } >+ } >+ catch (Exception e) { >+ //Ignore and return null. > } > > return null;
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 186576
: 66873 |
66901