Community
Participate
Working Groups
Given the following code: void lambda(Object o) { Runnable r = () -> ((Str|)) } Content assist includes the correct proposals, but they can't be inserted (nothing happens). After adding the variable, it works correctly: Runnable r = () -> ((Str|) o); Tested in Version: 2021-09 (4.21) Build id: I20210811-1800 It worked in 4.19
thanks, Julian, I'm looking at this now.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/184002
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/184003
(In reply to Eclipse Genie from comment #2) > New Gerrit change created: > https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/184002 This fixes the problem, which was a matter of a bogus replacement range, viz. we were trying to replace "((Str" with "String", swallowing the two lparens. At this point the validate() method on the proposal answered false, because "((Str" is not a prefix of "String". Solution is to avoid extending the source range of the assistNode when paren pairs are consumed. (In reply to Eclipse Genie from comment #3) > New Gerrit change created: > https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/184003 A test in JDT/UI, fails without the fix.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/184002 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=c0a65fcedd4a397c92f6d3942398d3a37f16b8ae
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/184003 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=660c6a12cea3723fdbebfe16eaf7e573c05bc523
(In reply to Eclipse Genie from comment #5) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/184002 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=c0a65fcedd4a397c92f6d3942398d3a37f16b8ae Fix released for 4.21 M3 (In reply to Eclipse Genie from comment #6) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/184003 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/ > ?id=660c6a12cea3723fdbebfe16eaf7e573c05bc523 End-to-end test released, too.