Summary
Enhance the JShell API with a support for more powerful code completion for JShell snippets, suitable for GUI applications.
Problem
The JShell API currently provides a simple API for code completion for JShell snippets, but it is mostly intended for the use in terminal. When JShell is used in GUI setting, this code completion is greatly insufficient.
Solution
The proposal herein is to add a new API to aid JShell snippet code completion in GUI applications.
The proposal herein is not to add a UI-specific API, but rather to provide an API that would allow to build wide range of UIs for JShell snippet code completion.
The proposed API provides a list of possible Element
s, which can be used as a continuation from the given snippet prefix, and the overall context for the code completion. The user's of the API can then convert this information to their specific UI.
Specification
An API Diff showing the proposed API is attached as apidiff-preliminary.01.zip
, and is also available for convenience here: https://cr.openjdk.org/~jlahoda/8366691/apidiff-preliminary.01/.
- csr of
-
JDK-8366691 JShell should support a more convenient completion
-
- Open
-