For Mohammad: I am still wading through the mess I made, but I made a tab for Tiddler Commander you can try
here. This is
totally not ready for prime time and will probably not stay in this wiki but I'd be interested in your feedback as to how you'd like something like this to work.
There are two plugins at the moment, to make this work: "selector" and "showmacrodef". One gives me a macro for a dropdown selector. The other gives me a JavaScript widget and a JS macro, for displaying a variable's definition/value and a sample macrocall (if applicable), respectively, as well as a tool that makes a tab for Tiddler Commander to inspect for variable definitions within a filtered list of tiddlers. There is a tiddler that will do something similar without having Commander installed, but it's not finished.
The Commander tab does something like this, starting with the searchfilter from the top part of the Commander UI:
You type into the selector and it looks through those tiddlers for lines with "\define ", followed by something that contains the user input, followed by "(". From that, it rebuilds the macro name on that line. Each macro name it deduces from this, it lists in the dropdown as a selection option.
Once you select a macro name, it returns a list of the tiddlers that contain a "\define" line for that macro name. Note that it's possible for a tiddler to have a line like that, but NOT be defining anything (e.g. within a code block). To check, you choose the tiddler with a radio button, and the macro gives you a display.
Here's where it checks that there's a macro definition in the selected tiddler: it redefines that macro using a set widget, then imports the variables from the candidate source tiddler. If the macro now has a definition, then that tiddler had a real definition in it, and this is displayed using the aforementioned JS widget.
I note that the filter in the dropdown interface is pretty slow. Right now it's showing all candidate source tiddlers in the dropdown...maybe not a good tradeoff performance- and space-wise.
Any feedback welcome.
Best,
Chris