RFR: 8366201: RichTextArea: remove allowUndo parameter [v6]
María Bárbara Salinas Luna
barbara.salinas at tec.mx
Fri Oct 31 00:23:46 UTC 2025
Hi OpenJFX 🙂
I am a 57 years old IT Teacher, I am learning Java and JavaFX, as I have some doubts I requested to enter to your distribution list, so I could ask my doubts, but I am receiving many emails everyday and I could see that all of you are experts programming with JavaFX ;)
I think I should look for a different way to ask my biginner doubts, that´s why I am respectfully asking you to delete my name from your distribution list.
It was a pleasure to read you for few days, I would like to have more time to study much more about JavaFX so I could become an expert like you, for sure I'll do that in the future ;)
Thanks in advance for your kind attention, have a nice afternoon 🙂
Master Ma. Bárbara Salinas Luna
Profesora de planta
Departamento de Ciencias
Preparatoria Esmeralda
Campus Estado de México
Tecnológico de Monterrey
Tel. +55 5864 5370
barbara.salinas at tec.mx
________________________________
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Andy Goryachev <angorya at openjdk.org>
Sent: Thursday, October 30, 2025 4:36 PM
To: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: Re: RFR: 8366201: RichTextArea: remove allowUndo parameter [v6]
On Thu, 30 Oct 2025 17:39:18 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Original user feedback (see https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openjdk.org%2Fpipermail%2Fopenjfx-discuss%2F2025-August%2F000267.html&data=05%7C02%7Cbarbara.salinas%40tec.mx%7C8692f3db4ee14304fffa08de18052523%7Cc65a3ea60f7c400b89345a6dc1705645%7C0%7C0%7C638974607546251784%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=K0ZSjEG9KQdMhNSRzSFl7TlZZbW8RK8IgmLMF%2F%2BW%2FCA%3D&reserved=0<https://mail.openjdk.org/pipermail/openjfx-discuss/2025-August/000267.html> ) called for adding an `allowUndo` parameter to `applyStyle()` and `setStyle()` methods similarly to `replaceText()`.
>>
>> Upon further analysis, the `allowUndo` parameter was a mistake: allowing the application code to disable creating undo/redo entries messes up the internal undo/redo stack.
>> There is an internal need (`UndoableChange`), but it should not be exposed via public API.
>>
>> This PR also adds `isUndoRedoEnabled()` and `setUndoRedoEnabled()` to the `StyledTextModel`, as well as its forwarding aliases to `RichTextArea` to allow for the application to disable undo/redo temporarily, for example, when building a document from multiple segments.
>>
>> WARNING this is an incompatible change, permitted because of the incubator.
>>
>> There remains a possible issue with currently unlimited size of the undo/redo stack - perhaps we should limit its depth to maybe 100-200 entries, see https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.openjdk.org%2Fbrowse%2FJDK-8370447&data=05%7C02%7Cbarbara.salinas%40tec.mx%7C8692f3db4ee14304fffa08de18052523%7Cc65a3ea60f7c400b89345a6dc1705645%7C0%7C0%7C638974607546282964%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6rmGP4bqJqO%2FyImDQKAYI7ARDdGzUg3tXt%2FzX6xepYc%3D&reserved=0<https://bugs.openjdk.org/browse/JDK-8370447> .
>
> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>
> javadoc
I wonder if it might be better to remove these notes from all the editing methods in the control (since all of them call the model), and keep the notes in the model.
-------------
PR Comment: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.openjdk.org%2Fjfx%2Fpull%2F1941%23issuecomment-3470491866&data=05%7C02%7Cbarbara.salinas%40tec.mx%7C8692f3db4ee14304fffa08de18052523%7Cc65a3ea60f7c400b89345a6dc1705645%7C0%7C0%7C638974607546302303%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=MwGMq%2B6BvrjHXOMQvxh6bCKPhnvB5SUN2k%2FHymQVo6A%3D&reserved=0<https://git.openjdk.org/jfx/pull/1941#issuecomment-3470491866>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251031/98e10a06/attachment-0001.htm>
More information about the openjfx-dev
mailing list