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

Expose JShell text auto-completion features

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • None
    • tools
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      I need to incorporate in an application a Java editor with text auto-completion and script running capabilities. Is it possible to use classes from JShell?
      The input parameters are the script text. I should be able to execute it and get back an object.
      If I provide a text position inside the script I should be able to get a list of completion items.
      Also if there are compilation errors get them into a list.
      Is it possible to expose and document part of the JShell classes for this?

      Currently I tried implementing this using Groovy and https://github.com/GroovyLanguageServer/groovy-language-server. This is implementing https://github.com/eclipse-lsp4j/lsp4j.
      But using directly the Java classes would be a benefit. Other tools who needs to run dynamic Java would be able to include the JShell features.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: