Hi,

e(fx)clipse StyledText [1] is what I've developed and you can see it in
action at [2]. For tokenizing and highlighting I make use of Eclipse
Text parsing infrastructure and for the editor-framework shown in [2]
I've developed an DSL, so developing support for more language
highlightings is fairly easy.

Tom

[1]http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/runtime/org.eclipse.fx.ui.controls
[2]http://tomsondev.bestsolution.at/2014/08/11/efxclipse-1-0-new-features-styledtext-control-to-build-a-code-editor-framework/

On 20.10.14 17:13, Jeffrey Guenther wrote:
> I second Jonathan’s suggestion of RichTextFX. 
> 
> To do syntax highlighting and style the text area you can use a combination 
> of CSS and an extension I wrote for RichTextFX that allows you to highlight 
> any language’s syntax based on an ANTLR grammar. It allows you to pass a 
> mapping between an ANTLR token type and class name to do the highlighting. 
> The work is still in it’s infancy, but it works and might be helpful to you. 
> You can see it at https://github.com/jrguenther/Xanthic. You should be able 
> to create a stylesheet the is similar to monokai.
> 
> The goal of Xanthic is to create a tool like pygments written in Java and 
> making use of the ANTLR lexer/parser library. One of the output formats will 
> be RichTextFX StyleSpans. One of the other goals of the project is to make 
> use of the large ecosystem of pygments stylesheets by providing a converter 
> to make them JavaFX stylesheets. Just haven’t got to it yet.
> 
> 
> On Oct 19, 2014, at 1:08 PM, [email protected] wrote
>>
>>
>> From: Jonathan Giles <[email protected]>
>> Subject: Re: Why Javafx UI hangs or become unresponsive on using 
>> Plarform.runLater() ?
>> Date: October 19, 2014 at 1:08:47 PM PDT
>> To: [email protected]
>> Reply-To: [email protected]
>>
>>
>> The point Tom and Michael make is correct - TextArea is not virtualised, 
>> which means that there is indeed a Text node internally containing all text 
>> you've set on the TextArea - even if it is not visible. This is clearly not 
>> efficient for large amounts of text - as Michael said you want to virtualise 
>> the visuals so that you don't have all the text in a Text node at once.
>>
>> One way that people do this is with the ListView control (or its underlying 
>> implementation). There exists a few options you should explore, including 
>> Tom's implementation and RichTextFX [1] by Tomas Mikula.
>>
>> [1] https://github.com/TomasMikula/RichTextFX
>>
>> -- Jonathan
> 

Reply via email to