Package dtool.resolver

Examples of dtool.resolver.DefUnitSearch


    if(search instanceof PrefixDefUnitSearch) {
      PrefixDefUnitSearch prefixDefUnitSearch = (PrefixDefUnitSearch) search;
      doSearch_forPrefixSearch(prefixDefUnitSearch);
    } else {
      assertTrue(isMissingCoreReference() == false);
      DefUnitSearch defUnitSearch = (DefUnitSearch) search;
      IModuleResolver mr = search.getModuleResolver();
      ModuleProxy moduleProxy = getModuleProxy(mr);
      if(moduleProxy.resolveDefUnit() != null) {
        defUnitSearch.addMatch(moduleProxy);
      }
    }
  }
View Full Code Here


  @Override
  public Collection<INamedElement> findTargetDefElements(IModuleResolver moduleResolver, boolean findOneOnly) {
    if(isMissingCoreReference()) {
      return null;
    }
    DefUnitSearch search = new DefUnitSearch(getCoreReferenceName(), getModuleNode(), getStartPos(),
      findOneOnly, moduleResolver);
    performRefSearch(search);
    return search.getMatchedElements();
  }
View Full Code Here

    }
    if(moduleNode == null) {
      return null;
    }
   
    DefUnitSearch search = new DefUnitSearch("opCall", moduleNode, false, moduleResolver);
    calleeElem.resolveSearchInMembersScope(search);
   
    for (Iterator<INamedElement> iter = search.getMatchedElements().iterator(); iter.hasNext();) {
      INamedElement defOpCall = iter.next();
      if (defOpCall instanceof DefinitionFunction) {
        DefinitionFunction defOpCallFunc = (DefinitionFunction) defOpCall;
        INamedElement targetDefUnit = defOpCallFunc.findReturnTypeTargetDefUnit(moduleResolver);
        return Collections.singleton(targetDefUnit);
View Full Code Here

    public Collection<INamedElement> findTargetDefElements(IModuleResolver mr, boolean findFirstOnly) {
      Module module = ReferenceResolver.findModuleUnchecked(mr, moduleFullName);
      if(module == null)
        return null;
     
      DefUnitSearch search = new DefUnitSearch(elementName, null, -1, findFirstOnly, mr);
      module.resolveSearchInScope(search);
      return search.getMatchedElements();
    }
View Full Code Here

    defElement = PackageNamespace.createPartialDefUnits(array("pack", "sub"), new ModuleProxy("modA", null));
    assertEquals(TextUI.getLabelForHoverSignature(defElement), "pack");
    assertEquals(DeeElementLabelProvider.getLabelForContentAssistPopup(defElement), "pack");
   
   
    DefUnitSearch search = new DefUnitSearch("int", null, -1, true, new NullModuleResolver());
    ReferenceResolver.findDefUnitInScope(LanguageIntrinsics.D2_063_intrinsics.primitivesScope, search);
    defElement = search.getMatchedElements().iterator().next();
   
    assertEquals(TextUI.getLabelForHoverSignature(defElement), "int");
    assertEquals(DeeElementLabelProvider.getLabelForContentAssistPopup(defElement), "int");
   
  }
View Full Code Here

TOP

Related Classes of dtool.resolver.DefUnitSearch

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.