r/JavaFX • • 13h ago

AI Assisted/Generated Editora: a keyboard-driven code editor built on JavaFX 27 and RichTextFX (open source, MIT)

I've been building Editora, an open-source code editor for Linux, macOS and Windows, on JDK 25, JavaFX 27, RichTextFX and AtlantaFX. It has LSP and debugger support for a long list of languages, Git with diff and merge views, Local History, a Markdown preview with math, and a Project Map that lays out your project on a canvas (still in beta). The installers bundle their own runtime, so you don't need a JDK.

A few JavaFX things I ran into along the way:

  • I forked RichTextFX to add multiple cursors and column selection. I also forked Flowless, the virtual flow underneath it, because it re-measured every visible line on each layout pass. Fixing that took FX-thread allocation per keystroke from about 7 MB to about 2.4 MB.
  • The packaged builds ship a JDK 25 AOT cache, trained against the app image's own runtime. First paint went from about 1.7 s to about 1.0 s on my machine.
  • When Prism can't start the GPU pipeline (on Linux, usually after a driver update without a reboot), the whole window lags. Editora now tells you in the status bar and in the Doctor, and turns off menu shadows in that mode, since redrawing the blur on every hover is what made the menus slow.
  • The performance tests in CI count frames per keystroke and FX-thread allocations instead of timing things. Counts come out the same on a busy CI runner as on my laptop.

Most of the code is written with Claude Code. I review it and rely on tests and build checks (NullAway, architecture tests, the performance budgets) to catch what I miss. I wrote about that here: https://www.adeleon.dev/blog/editora/

If you try it, I'd like to know how it runs on your setup, especially HiDPI on Windows and rendering on Linux. And if you've used RichTextFX for something big, what problems did you hit?

35 Upvotes

9 comments sorted by

2

u/PartOfTheBotnet 11h ago

I also forked Flowless, the virtual flow underneath it, because it re-measured every visible line on each layout pass. Fixing that took FX-thread allocation per keystroke from about 7 MB to about 2.4 MB.

Can you open issues in the upstream repo with descriptions of the problems + possibly a PR for solutions to those?

2

u/jacklackofsurprise 9h ago

I don't know if my fix is good enough for upstream ("works for me!") but yeah, I'll open an issue/PR

1

u/john16384 2h ago

What you could check is that richtextfx isn't triggering a parent layout on each character typed. It's a common mistake to call requestLayout when there are no bounds changes but only content changes. If bounds are unchanged just do setNeedsLayout(true)

1

u/jacklackofsurprise 2h ago

Thank you, I will check this out!

0

u/Objective_Pepper_217 5h ago

We already have too many bloated editors... Java is not a suitable choice

1

u/jacklackofsurprise 2h ago

Can you be more specific? In my (very crude) tests, Editora is a tiny bit faster than VSCode at loading and almost twice as fast as IntelliJ: https://editora-project.dev/#performance

I find the Java/JavaFX combo to be very fast. The downside is memory, it does consume a lot of memory for that performance.

Of course text editors like Sublime or Notepad++ are faster, but I wanted a simple text editor that could become a full feature IDE with a click of a button. (That's literal by the way, on my PC I use Editora as a file viewer for text files and if I need more features, just click the "E" button to switch to full IDE mode.

1

u/jacklackofsurprise 2h ago

Oh, I'm also using the AOT cache trick (on the native installers only) and that gives me around a 40% decrease in loading times.