Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Get method calls of IMethod through eclipse CallHierarchy
Get method calls of IMethod through eclipse CallHierarchy [message #835113] Mon, 02 April 2012 20:23 Go to next message
Ali Arslan is currently offline Ali ArslanFriend
Messages: 3
Registered: April 2012
Junior Member
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);

}
Re: Get method calls of IMethod through eclipse CallHierarchy [message #835459 is a reply to message #835113] Tue, 03 April 2012 08:40 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
CallHierarchy is an internal method. Don't use that. Use the SearchEngine API directly. Look at http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide%2Fjdt_api_search.htm for the documentation.
Previous Topic:[solved] Call Hierarchy opens uneditable version, instead of editable
Next Topic:Not finding method references with generics
Goto Forum:
  


Current Time: Sat Apr 20 02:23:51 GMT 2024

Powered by FUDForum. Page generated in 0.03236 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top