Wednesday, August 26, 2009

Dojo API Code Assist in Netbeans

I'm using the Dojo Toolkit, a Javascript library, for the front end of a project I'm working on. It's fast, expressive, easy to program for, well documented, and has an active developer community

I want code assistance for dojo, both completion and the display of the API docs. Javascript has dynamic types and duck binding, making the code analysis that's needed for this sort of a thing a lot more challenging than for a more strongly typed language such as java. I've looked at a few IDEs

Aptana keeps saying that it has dojo support, but every time I try it, nothing works. Today was no exception. Real soon now, I'm sure ...

Netbeans used to support dojo 1.1.1, but that's pretty old. and with netbeans 6.7, even that seemed to stop working. and at it's best, half the methods showed "no comments found". but it was still the best i had and i was already using it for java, so i stuck with it ... and today i tried one more time, and got it to work

simple instructions:

  1. netbeans 6.7 (i'm using the java se bundle, ie no glassfish)
  2. download the dojo source version, eg dojo 1.3.2
  3. unpack the source
  4. put the source in your netbeans project web directory (i use a symlink to my local copy since i really don't want dojo mixed in with my own code ... makes revision control, managing multiple projects and upgrading easier)
  5. you may need to exit netbeans, remove the cache (.netbeans/6.7/var/cache) and restart ... i needed to, since i had the remnants of dojo 1.1.1 still laying around

coding bliss
here's the changeset that implemented the dojo parsing

No comments: