RFR: 8368478: RichTextArea: add IME support [v2]

Kevin Rushforth kcr at openjdk.org
Wed Oct 29 19:46:21 UTC 2025


On Wed, 29 Oct 2025 18:12:36 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Adds Input Method Editor (IME) support to `RichTextArea`/`CodeArea`.
>> 
>> Tested on macOS and Windows 11 with Japanese and Chinese (pinyin) input methods.
>> Please test this on Linux, even though there is no platform-specific code in this PR (should work the same way it does in `TextArea`/`TextField`)
>> 
>> For testing, one can use the updated Monkey Tester
>> https://github.com/andy-goryachev-oracle/MonkeyTest
>> (optionally enable IME events in stdout with Logging -> IME Monitor)
>
> Andy Goryachev 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 11 additional commits since the last revision:
> 
>  - review comments
>  - Merge branch 'master' into 8368478.ime
>  - test
>  - accessor
>  - cleanup
>  - whitespace
>  - Merge remote-tracking branch 'origin/master' into 8368478.ime
>  - ime object
>  - ime location
>  - ime works
>  - ... and 1 more: https://git.openjdk.org/jfx/compare/5f3ce593...3bb8d850

> I'd prefer to keep TODOs as they point to the areas that need improvement or further work.

Then how about adding another TODO in the newly added method? That one is actually related to this PR, and is another place that (once this is integrated) you will want to change when you implement [JDK-8370902](https://bugs.openjdk.org/browse/JDK-8370902).

modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/TextCell.java line 232:

> 230:             dy = f.snappedTopInset();
> 231: 
> 232:             p = f.getUnderlineShape(start, end);

Suggestion:

            p = f.getUnderlineShape(start, end); // TODO new api

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

PR Review: https://git.openjdk.org/jfx/pull/1938#pullrequestreview-3395788677
PR Review Comment: https://git.openjdk.org/jfx/pull/1938#discussion_r2475102754


More information about the openjfx-dev mailing list