<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
I've just opened an issue about code folding.<br>
<br>
Best regards, Pavel<br>
<br>
<div class="moz-cite-prefix">On 4/29/25 22:52, Andy Goryachev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BYAPR10MB30132BDFB451AA5F73A891F8E5802@BYAPR10MB3013.namprd10.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Iosevka Fixed SS16";
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">I do
not disagree.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;color:black">From:
</span></b><span
style="font-size:12.0pt;color:black">openjfx-dev
<a class="moz-txt-link-rfc2396E" href="mailto:openjfx-dev-retn@openjdk.org"><openjfx-dev-retn@openjdk.org></a> on behalf of
PavelTurk <a class="moz-txt-link-rfc2396E" href="mailto:pavelturk2000@gmail.com"><pavelturk2000@gmail.com></a><br>
<b>Date: </b>Tuesday, April 29, 2025 at 12:47<br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:openjfx-dev@openjdk.org">openjfx-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:openjfx-dev@openjdk.org"><openjfx-dev@openjdk.org></a><br>
<b>Subject: </b>Re: RichTextArea: does CodeArea
support code folding?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt">I believe the community's
interest in this feature can be demonstrated with
three simple arguments:<br>
<br>
1. The amount of code needed to implement what you
described is comparable to the size of the existing
CodeArea itself.<br>
2. This feature already exists in RichTextFX (JavaFX)
and RSyntaxTextArea (Swing).<br>
3. It’s also present in editors like NetBeans,
IntelliJ IDEA, and VS Code.<br>
<br>
So, I think there’s every reason to add it to JFX
CodeArea as well.<br>
<br>
Best regards, Pavel<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">On
4/29/25 22:24, Andy Goryachev wrote:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Code
folding is not currently supported by the CodeArea,
at least with the models provided.</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""> </span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">It
might be possible to implement the folding in a
custom component, using the following steps:</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""> </span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-
implement a custom line number component which shows
the folding decorations, knows how to get the actual
line numbers, and how to handle the fold/unfold
events</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-
implement a model that knows how to fold, and
exposes the folding APIs</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-
modify the behavior of the CodeArea to deal with the
folding as required: copy/paste, navigation, etc.</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""> </span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">I
suppose it's possible to
<i>fold</i> these features into the stock CodeArea,
given sufficient interest from the community.</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""> </span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>