Examples of IIndexName


Examples of org.eclipse.cdt.core.index.IIndexName

        ICProject[] scope = getScope(SCOPE_PROJECT, project);
        IIndex index = CCorePlugin.getIndexManager().getIndex(
            scope, IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT);
        index.acquireReadLock();
        try{
          IIndexName name = IndexUI.elementToName(index, element);
          result = formatElement(index, new Call(name, element), seen, callees);
        }finally{
          index.releaseReadLock();
        }
      }
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndexName

        binding, IIndex.FIND_REFERENCES | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);

    ArrayList<Call> calls = new ArrayList<Call>(names.length);
    for (IIndexName name : names) {
      if (includeOrdinaryCalls || name.couldBePolymorphicMethodCall()) {
        IIndexName caller = name.getEnclosingDefinition();
        if (caller == null) {
          continue;
        }

        ICElement element = IndexUI.getCElementForName(project, index, caller);
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndexName

  private ArrayList<HashMap<String,Object>> findCallees(
      IIndex index, ICElement element, Set<ICElement> seen)
      throws Exception
  {
    ICProject project = element.getCProject();
    IIndexName name = IndexUI.elementToName(index, element);
    IIndexName[] enclosedNames = name.getEnclosedNames();

    ArrayList<Call> calls = new ArrayList<Call>(enclosedNames.length);
    for (IIndexName enclosedName : enclosedNames) {
      IIndexBinding binding = index.findBinding(enclosedName);
      IIndexName[] enclosedDefinitionNames = index.findDefinitions(binding);
      if (enclosedDefinitionNames == null || enclosedDefinitionNames.length == 0){
        continue;
      }

      IIndexName enclosedDefinitionName = enclosedDefinitionNames[0];
      ICElement enclosedElement =
        IndexUI.getCElementForName(project, index, enclosedDefinitionName);
      if (enclosedElement == null) {
        continue;
      }
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndexName

    throws Exception
  {
    HashMap<String,Object> result = new HashMap<String,Object>();

    String[] types = null;
    IIndexName name = call.name;
    ICElement element = call.element;

    if (element instanceof IFunction){
      types = ((IFunction)element).getParameterTypes();
    }else if (element instanceof IFunctionDeclaration){
      types = ((IFunctionDeclaration)element).getParameterTypes();
    }
    String message = element.getElementName() +
      '(' + StringUtils.join(types, ", ") + ')';
    result.put("name", message);

    if (name != null){
      IResource resource = call.resource;
      if (resource != null){
        String file = resource.getLocation().toOSString().replace('\\', '/');
        result.put("position",
            Position.fromOffset(file, null, name.getNodeOffset(), 0));
      }
    }

    if (!seen.contains(element)){
      seen.add(element);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.