Hi,
This week, at Taras' request, I added enough to dxr in order for there
to be a usable (if incomplete) demo. You can try it here:
http://scotland.proximity.on.ca/dxr/search.html
Some things to note:
* I've generated static html files for all .cpp, .h, and .idl in the
tree (you can manually grab whatever at
http://scotland.proximity.on.ca/dxr/mozilla-central/...path.../file.cpp.html
-- put .html on the end of .h, .cpp, and .idl files).
I have not yet dealt with .js (see below) or other types of files. The
search interface uses a modified version of MXR to give string + static
data + filename searches in one screen. It is really rough, but gives
us a starting point.
* My idl->html converter was written quickly just to get this demo done.
I do plan to make things into links in there (see questions about
decls below).
* Further to Benjamin's suggestions about the UI, I've made some
changes. First, the pop-up is something that you can link to now (i.e.,
when you click on something in a source file, your location.hash is
updated to #line/name). For example:
http://scotland.proximity.on.ca/dxr/mozilla-central/accessible/src/html/nsHTMLImageAccessible.cpp.html#254/tmp
The pop-up allows you to see where the variable was declared, its type,
and the type's info. Most things are now clickable, so you can jump to
other parts of the tree.
* The pop-up is now draggable (click and drag in the "titlebar"), so you
can get it out of your way, if you need to see code underneath. It also
has a 'close' button, so it won't disappear when you click outside it
any longer. I've still got some dojo quirks to fix, but it's not bad now.
* I've tried to fix most of the inheritance and type UI things I had
wrong before. However, there are still some cases I'm finding as I go,
and more bugs will have to be fixed before this is 100%.
* I spent a bunch of time fixing things in my xpidl parser. I still
have more edge cases (e.g., inline c++) to add, so there are things that
are missing yet.
* I haven't properly dealt with private members or file scope statics in
terms of the UI. Clicking these may give you an empty pop-up.
* I did a quick experiment with the InfoVis Toolkit (see
http://thejit.org/ and esp.
http://thejit.org/Jit/Examples/Spacetree/example2.html) to try and add
an inheritance diagram to the popup. This can work, but will need more
time to get right.
* I haven't mapped |#include "foo.h"| to real paths yet. TODO.
* Benjamin indicated that he'd be willing to add loc to macros, so I
haven't touched that here.
I'm going to aim to get the source released next week so people can
start giving feedback and helping. A lot of it is going to need to be
rewritten, as I've mostly bungled my way along to see what was possible.
I'll also put some docs up, and maybe get a Google Group or something
so we can talk about it in one place. I'm thinking to use Mozilla's hg
+ wikimo vs. an external host.
I'm going to need lots of help thinking through some things, for example:
* Taras mentioned that he wants more top-level info when he's in a file.
This is mostly a UI thing, but I need to figure out how and where
to show things like the types and funcs declared in this file. I also
need to figure out what you see when you click on a decl in general.
* I've written jshydra to get me the js xpcom info needed to tell you
that nsIFoo is implemented by c++ and js. However, I cannot figure out
the best way to drive this code. I need to preprocess all the .js in
the tree before handing it to jsyhdra. I thought to use flat chrome, or
just get things out of jar files. But then I lose the source locations
I need. I really need a way to be able to process each .js file in
place in the tree.
* I'm hearing reports (mostly from Taras!) that larger files will lock
his browser. I don't know if I can make this better, or if this is just
large doms being large doms. Everything I'm doing can be optimized, I'm
sure (and at every level).
As usual, this isn't on a production box, so be gentle. But I don't
mind you showing it to others for feedback.
Dave
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis