我希望它们易于捆绑,依赖少且易于使用。
最近我们在寻找一个文本高亮库,我们发现了非常好的Jygments:http://code.google.com/p/jygments/。
Jygments是Pygments(http://pygments.org)的Java端口,适用于Ant/Maven/SBT项目,并且支持多种主要编程语言。
RSyntaxTextArea textArea = new RSyntaxTextArea();
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
textArea.setCodeFoldingEnabled(true);
RTextScrollPane rs = new RTextScrollPane(textArea);