Get method calls of IMethod through eclipse CallHierarchy [message #1796890] |
Sun, 21 October 2018 14:27 |
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:
Code: [Select all] [Show/ hide]
public void getMethodCallers(IMethod[] methods){
VidMate AnyDesk https://mobdro.onl/
CallHierarchy hierarchy = new CallHierarchy();
IJavaSearchScope searchScope= SearchEngine.createWorkspaceScope();
hierarchy.setSearchScope(searchScope);
CallLocation location = hierarchy.getCallLocation(method[0])
MethodWrapper [] wrapper = hierarchy.getCalleeRoots(methods);
}
[Updated on: Sun, 21 October 2018 19:08] by Moderator Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds