I've not done a pluggin, but I have made a script that you make a site map with, and it uses the URL structure.
See it in action in this section here:
(and click anywhere in the information section, on this development site)
I made it because I didn't want all the pages to show in the navigation at once, but open up depending on which folder you are looking at.
It's specific to my setup at the moment, but I'm sure a good programmer would be able to take the idea and generalise it (NB: I'm not a programmer).
It would probably make a good plugin, but I wouldn't know where to start on that, I'll post it if anyone's interested.