Examples of ICElement


Examples of org.eclipse.cdt.core.model.ICElement

    } catch (IOException e) {}
    return null;
  }

  private String contentsOf(CEditor cEditor) {
    ICElement input = cEditor.getInputCElement();
    if (input instanceof ITranslationUnit) {
      ITranslationUnit translationUnit = (ITranslationUnit) input;
      return new String(translationUnit.getContents());
    }
    return null;
View Full Code Here

Examples of org.eclipse.cdt.core.model.ICElement

            IIndexMacro[] macros = index.findMacros(
                binding.getName().toCharArray(),
                filter,
                new NullProgressMonitor());
            for (IIndexMacro macro : macros) {
              ICElement element = IndexUI.getCElementForMacro(
                  src.getCProject(), index, macro);
              if (element != null) {
                ISourceReference ref = (ISourceReference)element;
                FileLocation location = new FileLocation(
                    ref.getTranslationUnit().getPath().toPortableString(),
View Full Code Here

Examples of org.eclipse.cdt.core.model.ICElement

      findDefinitions.setAccessible(true);
      ICElement[] elements = (ICElement[])findDefinitions.invoke(
          null, cproject, input, selection);

      if (elements != null && elements.length > 0) {
        ICElement element = elements[0];
        Set<ICElement> seen = new HashSet<ICElement>();
        ICProject project = element.getCProject();
        ICProject[] scope = getScope(SCOPE_PROJECT, project);
        IIndex index = CCorePlugin.getIndexManager().getIndex(
            scope, IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT);
        index.acquireReadLock();
        try{
View Full Code Here

Examples of org.eclipse.cdt.core.model.ICElement

        IIndexName caller = name.getEnclosingDefinition();
        if (caller == null) {
          continue;
        }

        ICElement element = IndexUI.getCElementForName(project, index, caller);
        if (element == null) {
          continue;
        }
        calls.add(new Call(name, element));
      }
View Full Code Here

Examples of org.eclipse.cdt.core.model.ICElement

      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.model.ICElement

  {
    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;
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.