For a while now I've been working on a project to create a Mozilla Developer Resource Kit (MDRK).  After spending three years helping students get started in the Mozilla world I've had a few ideas how to make life for new developers coming to Mozilla a bit easier.  The MDRK is something we'll be working on into the fall, but I wanted to share one piece of it now.

My work with Dehydra got to the point last week (see bug 435814) that it was time to make a demo--actually, Benjamin gave me the push I needed to finally get it done so he could take it with him to the GCC Developers' Summit.  I'm not sure what the final UI for this should be, but since I had code for the MDRK to improve the front-end of MXR, I decided to hack my Dehydra SQLite database into it.  After trying several ways to partition the Mozilla type system so it was useable in GUI form, Mark Finkle suggested that I use Schrep's Mozilla Platform diagram.  It's not perfect, but it provided a handy way to begin.  Here's what it looks like when you start:

Clicking one of the modules in the diagram (NOTE: SQLite, NSPR, and Cairo are C, so I don't have Dehydra info for them yet) gives you a list of Classes, Structs, and Interfaces:

Next, you can click a type's declaration location (in gray text to the right of the type name) to see the code, or click the type name itself to get information about its members, bases, and derived types:

I've got a broken implementation of "show all callers," which should not be taken as accurate yet (i.e., clicking a member name will often give no results at this point).  However, the structure is in place to support it once I get the back-end db right.  Clicking a location for a Declaration or Definition jumps to the source:

This is the same source view you get via MXR, with the exception that I've altered the CSS, added context via the source tree on the left, and integrated dehydra type searches to replace ident searches where applicable.  This could be much more intelligent, but for now, clicking a type name in the source takes you to the type itself vs. doing a search:

I'll just stress once again that this is a demo before I give you a URL, in the hopes that you'll be gentle and constructive with your feedback: http://zenit.senecac.on.ca/wiki/dxr.

I'd appreciate if you put comments about where I'm wrong with info in the dehydra xref on bug 435814.  A huge thanks to Chris Tyler, Benjamin Smedberg, Ted Mielczarek, Taras Glek, Dave Mandelin, and the dozen odd people in #seneca who have been testing this for me.

You can also download the SQLite database here, if you want to play with the data itself.  NOTE: I've indexed the following reversion of mozilla-central: 572802919ad2.

Show Comments