Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] LazyGenericTypeProposal adds type parameters when not needed in some cases

Hi,

I've spent some time tracking down an annoying behavior when completing stuff like

Map.Entry[complete here}

or ImmutableMap.of{complete here}

when the top level class is not yet imported.

It looks like the LazyGenericTypeProposal is used as a requirement for the actual completion and it will try to add type parameters even though those will never compile.

Adding 
return ch != '<' && ch != '.';
instead of
return ch != '<';

at the end of shouldAppendArguments seems to fix the problem. I think it never makes sense to include generic arguments before a dot in Java so it should be safe.

Should I create a bug ticket or how would I report something like this to have the highest chance of getting it fixed?

--
/Jonas

Back to the top