Navigation in the zcml registrations (searching for a component registration)


Hi there.

I know some add-on in my development setup registered a component for a certain interface (say, view called @@alpha for the IBeta object), but I have no idea which add-on has the correct zcml file.

How can I navigate (at runtime or through the codebase) the zcml registrations to find that?

EDIT note: I am not exclusively interested in views (which can be viewed at portal_view_customizations), but any kind of registration too.

In such cases, I use (under *nix) the "fgrep -r" command to search in the "eggs" tree representing the complete (non-development) egg sources. In a typical case, the command I am using looks like:

fgrep -r --include='*.zcml' alpha eggs

This searches all "*.zcml" files below "eggs" for "alpha".

I have a symbolic link to "eggs" in my instance directory. In your case, you likely will not find it there -- search for it (I would use "locate").

I usually use this in the buildout-cache/eggs directory:

grep -r alpha *

In this case since you know "alpha" is an entire word, this would work better:

grep -rw alpha *

but it'll look through every file in the directory tree, so may return more than you'd want, ideally.

Good editors like Emacs (hey, it's good!) or Sublime and other IDE-type editors should let you search for symbols in a directory tree or in an entire project more elegantly, however.

No one remember a very old add-on (or it was a view?) for that?

Maybe this?

No, it was something like a simple view, or something like a ZMI root control panel entry... (is possible I found it in the Martin's book?).
I don't remember well... or maybe I simply dreamed about it :smile: