RSyntaxTextArea 2.0.6 was just released on SourceForge! Included are new versions of AutoComplete, RSTALanguageSupport, and SpellChecker.
RSTA now provides syntax highlighting and code folding for JSON:
JSON highlighting and code folding in RSTA
Further, the AutoComplete and RSTALanguageSupport libraries now look good in Substance (in particular, Insubstantial). Previously, these libraries used DefaultListCellRenderer for their completion choices. Substance, being the barrel of fun that it is, forces libraries to extend its own DefaultSubstanceListCellRenderer, otherwise they aren’t rendered with Substance’s striping, gradients and rollover effects. Now, RSTA and its cousins detect when Substance is the current Look and Feel, and render with a DefaultSubstanceListCellRenderer when necessary. Easy peasy!
Substance in AutoComplete Popups
(Pardon the fact that I didn’t update the editor color scheme to be dark as well!). This is done via reflection, so there is still no build dependency on Substance. This of course assumes that the DefaultSubstanceListCellRenderer class name and package don’t change in future releases of Insubstantial, but I highly doubt that’ll happen, considering it’s a maintenance fork of the original Substance. And if something goes horribly wrong, the library should fall back into its default rendering path anyway.
The outline trees (JavaOutlineTree, XmlOutlineTree, etc.) still use DefaultTreeCellRenderer, but applications can use the same technique here – wrap the standard renderers for these components with SubstanceDefaultTreeCellRenderer, call delegate.getTreeCellRendererComponent(), then set the Substance renderer’s icon and text based on the delegate’s values. Come to think of it, I’m not sure why I didn’t have the libraries automatically delegate like I did with the completion choices lists… maybe next release. One thing you do lose from this delegation is the rollover effect – the render “looks” the same, but the animated rollover effect depends on the actual renderer being a DefaultSubstance*Renderer. Since we’re only *delegating* to one, we’ll look like it, but won’t get the rollover effect.