Minor updates

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).

Comments are closed.