From jlahoda at openjdk.org Mon Sep 1 05:57:51 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Mon, 1 Sep 2025 05:57:51 GMT Subject: Integrated: 8177650: JShell tool: packages in classpath don't appear in completions In-Reply-To: References: Message-ID: <5adI4-XiRbIbljX36NB6Hl5rQ9u7LcFGAyxsZVxvJpo=.2ba4eb7c-a545-46e0-b06e-ad37c940e753@github.com> On Fri, 4 Jul 2025 17:32:38 GMT, Jan Lahoda 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 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 From jlahoda at openjdk.org Mon Sep 8 05:23:04 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Mon, 8 Sep 2025 05:23:04 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v3] In-Reply-To: References: Message-ID: > When using types code like: > > @Deprecated( > > > and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits: - Merge branch 'master' into JDK-8285150 - Fixing completion prefix behavior - Merge branch 'master' into JDK-8285150-dev2 - Improving the handling of annotation attributes that are annotations and enum constants. - Merge branch 'master' into JDK-8285150 - Merge branch 'master' into JDK-8285150 - 8285150: Improve tab completion for annotations ------------- Changes: https://git.openjdk.org/jdk/pull/22840/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22840&range=02 Stats: 321 lines in 4 files changed: 300 ins; 0 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/22840.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22840/head:pull/22840 PR: https://git.openjdk.org/jdk/pull/22840 From jlahoda at openjdk.org Mon Sep 8 05:51:25 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Mon, 8 Sep 2025 05:51:25 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v4] In-Reply-To: References: Message-ID: > When using types code like: > > @Deprecated( > > > and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits: - Adding Test annotation - Merge branch 'master' into JDK-8285150 - Merge branch 'master' into JDK-8285150 - Fixing completion prefix behavior - Merge branch 'master' into JDK-8285150-dev2 - Improving the handling of annotation attributes that are annotations and enum constants. - Merge branch 'master' into JDK-8285150 - Merge branch 'master' into JDK-8285150 - 8285150: Improve tab completion for annotations ------------- Changes: https://git.openjdk.org/jdk/pull/22840/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22840&range=03 Stats: 322 lines in 4 files changed: 301 ins; 0 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/22840.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22840/head:pull/22840 PR: https://git.openjdk.org/jdk/pull/22840 From liach at openjdk.org Tue Sep 9 03:03:11 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 9 Sep 2025 03:03:11 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v4] In-Reply-To: References: Message-ID: On Mon, 8 Sep 2025 05:51:25 GMT, Jan Lahoda wrote: >> When using types code like: >> >> @Deprecated( >> >> >> and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. > > Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits: > > - Adding Test annotation > - Merge branch 'master' into JDK-8285150 > - Merge branch 'master' into JDK-8285150 > - Fixing completion prefix behavior > - Merge branch 'master' into JDK-8285150-dev2 > - Improving the handling of annotation attributes that are annotations and enum constants. > - Merge branch 'master' into JDK-8285150 > - Merge branch 'master' into JDK-8285150 > - 8285150: Improve tab completion for annotations test/langtools/jdk/jshell/ToolTabSnippetTest.java line 348: > 346: } > 347: > 348: public void testAnnotation() throws Exception { We are now junit, needs `@Test` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22840#discussion_r2331877308 From jlahoda at openjdk.org Tue Sep 9 05:41:26 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Tue, 9 Sep 2025 05:41:26 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v5] In-Reply-To: References: Message-ID: > When using types code like: > > @Deprecated( > > > and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Adding Test annotation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22840/files - new: https://git.openjdk.org/jdk/pull/22840/files/35311d8e..d99640d3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22840&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22840&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/22840.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22840/head:pull/22840 PR: https://git.openjdk.org/jdk/pull/22840 From liach at openjdk.org Tue Sep 9 14:55:02 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 9 Sep 2025 14:55:02 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v5] In-Reply-To: References: Message-ID: On Tue, 9 Sep 2025 05:41:26 GMT, Jan Lahoda wrote: >> When using types code like: >> >> @Deprecated( >> >> >> and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Adding Test annotation Though I don't really understand jshell, I find the code mostly good in terms of style. I don't know if you want other reviewers like Adam to check. ------------- Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/22840#pullrequestreview-3202009266 From jlahoda at openjdk.org Thu Sep 11 10:41:38 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 11 Sep 2025 10:41:38 GMT Subject: RFR: 8285150: Improve tab completion for annotations [v5] In-Reply-To: References: Message-ID: On Tue, 9 Sep 2025 05:41:26 GMT, Jan Lahoda wrote: >> When using types code like: >> >> @Deprecated( >> >> >> and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Adding Test annotation Thanks for the review! ------------- PR Comment: https://git.openjdk.org/jdk/pull/22840#issuecomment-3279842932 From jlahoda at openjdk.org Thu Sep 11 10:47:16 2025 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 11 Sep 2025 10:47:16 GMT Subject: Integrated: 8285150: Improve tab completion for annotations In-Reply-To: References: Message-ID: On Fri, 20 Dec 2024 06:24:13 GMT, Jan Lahoda wrote: > When using types code like: > > @Deprecated( > > > and presses ``, there should be a sensible completion, but currently there is nothing. This PR proposes to add code completion for annotation attributes. This pull request has now been integrated. Changeset: 3355a9d3 Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/3355a9d3fa3e57d489f716ebc1c885c1391274ea Stats: 323 lines in 4 files changed: 302 ins; 0 del; 21 mod 8285150: Improve tab completion for annotations Reviewed-by: liach ------------- PR: https://git.openjdk.org/jdk/pull/22840