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

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


    IMember member = root.getMember();
    String memberName = JavaElementLabels.getTextLabel(member,
        AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS |
        JavaElementLabels.ALL_POST_QUALIFIED |
        JavaElementLabels.P_COMPRESSED);
    CallLocation location = root.getMethodCall().getFirstCallLocation();

    HashMap<String,Object> result = new HashMap<String, Object>();
    result.put("name", memberName);

    if (location != null) {
      // If caller, locationMember == member. If callee, locationMember
      // is the function where the callee is called.
      IMember locationMember = location.getMember();
      IResource resource = locationMember.getResource();

      if (resource != null) {
        String file = resource.getLocation().toOSString().replace('\\', '/');
        int offset = location.getStart();

        result.put("position", Position.fromOffset(
              file, null, offset, location.getEnd() - offset));
      }
    }

    result.put(callees ? "callees" : "callers", formatRoots(
        root.getCalls(new NullProgressMonitor()),
View Full Code Here

TOP

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

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.