Bug 83206 - ICodeAssist#codeSelect(..) on implicit methods should not return a java element
Summary: ICodeAssist#codeSelect(..) on implicit methods should not return a java element
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-19 11:34 EST by Markus Keller CLA
Modified: 2005-10-28 13:03 EDT (History)
0 users

See Also:


Attachments

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