Get method calls of IMethod through eclipse CallHierarchy [message #835113] |
Mon, 02 April 2012 16:23  |
Eclipse User |
|
|
|
I am looking to get IMethod, IType or IJavaElement in which a IMethod is being called. I explored org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy. I have written this code but its not giving me anything in wrapper or in location. Please guide me.
Here is what i am doing:
public void getMethodCallers(IMethod[] methods){
CallHierarchy hierarchy = new CallHierarchy();
IJavaSearchScope searchScope= SearchEngine.createWorkspaceScope();
hierarchy.setSearchScope(searchScope);
CallLocation location = hierarchy.getCallLocation(method[0])
MethodWrapper [] wrapper = hierarchy.getCalleeRoots(methods);
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.26279 seconds