Bug 102031 - Content assist proposes same type twice after "call(new |"
Summary: Content assist proposes same type twice after "call(new |"
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-28 11:33 EDT by Markus Keller CLA
Modified: 2007-08-03 05:42 EDT (History)
0 users

See Also:


Attachments
Proposed fix (3.36 KB, patch)
2007-06-27 05:23 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 Markus Keller CLA 2005-06-28 11:33:00 EDT
I20050627-1435

public class Try {
    {
        new A().call(new /*content assist here*/)
    }
}

interface I {
    void call(Runnable r);
}
class A implements I{
    public void call(Runnable r) {}
}

I get the proposal for "Runnable - java.lang" twice. When I add a third
declaration of call(Runnable) to the hierarchy of A, then I get three duplicate
proposals.

This might be related to the problem from bug 95829.
Comment 1 David Audel CLA 2005-06-28 12:16:21 EDT
This problem is not related to bug 95829.

The same type is added twice in CompletionEngine#expectedTypes.
Comment 2 David Audel CLA 2007-06-27 05:23:38 EDT
Created attachment 72568 [details]
Proposed fix
Comment 3 David Audel CLA 2007-06-27 05:27:21 EDT
Released for 3.4M1.

Test added:
  CompletionTests#testCompletionEmptyTypeName4()

Duplicate expected types are now filtered.
Comment 4 Frederic Fusier CLA 2007-08-03 05:42:43 EDT
Verified for 3.4M1 using build I20070802-0800.