RFR: 8366691: JShell should support a more convenient completion
Adam Sotona
asotona at openjdk.org
Wed Oct 29 09:14:44 UTC 2025
On Tue, 2 Sep 2025 13:05:01 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> JShell tool has the code completion feature in the terminal, allowing to tab-complete inputs. The JShell engine also has an API to compute the completions. But, the API is more suitable for a terminal-based UI, not for a GUI.
>
> The goal in this PR is to provide an API that would allow better code completions in GUI frontends for JShell.
>
> The main idea here is that the user of the API will get information could the context and `Element` that can continue the current input, and can produce UI elements/strings out of this information as necessary.
>
> The apidiff for the current API is available here:
> https://cr.openjdk.org/~jlahoda/8366691/JDK-8366691.00/
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27049#pullrequestreview-3392319759
More information about the compiler-dev
mailing list