Bug 134976 - [completion] relevance of some types aren't correct
Summary: [completion] relevance of some types aren't correct
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-05 04:59 EDT by David Audel CLA
Modified: 2006-04-13 11:57 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (22.09 KB, patch)
2006-04-05 10:03 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.