use of org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy in project gemoc-studio by eclipse.
the class CallHierarchyHelper method getCallersOf.
/**
* Find methods calling method 'm'
*/
public static HashSet<IMethod> getCallersOf(IMethod m) {
CallHierarchy callHierarchy = CallHierarchy.getDefault();
IMember[] members = { m };
MethodWrapper[] methodWrappers = callHierarchy.getCallerRoots(members);
HashSet<IMethod> callers = new HashSet<IMethod>();
for (MethodWrapper mw : methodWrappers) {
MethodWrapper[] mw2 = mw.getCalls(new NullProgressMonitor());
HashSet<IMethod> temp = getIMethods(mw2);
callers.addAll(temp);
}
return callers;
}
use of org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy in project gemoc-studio by eclipse.
the class CallHierarchyHelper method getCallLocationsOf.
/**
* Find calling sites for method 'm'
*/
public static HashSet<CallLocation> getCallLocationsOf(IMethod m) {
CallHierarchy callHierarchy = CallHierarchy.getDefault();
IMember[] members = { m };
MethodWrapper[] methodWrappers = callHierarchy.getCallerRoots(members);
HashSet<CallLocation> callers = new HashSet<CallLocation>();
for (MethodWrapper mw : methodWrappers) {
MethodWrapper[] mw2 = mw.getCalls(new NullProgressMonitor());
HashSet<CallLocation> temp = getCallLocations(mw2);
callers.addAll(temp);
}
return callers;
}
Aggregations