Integrated: 8177650: JShell tool: packages in classpath don't appear in completions
Jan Lahoda
jlahoda at openjdk.org
Mon Sep 1 05:57:51 UTC 2025
On Fri, 4 Jul 2025 17:32:38 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
This pull request has now been integrated.
Changeset: 28942406
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/28942406020881be79b7543105b9eb2a0dda429e
Stats: 373 lines in 5 files changed: 340 ins; 23 del; 10 mod
8177650: JShell tool: packages in classpath don't appear in completions
Reviewed-by: asotona
-------------
PR: https://git.openjdk.org/jdk/pull/26137
More information about the compiler-dev
mailing list