JSDoc for Mozilla Firefox Components.interfaces

I freely admit, I’ve been spoiled by VisualStudio and .NET. But right now I need to write some JS code for XULRunner and it’s getting painful:

All the information one needs is available on the Wiki, but I want auto-complete, I want argument descriptions and all the little niceties I’ve come to expect from a development environment. WebStorm does an admirable job at allowing me to document my code in a way that makes all this possible, but it needs JSDoc, not a set of Wiki pages in order to do this.

My solution is less than perfect. I wrote a little parser that tries to scrape the content from the Wiki and transforms it into JSDoc. But since a Wiki is not a structured database, this means interpreting the data. Usually my little parser gets it right, but not always. It’s also a terrible bit of code with lots of little fixes every time I encountered a new style that somebody was using. I’ll release it in time, but right now it’s just too ugly.

However, the result it produced is still apparently the best thing we have available right now, so I’m putting it up here. If there’s any interest, particularly in a permanent solution (which would probably involve keeping the documentation in a standardized format and occasionally syncing it with the Wiki), I’ll be happy to help.

Just add this as a reference to your code in order to use it:

Components.interfaces JSDOC

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.