Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

looking for Java GUI components / ideas for syntax highlighting [closed]

I'm not committed to any particular GUI tookit or anything - just needs to be Java based. I want to do simple syntax highlighting ( XML and XQuery ) inside editable text areas.

My only candidate so far is Swing's JTextPane, as it supports seems to support the styling of text, but I have no idea how to implement it in this context.

If a particular toolkit has something like this out of the box, that would be awesome, but I'm open to doing this by hand if need be.

like image 874
rgcb Avatar asked Sep 24 '08 18:09

rgcb


2 Answers

JSyntaxPane handles XML and can be extended

http://code.google.com/p/jsyntaxpane/wiki/Using

Or, it should be possible to extract the NetBeans editor, but that would probably be more work...

[edit] btw, I got the XML info from here... it doesn't seem to mention it on the google code pages...

like image 147
tim_yates Avatar answered Oct 20 '22 05:10

tim_yates


Jide software has a Syntax Highligher component. It is still in beta, but I think it supposed XML. I haven't used it myself, so I don't know how well it will do what you want.

like image 1
faran Avatar answered Oct 20 '22 06:10

faran