RFR: 8177650: JShell tool: packages in classpath don't appear in completions
Jan Lahoda
jlahoda at openjdk.org
Fri Jul 4 17:37:58 UTC 2025
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
-------------
Commit messages:
- Correcting handling of modular paths.
- Improving test reliability.
- 8177650: JShell tool: packages in classpath don't appear in completions
Changes: https://git.openjdk.org/jdk/pull/26137/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26137&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8177650
Stats: 281 lines in 5 files changed: 278 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/26137.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26137/head:pull/26137
PR: https://git.openjdk.org/jdk/pull/26137
More information about the kulla-dev
mailing list