From StyledTextViewer to a StyledTextEditor with JavaFX8


The title already says what this is about

the internal code is a bit ugly and I’m using some brute force stuff to simply get it going, naturally there are missing features like selection, … . Next is to port more stuff from Eclipse-Text-Infrastructure and integrate with JDT once more.

The sourcecode is found at e(fx)clipse github repo

About these ads

9 Responses to “From StyledTextViewer to a StyledTextEditor with JavaFX8”

  1. Nice nice nice!

  2. Since, as I understand it, you are virtualizing much of the text and placing each line in a seperate TextFlow node, how are you managing line wrapping and resizing, if you don’t mind my asking? I’m planning to implement a control which does something similar, though I won’t need to edit source code, so it will be a bit simpler because I won’t need the syntax highlighting and whatnot. Thanks.

    • The root-control can style ranges of code – everything like Syntax-Highlighting is implemented ontop of it. I’m not dealing with automatic line wraping because I’m splitting up the input source into lines each one getting represented by a ListCell. So why not simply reuseing my code or better improve its implementation – I know that at the moment the simple use case you present doesn’t work but the only reason for it is that I didn’t really care about it.

      All code is released under EPL.

Trackbacks/Pingbacks

  1. Interview with Tom Schindl // JavaFX News, Demos and Insight // FX Experience - February 22, 2013

    [...] been working on? In the last week I’ve been working on a StyledTextArea (Blog 1, Blog 2, Blog 3). Developers interact with such a control day by day when using their favorite IDE – in my case [...]

  2. JavaFX links of the week, February 24 // JavaFX News, Demos and Insight // FX Experience - February 24, 2013

    [...] text rendering in JavaFX, going so far as to improve performance by 100x, and then developing a styled text editor using a combination of the new rich text support in JavaFX 8.0 and the ListView [...]

  3. Java desktop links of the week, February 24 | Jonathan Giles - February 24, 2013

    [...] text rendering in JavaFX, going so far as to improve performance by 100x, and then developing a styled text editor using a combination of the new rich text support in JavaFX 8.0 and the ListView [...]

  4. Build an intelligent code editor with JavaFX and JDT | Tomsondev Blog - March 11, 2013

    [...] you followed my blog in the last weeks you know that I’ve been working on a StyledText-Control which allows one to build a source-code editor with syntax highlighting, … [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 676 other followers

%d bloggers like this: