Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 151660

Summary: Content assist pushing generics in my face
Product: [Eclipse Project] JDT Reporter: Randy Hudson <hudsonr>
Component: CoreAssignee: David Audel <david_audel>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Randy Hudson CLA 2006-07-24 23:10:04 EDT
Why can't I use content assist to complete the insertion for collection classes such as HashMap? If I use content assist, the following is inserted:

new HashMap<K, V>; 

This is not what I want. I want just the name of the type and for the import to be added to my compilation unit. In otherwords, I just want "HashMap".

What if I am trying to call a static method on the class "HashMap" (ok, there aren't any, but it's a "what if")? It's impossible to use content assist to help with the class name:

println("foo");
HashM<<CONTENT ASSIST>>

(notice I'm not doing a new instance)

I have 1.3 level compiler compliance level set, and I am still getting the above inserted into my code, which results in non-compiling source. Please tell me a workaround to avoid having generics-aware content assist.
Comment 1 Maxime Daniel CLA 2006-07-25 08:17:54 EDT
Does not happen with 3.2.
Comment 2 Randy Hudson CLA 2006-07-25 09:29:21 EDT
3.2 is where the problem was discovered.
Comment 3 Randy Hudson CLA 2006-07-25 09:29:39 EDT
BTW, my JRE is sun java 5.
Comment 4 Eclipse Genie CLA 2019-06-07 17:34:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.