RFR: 8332314: Add window size configuration option to JavaShellToolBuilder interface [v3]

Archie Cobbs acobbs at openjdk.org
Tue Jun 18 16:24:02 UTC 2024


> 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 seven additional commits since the last revision:

 - Copyright years should be followed by a comma.
 - Merge branch 'master' into JavaShellToolBuilder.windowSize
 - Bump @since tag 23 -> 24.
 - Merge branch 'master' into JavaShellToolBuilder.windowSize
 - Update copyright years.
 - Fix typo in exception message.
 - Add new method JavaShellToolBuilder.windowSize().

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/19226/files
  - new: https://git.openjdk.org/jdk/pull/19226/files/39fb0972..1769df6d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19226&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19226&range=01-02

  Stats: 2149 lines in 111 files changed: 1653 ins; 180 del; 316 mod
  Patch: https://git.openjdk.org/jdk/pull/19226.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19226/head:pull/19226

PR: https://git.openjdk.org/jdk/pull/19226


More information about the kulla-dev mailing list