Community
Participate
Working Groups
Content assist for method references misses the equivalent of the "insert on ." feature that is available for method invocations. Example: Invoke Content Assist after "StringBu": new Random(0).ints(5, 'a', 'z' + 1).collect(StringBu, null, null); You can select a proposal and then press the "." key to - insert the proposal - insert the . - open Content Assist after the . We should have similar support to write method reference completions: When you press the ":" key while a proposal is selected - insert the proposal - insert the : - ... nice magic happens ... The third step is not so clear in case of method references, because you actually need two colons to proceed. Currently, the proposals after a single colon are wrong, see bug 483515. If bug 483515 can be fixed so that proposals already appear after a single ":", then the only thing left for JDT Text is to make sure that the proposals insert the second colon as well if it's not already there. Otherwise, we may consider entering "::" when the user types a single ":". But that would need some more magic to ensure that we don't end up with ":::" when the user types the second ":". Also check cases when ":" is configured as an auto-activation trigger for Content Assist.
(In reply to Markus Keller from comment #0) > Also check cases when ":" is configured as an auto-activation trigger for > Content Assist. I tried that and ran into problems because ":" is also used in conditional expressions. The auto-activation trigger after such a ":" doesn't make sense. It's as annoying as the auto-activation trigger after the last "." in a varargs type declaration. As shown in bug 483515 comment 1, there's no easy check to find if a ":" is actually part of a method reference expression or not. We probably won't ever be able to suggest ":" as an auto-activation trigger, but we should still support it as a completion trigger for type name proposals.