Community
Participate
Working Groups
Given //--- public class KeywordCompletion { void m (String fooo) { if (fooo != null) { fo System.out.println(fooo); } } } //--- fo cannot be completed to the keyword 'for'. Same for other keywords. This doesn't happen when either the sysout or the enclosing if is removed. This was discovered in bug 574823, where removing one check in CompletionParser.fetchNextToken() accidentally fixed this issue: remove && this.expressionPtr <= -1
That works fine in I20210723-1800, also fine back to I20210718-1800. Are you sure this is not a bug in some older version?
(In reply to Andrey Loskutov from comment #1) > That works fine in I20210723-1800, also fine back to I20210718-1800. > Are you sure this is not a bug in some older version? "It works" in terms of offering "for" template proposals, but it should also propose the naked keyword "for", which it doesn't. Please remove the sysout to see what I mean. Severity set to "minor" anyway ...
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183953
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183953 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=43b3339093473b2e9632f287b07b19f344c846fe
(In reply to Eclipse Genie from comment #4) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183953 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=43b3339093473b2e9632f287b07b19f344c846fe Released for 4.21 M3: one more step to treat name references and type references alike, to become less dependent on the whim of syntax recovery.
Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id: I20210818-1800