I want to find references to a given variable or callers of a given method, just like the "open call hierarchy" and "(find) references" features in Eclipse (when you right-click a variable or a method.)
Now I've obtained the Abstract Syntax Tree of the source code. I used Eclipse JDT to get the AST, which also resolves all type bindings.
So my question is, is it possible to find variable/method references using only this Abstract Syntax Tree? (I know that some code-analysis libraries use bytecode to achieve this. I wonder whether similar analyses can be performed using AST.)