RSyntaxTextArea 2.0.7 was just released on SourceForge! Â Here’s a list of the cool new stuff:
- setBracketMatchingEnabled(boolean) now checks for brackets “to the right” of the caret if one is not found “to the left.”
- Added API for applications to create custom hyperlinks in RSyntaxTextArea, though this API should not be considered stable.
- Added “mark occurrences” support for XML. Currently just highlights the tag name at the current caret position and its match.
- Fixed issue when auto-inserting spaces for tabs.
- Major refactoring of rendering code.
- “Traditional” selection rendering is now supported; that is, selected text can now be rendered as syntax highlighted tokens with a “selection” background (as it was previously), or as text as a single color with the “selection” background (as standard text components do). See RSyntaxTextArea.setUseSelectedTextColor(boolean).
- Fixed performance issue in FoldingAwareIconRowHeader when it paints “active regions.”
- Added some new token types to better differentiate markup tokens from “regular” language tokens. This allows for better syntax highlighting for stuff like HTML, JSP, and PHP.
- JavaScript highlighting now highlights JSDoc.
- Added Visual Basic syntax highlighting.
- In RSTAUI, a new TextFilePropertiesDialog was added.  This dialog shows the currently edited text file’s path, size, word count, encoding, line terminator, and more.  Further, when using a TextEditorPane, you can modify the file’s encoding or line terminator directly from the dialog.
- RSTALanguageSupport: Miscellaneous JavaScript code completion improvements (thanks Steve).
- RSTALanguageSupport:Â JavaScript code now syntax highlights JSDoc.
- RSTALanguageSupport:Â JavaScript code completion now offers suggestions for JSDoc when in documentation comments.
- RSTALanguageSupport:Â HTML, PHP, JSP and XML now have an option to automatically add closing tags when opening tags are typed (e.g. add “</foo>” when “<foo>” is typed). By default this option is enabled. HTML, PHP and JSP only auto-close tags closeable in the HTML 5 spec; XML closes all tags. This option is separate from the XML “auto-complete closing tag name when ‘</’ is typed” option.
Below are a couple of screenshots showing off the new JSDoc syntax highlighting and code completion. Â The first one shows auto-completion kicking in after typing “@” in a documentation comment. Â The second screenshot shows the parameterized assistance you get for “@param”:
Go check it out!