Skip to main content

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

Hi Jonas

Please file a bug at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT&component=Text
and include a self-contained example and steps to reproduce.

Thanks,
Markus



From:        Jonas Wiklund <jwiklund@xxxxxxxxx>
To:        jdt-ui-dev@xxxxxxxxxxx
Date:        2015-11-04 15:07
Subject:        [jdt-ui-dev] LazyGenericTypeProposal adds type parameters when not        needed in some cases
Sent by:        jdt-ui-dev-bounces@xxxxxxxxxxx




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_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-ui-dev


Back to the top