RFR: 8332314: Add window size configuration option to JavaShellToolBuilder interface [v2]
Jan Lahoda
jlahoda at openjdk.org
Tue Jun 18 12:03:23 UTC 2024
On Thu, 13 Jun 2024 16:04:48 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> When launching JShell programmatically (i.e., from a Java program instead of the command line) for an interactive session, it's not currently possible to inform JShell what the terminal window's dimensions are. As a result, JShell defaults to 80x24 and line editing becomes almost impossible because of the scrambled screen contents unless you happen to be using an 80x24 window, which these days is very unlikely.
>>
>> This patch adds a new method `JavaShellToolBuilder.windowSize()` which allows passing a "hint" for the number of rows & columns.
>
> Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - Bump @since tag 23 -> 24.
> - Merge branch 'master' into JavaShellToolBuilder.windowSize
> - Update copyright years.
> - Fix typo in exception message.
> - Add new method JavaShellToolBuilder.windowSize().
Some commands missing in the license header. Sorry for that.
src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellToolBuilder.java line 2:
> 1: /*
> 2: * Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved.
(Assuming the header is intended:) there must be a comma after the year (i.e. `2024,` instead of `2024`).
src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java line 2:
> 1: /*
> 2: * Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved.
(Assuming the header is intended:) there must be a comma after the year (i.e. `2024,` instead of `2024`).
-------------
Changes requested by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19226#pullrequestreview-2125326208
PR Review Comment: https://git.openjdk.org/jdk/pull/19226#discussion_r1644347181
PR Review Comment: https://git.openjdk.org/jdk/pull/19226#discussion_r1644347737
More information about the kulla-dev
mailing list