RFR: 8278039: Code completion not woking after some statements such as "if" or "while" [v2]

Jan Lahoda jlahoda at openjdk.java.net
Thu May 12 13:47:13 UTC 2022


> Consider these snippets with completion:
> 
> String s = "";
> if (s.c<tab>
> 
> 
> The completion here proposes:
> 
> char   com.
> 
> 
> which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition.
> 
> The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found.

Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'master' into JDK-8278039
 - 8278039: Code completion not woking after some statements such as "if" or "while"

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7308/files
  - new: https://git.openjdk.java.net/jdk/pull/7308/files/396cb838..1c9c550a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=00-01

  Stats: 565091 lines in 7625 files changed: 417024 ins; 80337 del; 67730 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7308.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7308/head:pull/7308

PR: https://git.openjdk.java.net/jdk/pull/7308


More information about the kulla-dev mailing list