Package org.eclipse.jdt.internal.corext.callhierarchy

Examples of org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy


    if (element instanceof IMethod) {
      IMethod method = (IMethod) element;
      IMember[] members = new IMember[]{method};
      MethodWrapper[] roots;

      CallHierarchy callHierarchy = CallHierarchy.getDefault();
      // Keep search scope for hierarchy in current project
      callHierarchy.setSearchScope(
        SearchEngine.createJavaSearchScope(new IJavaElement[] {
          src.getJavaProject(),
        }));

      Comparator<MethodWrapper> comparator = null;

      if (callees) {
        roots = callHierarchy.getCalleeRoots(members);
      } else {
        roots = callHierarchy.getCallerRoots(members);
        // Following Eclipse's GUI, callers are ordered
        // alphabetically, callees by position in function.
        comparator = new Comparator<MethodWrapper>() {
          public int compare(MethodWrapper o1, MethodWrapper o2) {
            return o1.getName().compareToIgnoreCase(o2.getName());
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.