Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8367252

JShell should support a more convenient completion

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • tools
    • None
    • source
    • minimal
    • Java API
    • JDK

      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 Elements, 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/.

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: