Summary
The JShell's SourceCodeAnalysis needs to be enhanced with a context for the code completion. Besides the existing "snippet" context, a new "lookup" context is introduced, to support a new "/doc" command.
Problem
A new command is introduced to JShell:
/doc <element-specification>
which opens the specified element's javadoc in a browser. To support this command, the existing code completion API needs to be enhanced with an ability to compute completion proposals and documentation proposals for a parameter of this command.
Solution
The code completion API is enhanced with a completion context, which allows to provide a different completion in a snippet and in a /doc command.
Specification
Please see attachment for the current version of the proposed API patch.
- csr of
-
JDK-8253354 A jshell command to open desktop browser with specific javadoc query
- Open