Community
Participate
Working Groups
No content assist is offered in the following example: public class Overwrite { void test(Test t) { Map<String, String> map = new HashMap<>(); if (true) { t.counter.| // <<-- map.put("", ""); } } static class Test { AtomicInteger counter = new AtomicInteger(); } } Issue doesn't occur without either the surrounding if (plain block works) or the following statement. Tested in Version: 2021-09 (4.21) Build id: I20210725-1800
Moving to JDT Core for investigation.
Interestingly, whitespace matters here: works: t.counter.|map.put("", ""); doesn't work: t.counter.| map.put("", "");
The fix for bug 574215 was incomplete, as it accounted only for a single prefix "p.|" not for more like "p.q.|". I have a patch under test.
Fix has been approved by jenkins, but notifications are absent or slow here in bugzilla. What's more: we seem to have lost some recent commits in git. Linking to my message on cross-projects doesn't work either, because https://www.eclipse.org/lists/cross-project-issues-dev/index.html doesn't know that August has begun.
After restoring master history from my local copy, I could now merge the change, it's https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=6443fa1eee558369cd85281b7f623853cf6a469e Let's see if we get any automatic linking from gerrit.
Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id: I20210818-1800
For posterity: this fix was superseded by part of the fix in bug 575631 (4.22 M2).