4

I have a largish application written in Java with a Swing UI. I am interesting in adding user scripting via JavaScript. To allow users to edit JS from within the application, I would like to go beyond a simple plain-text JEditorPane, with some kind of syntax-highlighting and smart indentation. The application is LGPL, so the license would need to be LGPL-compatible.

I can use an old version of jedit-syntax (MIT license), but I wonder if there is any actively-maintained project that does something similar, ideally in a maven-aware fashion. I would rather something lightweight - no Eclipse or NetBeans RCPs, thanks.

3 Answers 3

3
+50

I didn't use it, but looks like what you need and is maintained: http://fifesoft.com/rsyntaxtextarea/

Sign up to request clarification or add additional context in comments.

2 Comments

This component is awesome!
Wins the prize -- it is similar enough to the jsyntaxpane, but it is easier to integrate.
3

Really good Swing-Editor for JavaScript (and some other languages) is JSyntaxPane. http://code.google.com/p/jsyntaxpane/

It has syntax-highlighting and some other usefull features (line-numbering, parenthesis highlighting). It also can be customized (for example if you have special extensions-keywords).

Editor is Distributed under Apache 2.0. I don'T know whether it's LGPL compatible or not.

1 Comment

Looking into it - seems promising. I understand bundling apache2-licensed code within LGPL is ok (apache is less restrictive); vice-versa would not be possible.
0

I don't know if it can work with Swing, but I would recommend TinyMCE. Since you are on java, try this version or the this implementation and use as provided here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.