Bug 134976

Summary: [completion] relevance of some types aren't correct
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.2   
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description David Audel CLA 2006-04-05 04:59:46 EDT
build 3.2M6

------------------------------------------------------------------
public class SerializableList extends LinkedList<Serializable|> {
}
------------------------------------------------------------------

Do ctrl + space at | location and will see that SerializableList is on the top of the proposal list and it should be Serializable
Comment 1 David Audel CLA 2006-04-05 09:59:53 EDT
The expceted type is Object and the type in the current compilation SerializableList is a subclass of Object. Serializable is found by searchAllType() but in this case type hierarchies are not computed  (it would be too costly), so Serializable isn't considered as a subclass of Object.

That's why the relevance of SerializableList is higher than relevance of Serializable.

If expected type is Object we should consider all types proposed by searchAllType() as subclasses.
Comment 2 David Audel CLA 2006-04-05 10:03:40 EDT
Created attachment 37731 [details]
Proposed fix
Comment 3 David Audel CLA 2006-04-05 10:12:08 EDT
Philippe - Do you want this fix for 3.2RC1 ?
Comment 4 Philipe Mulet CLA 2006-04-06 13:49:20 EDT
+1 for 3.2RC1
Comment 5 David Audel CLA 2006-04-07 04:28:07 EDT
Fix released and test added
  CompletionTest_1_5#test0270()
Comment 6 Maxime Daniel CLA 2006-04-13 11:57:25 EDT
Verified for 3.2 RC1 using Build id: I20060413-0010.