What's the purpose of "bindingKeys" in the "createASTs" method for the "AST [message #1780861] |
Mon, 29 January 2018 11:03 |
Maruhan Park Messages: 6 Registered: January 2018 |
Junior Member |
|
|
To first explain what my goal is:
For a given "Method Invocation", I want to find where the matching "Method Declaration" is. This is not limited to a single file. For example, if a method, `foo()`, is declared in `A.java` and that file is imported and called in `B.java`, I want to get a MethodInvocation type object that is representing the call of `foo()` from `B.java` that is bound to MethodDeclaration type object from `A.java`.
In doing so, I need to parse an entire project. To do that I'm using the following function:
public void createASTs(String[] sourceFilePaths,
String[] encodings,
String[] bindingKeys,
FileASTRequestor requestor,
IProgressMonitor monitor)
For the bindingKeys, apparently I have to do something like this:
new String[] { BindingKey.createTypeBindingKey("java.lang.Iterable") }; and explicitly give all the types that you want to find bindings of.
(I don't understand the purpose of this. Why does this exist for `createASTs` but not `createAST`?)
I want to get bindings of all types. Is that not possible?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02732 seconds