Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334034

Summary: [target] IU containers do not report all contained features
Product: [Eclipse Project] PDE Reporter: Jeff McAffer <jeffmcaffer>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: curtis.windatt.public, gunnar
Version: 3.7Keywords: contributed
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch to add the features none

Description Jeff McAffer CLA 2011-01-11 16:06:05 EST
Created attachment 186566 [details]
patch to add the features

in i0104

if you have a target with IUBundleContainers (software sites), the features included by the features added from the site do not show up in the PDE model.  As a result, they are not available for addition to products and other features.

After some discussion with Curtis, we decided to have IUBunldeContainer.getFeatures return all features in the underlying profile.  This means that multipe IU containers will return duplicate features.  TargetDefinition.getAllFeatures was updated to remove duplicates (likely a good change anyway) to compensate.  The alternative to this would be to run the slicer for each container and slice the profile with the container's roots.  This is certainly doable but is likely reasonably expensive.

I'm attaching a patch that addresses the problem.

Would be great to get this in for M5 as the problem is somewhat major for folks using features.
Comment 1 Curtis Windatt CLA 2011-01-21 16:36:24 EST
Fixed in HEAD.  Only change was to add back the return if no feature IUs were found.  Was there a specific reason this was eliminated?  The result should be the same, but exiting early saves looking through all known feature models and creating NameVersionDescriptor objects for all of them.

Thanks for the contribution.
Comment 2 Jeff McAffer CLA 2011-01-22 17:20:56 EST
I don't recall removing the return on purpose.  Thanks for catching that.  usually I try to change as little as possible.
Comment 3 Curtis Windatt CLA 2011-01-26 12:50:12 EST
Verified in I20110126-0800
Comment 4 Gunnar Wagenknecht CLA 2011-02-17 04:23:34 EST
*** Bug 337187 has been marked as a duplicate of this bug. ***