RFR: 8370140: RichTextArea: line endings [v17]
Kevin Rushforth
kcr at openjdk.org
Fri Nov 14 19:25:33 UTC 2025
On Wed, 12 Nov 2025 19:28:58 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Adds control of line endings (newline separators) in `StyledTextModel`, `RichTextArea`, and `CodeArea`.
>>
>> The impacted areas are:
>> - saving to plain text
>> - copying to plain text
>> - IME
>>
>> This feature is implemented as a regular field in the `StyledTextModel` (since it is ultimately an attribute of the model), with convenience setter and getter in the `RichTextArea`.
>>
>> ### NOTES
>>
>> - some dependency on #1938 , resolved.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits:
>
> - system
> - Merge branch 'master' into 8370140.line.separator
> - Merge branch 'master' into 8370140.line.separator
> - Merge branch 'master' into 8370140.line.separator
> - rm property
> - try
> - Merge remote-tracking branch 'origin/master' into 8370140.line.separator
> - review comments
> - removed property
> - review comments
> - ... and 12 more: https://git.openjdk.org/jfx/compare/829d2be4...576a8575
The updated API and implementation look good. I left one minor comment about the new `system()` method and will reapprove if you make changes.
modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/LineEnding.java line 57:
> 55: /**
> 56: * Returns the system default {@code LineEnding} based on the value of system property
> 57: * {@code System.getProperty("line.separator")}.
Minor: `System.lineSeparator()` is preferred over `System.getProperty("line.separator")`.
-------------
Marked as reviewed by kcr (Lead).
PR Review: https://git.openjdk.org/jfx/pull/1944#pullrequestreview-3466365762
PR Review Comment: https://git.openjdk.org/jfx/pull/1944#discussion_r2528596488
More information about the openjfx-dev
mailing list