Bug 24533

Summary: Disabled feature shows included children's latest enable version
Product: [Eclipse Project] Platform Reporter: Christophe Elek <celek>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Dejan Glozic <dejan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: wassim.melhem
Version: 2.0   
Target Milestone: 2.0.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Christophe Elek CLA 2002-10-08 14:48:20 EDT
Install root 1.0.0
Install root 1.0.1
show disable

Disable root 1.0.0 has XYZ&Bogus 1.0.1 as children.
Disable feature should show 'real' children ????
Comment 1 Dejan Glozic CLA 2002-10-10 09:46:00 EDT
True, but that means that you (Core) should ignore 'match' for disabled 
children.
Comment 2 Dejan Glozic CLA 2002-10-10 17:49:24 EDT
*** Bug 24658 has been marked as a duplicate of this bug. ***
Comment 3 Dejan Glozic CLA 2002-10-10 18:13:55 EDT
Christophe, I am moving the defect to you for the following:

1) Modify included feature resolution to always assume match==perfect if
the parent is disabled.
2) See if there are no visual side-effects

My hunch is that 'best match' resolution for disabled feature also caused
other UI defects (in particular, comparing old->new feature trees). 
Comment 4 Dejan Glozic CLA 2002-10-11 16:20:29 EDT
Here is the spec:

IFeature getFeature() throws CoreException; // <-- currently available
IFeature getFeature(boolean exactMatch) throws CoreException; // <-- new API

Change the implementation of 'getFeature()' to be:

IFeature getFeature() throws CoreException {
	return getFeature(false);
}

IFeature getFeature(boolean exactMatch) throws CoreException {
	int match = exactMatch? <use match value> : PERFECT;
 	...
}

After 2.0.2, the new API will be moved to IIncludedFeatureReference
because it is not applicable to root-level IFeatureReference.
Comment 5 Christophe Elek CLA 2002-10-14 10:47:09 EDT
implemented:

FeatureReference now contains 2 methods to solve this issue: getFeature() and
getFeature(boolean perfectMatch)
The object caches and hydrates the 2 possibles instances of the Feature
(exactMatch and bestMatch)and returns it appropriatly.

Pass to UI for implementation.
Comment 6 Dejan Glozic CLA 2002-10-14 12:27:02 EDT
Fixed in the UI and verified.