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

Bug 406534

Summary: Code completion for parameters of type Class<?> should not generate generics
Product: [Eclipse Project] JDT Reporter: Oliver Drotbohm <odrotbohm>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, stephan.herrmann
Version: 3.8.2   
Target Milestone: 4.16 M3   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug

Description Oliver Drotbohm CLA 2013-04-25 07:31:11 EDT
Assume I have a generic class Foo<T>. Bejond that I have a method taking a Class<?> as attribute: bar(Class<?> type).

Now when you're in the method parameter and trigger code completion…

bar(F… + CTRL + SPACE

and you select a type, JDT generates the generic type signature Foo<T> which never makes sense as the class literal does not take generic arguments. Instead, code completion should provide plain Foo and maybe even complete to Foo.class.
Comment 1 Jay Arthanareeswaran CLA 2013-04-26 00:50:38 EDT
I see it suggesting Foo<T> but upon selecting it puts a plain Foo and not Foo<T>. Is it still a problem?
Comment 2 Eclipse Genie CLA 2020-04-24 01:40:54 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.