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 126647 Details for
Bug 264724
[publisher] ProductAction.createRootAdvice should handle the case when children don't have versions
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]
start of a patch
clipboard.txt (text/plain), 2.25 KB, created by
Ian Bull
on 2009-02-24 19:29:57 EST
(
hide
)
Description:
start of a patch
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2009-02-24 19:29:57 EST
Size:
2.25 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.publisher >Index: src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java,v >retrieving revision 1.9 >diff -u -r1.9 ProductAction.java >--- src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java 11 Feb 2009 16:25:48 -0000 1.9 >+++ src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java 25 Feb 2009 00:27:51 -0000 >@@ -108,9 +108,11 @@ > private void createRootAdvice() { > Collection list; > if (product.useFeatures()) >- list = listElements(product.getFeatures(), ".feature.group"); //$NON-NLS-1$ >+ // TODO: We need a real namespace here >+ list = versionElements(listElements(product.getFeatures(), ".feature.group"), "namespace"); //$NON-NLS-1$ > else >- list = listElements(product.getBundles(true), null); >+ //TODO: We need a real namespace here >+ list = versionElements(listElements(product.getBundles(true), null), "namespace"); > info.addAdvice(new RootIUAdvice(list)); > } > >@@ -124,6 +126,26 @@ > info.addAdvice(new ProductFileAdvice(product, configSpecs[i])); > } > >+ private Collection versionElements(Collection elements, String namespace) { >+ Collection versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class); >+ List result = new ArrayList(); >+ for (Iterator i = elements.iterator(); i.hasNext();) { >+ VersionedName element = (VersionedName) i.next(); >+ if (element.getVersion() == null || element.getVersion().equals(new Version("0.0.0"))) { //$NON-NLS-1$ >+ Iterator advice = versionAdvice.iterator(); >+ Version advizedVersion = null; >+ while (advice.hasNext()) { >+ advizedVersion = ((VersionAdvice) advice.next()).getVersion(namespace, element.getId()); >+ break; >+ } >+ // TODO: What if this version is null? >+ result.add(new VersionedName(element.getId(), advizedVersion)); >+ } else >+ result.add(element); >+ } >+ return result; >+ } >+ > private Collection listElements(List elements, String suffix) { > if (suffix == null || suffix.length() == 0) > return elements;
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 264724
: 126647 |
126648