Integrated: 8278039: Code completion not woking after some statements such as "if" or "while"
Jan Lahoda
jlahoda at openjdk.java.net
Fri May 13 11:05:59 UTC 2022
On Tue, 1 Feb 2022 15:44:53 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 6a1b0989
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/6a1b09898d484324a142c20c9802b95e6cdc8388
Stats: 17 lines in 2 files changed: 12 ins; 2 del; 3 mod
8278039: Code completion not woking after some statements such as "if" or "while"
Reviewed-by: jlaskey
-------------
PR: https://git.openjdk.java.net/jdk/pull/7308
More information about the kulla-dev
mailing list