If you're looking to write this in your code, see VonC's answer.
If you just want a view that does this, there's already one in eclipse: Window->Show View->Other...->PDE Runtime->Plugin Registry. This displays plugins, their extensions, dependencies, and who is providing extensions.