Archive for December, 2011

RSyntaxTextArea 2.0.0-beta1 Released

Saturday, December 24th, 2011

As I know that some folks aren’t too keen on always grabbing bleeding edge code from Subversion, I decided to make a “beta” release of RSyntaxTextArea 2.0 available on SourceForge as well as tagged in SVN.   I hope that releasing in jar form will help facilitate more folks using it and providing feedback.

Just as a recap, the major changes in this release currently include:

  1. Code folding for C, Java, Perl, XML, MXML, and other languages (currently only available when word wrap is not enabled).
  2. Theming support via XML.  This allows for easily customizing RSTA to fit the color scheme of your application, easier saving/loading user-defined token styles, etc.
  3. A few new token types to allow for better lexing/token highlighting.
  4. Updated syntax highlighting for some languages, especially PHP and JSP (which both previously had a couple of issues with JavaScript highlighting).

I’d like to make another call to action here, and ask everyone interested to try out the code folding support in their applications today!  Assuming you’re editing a language that supports it, it should be as simple as this:

textArea.setCodeFoldingEnabled(true);

The demo application in SVN provides a concrete example of this option in use.

Please report any and all problems you find in the RSTA forums!

Finally, I’d like to mention that I’ve gotten several emails that included patches with new features lately.  If you’re one of those folks, I’d just like to let you know that I am interested in what you’ve sent, I just haven’t yet gotten around to looking at it and working it in if/where possible.  Feel free to email me again if you want, but even if you don’t , I’ll (hopefully) be responding soon!

 

Java: Go to Member

Monday, December 19th, 2011

One feature currently in the JavaLanguageSupport is “Go to Window”.  Pressing Ctrl+O (I know, needs a different shortcut) pops up a tool tip-ish window with a tree view of the members of the current source, just like in Eclipse:

Go to Member

Go to Member

At the top is a text field.  Typing in this field filters what members are visible in the popup on the fly:

Filtering while typing

Filtering while typing

Selecting a member in the window selects that member in the editor:

Making a selection

Making a selection

Once you start using this feature, you’ll never stop using it.  It’s much faster than manually scrolling through source code!

While only about 80% of the way there, this functionality will of course be broken apart from the Java language support in particular, so it can be used by other languages.  Unfortunately Java is the only one for which I’ve created a parser capable of finding the members in a source file.  I’ll probably move the ctags support from [url=http://fifesoft.com/rtext/]RText[/url] into RSTALanguageSupport just for this.