On Fri, 31 Oct 2025 18:48:57 GMT, Andy Goryachev <[email protected]> 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), and as a property in the 
>> `CodeArea`.
>> 
>> NOTE:
>> - some dependency on #1938 , resolved.
>
> Andy Goryachev has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   get text

Code change looks good to me. I have minor suggestions.
Also played around with demos everything works fine.

modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/StringBuilderStyledOutput.java
 line 39:

> 37: 
> 38:     public StringBuilderStyledOutput(LineEnding lineEnding) {
> 39:         sb = new StringBuilder(1024);

Its better to name this constant.

modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/util/RichUtils.java
 line 176:

> 174:         }
> 175:         return switch(v) {
> 176:         case CR -> "\r";

Missing indentation.

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

Marked as reviewed by jdv (Committer).

PR Review: https://git.openjdk.org/jfx/pull/1944#pullrequestreview-3415733643
PR Review Comment: https://git.openjdk.org/jfx/pull/1944#discussion_r2489992597
PR Review Comment: https://git.openjdk.org/jfx/pull/1944#discussion_r2490000411

Reply via email to