Bug 339789 - Content assist will not offer choice from a generic type that is listed in the favorites
Summary: Content assist will not offer choice from a generic type that is listed in th...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-12 09:09 EST by David Corbin CLA
Modified: 2011-04-25 02:42 EDT (History)
2 users (show)

See Also:


Attachments
test case (2.19 KB, application/zip)
2011-03-14 02:03 EDT, Ayushman Jain CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Corbin CLA 2011-03-12 09:09:54 EST
Build Identifier: M20110210-1200

I have a class that has static methods on it.  The class has a type parameter.  The class is listed in the Java/Editor/Content Assist/Favorites preferences pane.

When I type the start of one of these static method names, Eclipse does NOT offer the method in Content Assist.

I've debugged through the code, and I think I've found where this case is being tossed aside. 
org.eclipse.jdt.internal.codeassist.CompletionEngine#findFieldsAndMethodsFromFavorites has a switch statement with a case of Binding.TYPE, however adding the type in question is Binding.GENERIC_TYPE.

I did a quick spike by adding Binding.GENERIC_TYPE right along side of Binding.TYPE, and it appears to have worked, but I have no idea what other consequences might be.

Reproducible: Always

Steps to Reproduce:
1. Create a generic class
2. define a static method on it
3. Add it to the Content Assist Favorites
4. In the method of another class, type the class method name and invoke Content Assist.
Comment 1 Olivier Thomann CLA 2011-03-13 10:11:57 EDT
Could you please try with 3.7M6 ?
It seems to work for me.
Comment 2 David Corbin CLA 2011-03-13 13:19:41 EDT
You're right.  It appears to have been address in 3.7
Comment 3 Ayushman Jain CLA 2011-03-14 02:03:22 EDT
Created attachment 191081 [details]
test case

I could not reproduce using the above test case after adding p.Test.doSomething in the content assist favourites.
Comment 4 Ayushman Jain CLA 2011-03-14 02:03:50 EDT
Closing as WORKSFORME
Comment 5 Srikanth Sankaran CLA 2011-04-25 02:42:15 EDT
Verified for 3.7 M7