Package dtool.engine.operations.CompletionSearchResult

Examples of dtool.engine.operations.CompletionSearchResult.PrefixSearchOptions


  public final PrefixSearchOptions searchOptions;
  protected final Set<String> addedDefElements = new HashSet<>();
  protected final ArrayList<INamedElement> results  = new ArrayList<>();
 
  public PrefixDefUnitSearch(Module refOriginModule, int refOffset, IModuleResolver moduleResolver) {
    this(refOriginModule, refOffset, moduleResolver, new PrefixSearchOptions());
  }
View Full Code Here


      assertTrue(nameToken == null);
     
      if(offset <= namedRef.getDotOffset()) {
        nodeAtOffset = namedRef.getParent();
      }
      PrefixSearchOptions searchOptions = new PrefixSearchOptions();
      return performCompletionSearch(offset, mr, module, nodeAtOffset, searchOptions);
    } else if(nodeAtOffset instanceof RefModule) {
      RefModule refModule = (RefModule) nodeAtOffset;
      // RefModule has a specialized way to setup prefix len things
     
      String source = parseResult.source;
      PrefixSearchOptions searchOptions = codeCompletionRefModule(offset, tokenAtOffsetRight, source, refModule);
      return performCompletionSearch(offset, mr, module, nodeAtOffset, searchOptions);
    }
   
    if(nameToken != null) {
      assertTrue(nameToken.getSourceRange().contains(offset));
     
      PrefixSearchOptions searchOptions = new PrefixSearchOptions();
     
      String searchPrefix = nameToken.getSourceValue().substring(0, offset - nameToken.getStartPos());
      int rplLen = nameToken.getEndPos() - offset;
      searchOptions.setPrefixSearchOptions(searchPrefix, rplLen);
     
      // Because of some parser limitations, in some cases nodeForNameLookup needs to be corrected,
      // such that it won't be the same as nodeForNameLookup
      ASTNode nodeForNameLookup = getStartingNodeForNameLookup(nameToken.getStartPos(), module);
     
      return performCompletionSearch(offset, mr, module, nodeForNameLookup, searchOptions);
     
    } else {
      PrefixSearchOptions searchOptions = new PrefixSearchOptions();
      return performCompletionSearch(offset, mr, module, nodeAtOffset, searchOptions);
    }
   
  }
View Full Code Here

    if(lookAhead != DeeTokens.EOF) {
      assertTrue(lookAhead.isKeyword());
      moduleQualifiedNameCanonicalPrefix += lookAhead.getSourceValue();
    }
   
    PrefixSearchOptions searchOptions = new PrefixSearchOptions();
    searchOptions.setPrefixSearchOptions(moduleQualifiedNameCanonicalPrefix, rplLen);
    searchOptions.isImportModuleSearch = true;
    return searchOptions;
  }
View Full Code Here

      new DefaultProblem(errorMessage, null, null, ProblemSeverity.ERROR, position, position, 0));
  }
 
  protected CompletionProposal createProposal(INamedElement namedElem, int ccOffset,
      CompletionSearchResult completionResult) {
    PrefixSearchOptions searchOptions = completionResult.searchOptions;
   
    String rplName;
    if(searchOptions.isImportModuleSearch) {
      rplName = namedElem.getFullyQualifiedName();
    } else {
View Full Code Here

TOP

Related Classes of dtool.engine.operations.CompletionSearchResult.PrefixSearchOptions

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.