RFR: 8177650: JShell tool: packages in classpath don't appear in completions [v2]
Adam Sotona
asotona at openjdk.org
Thu Jul 17 11:59:49 UTC 2025
On Mon, 7 Jul 2025 13:05:28 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> JShell provides the code completion feature, where it suggests possible follow ups for a given snippet prefix. To allow completion for packages, JShell uses a background task to go through known classes and create an index for them.
>>
>> There are two problems with this background task:
>> - the classpath is read from the JShell's FileManager, but the FileManager may not be configured with the compile options yet, so the classpath may not be filled yet,
>> - the module path is not included in the list of paths to paths to search
>>
>> This PR proposes to:
>> - use FileManager configured by passing the compile options through javac
>> - include the module path in the search path
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>
> Avoiding problems with locked files on Windows.
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26137#pullrequestreview-3029214655
More information about the compiler-dev
mailing list