Bug 83206

Summary: ICodeAssist#codeSelect(..) on implicit methods should not return a java element
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-01-19 11:34:03 EST
I20050118-1015

class User {
    enum Color {RED, GREEN, BLUE}
    void x() {
        Color.valueOf("RED");
        Color.values();
    }
}

ICodeAssist#codeSelect(..) on implicit methods 'valueOf(String)' and 'values()'
of enum Color should not return a java element. Currently, the declaring enum is
returned.
Comment 1 David Audel CLA 2005-08-31 04:24:02 EDT
Fixed in HEAD and test added
  ResolveTests_1_5#test0098()

synthetic methods aren't proposed any more.
Comment 2 Olivier Thomann CLA 2005-09-20 11:26:47 EDT
Seems that the enum declaration is still selected when using F3 on a synthetic
method reference.
Comment 3 David Audel CLA 2005-09-20 12:31:18 EDT
The problem is not fixed, there is an error inside the regression test.

valueOf() method hasn't (and must not have) the synthetic modifiers. I will make
a new fix for 3.2M3.
Comment 4 David Audel CLA 2005-10-28 10:28:23 EDT
Fixed in HEAD and test updated
  ResolveTests_1_5#test0098()
Comment 5 Frederic Fusier CLA 2005-10-28 13:03:49 EDT
Verified for 3.2 M3 using build I20051025-0800+JDT/Core HEAD