Archive for January, 2012

Minor updates

Saturday, January 28th, 2012

Nothing bad has been found with code folding yet – so far so good!  A few tweaks in other areas were pushed recently, the most important probably being a scanning bug in HTML and other web languages.  A JavaScript line comment (“// …”) should not hide a closing </script> tag.

If you’ve watched this blog for any length of time, you might have noticed that my motivation often shifts from one area of the project to another (new language highlighting, code completion, code folding, etc.).  Well, since code folding is winding down, I’m turning my focus back to code completion.  The wonderful Rhino project, along with more web programming at work, has motivated me to look into JavaScript code completion.

A few months ago, somebody emailed me stating that they were working on this very thing.  We were hoping to get his work integrated into RSTALanguageSupport at some point, but unfortunately I stopped hearing from him, and I can no longer find that email thread (!).  In any case, I decided to dig into this myself.  The good news is that Rhino has an incredibly easy-to-use API.  I literally read no documentation at all – just Ctrl+Space’d and picked out the classes it looked like I needed.  Fantastic!  In a short while I already had squiggle underlining of syntax errors and working completion for functions and variables:

JS Code Completion - Day 1

JS Code Completion - Day 1

It’ll look prettier when it’s done of course; this is without any polish.  This will be made just as robust as the current Java language support, but with full syntax checking (Java currently doesn’t check for syntax errors in method bodies).  This should include both an outline tree component as well as Go to Member support.

I should also hopefully get off my bum and get back to work on the Java support.  When I do, I’ll be picking up where I left off, improving parameter completion (determining variables in scope of the right type/subtype for a parameter and suggesting them).

RText 2.0.0-beta2 Released

Sunday, January 15th, 2012

RText 2.0.0-beta2 was just released on SourceForge!  Why wasn’t there a “beta 1″?  Well, this release includes RSTA 2.0-beta2, and I wanted to keep their version numbers in sync, so there was no beta 1.  RText is an example of a full-featured application that takes advantage of everything RSyntaxTextArea has to offer.  Keep in mind though that this release is built on top of a beta release of RSTA, and there may be more bugs than usual (or maybe not!).

In any case, enjoy!

RSyntaxTextArea 2.0.0-beta2 Released

Saturday, January 14th, 2012

The second beta of 2.0 was just released on SourceForge.  This beta makes folding work when word wrap is enabled, fixes some keyboard shortcuts that didn’t work quite right around folded regions, and a few other minor things.  Check it out!

There are a few more things I’d like to do before a final 2.0 release, but they’re pretty minor.  The battle plan includes:

  • Folding should recognize XML comments.
  • API to do find/replace in selection (not just next/previous from caret or all).
  • A couple of more token types (again).
  • A way for users to disable the fold indicator tool tips for collapsed fold regions.
  • Profile performance of common operations when code folding is enabled, make sure there aren’t horrible degradations caused by the code folding code.

As always, please please please start using code folding ASAP and let me know of any issues you find!