Package dtool.engine.operations

Examples of dtool.engine.operations.CompletionSearchResult


  }
 
  @Override
  public void runRefSearchTest_________(RefSearchOptions options) {
   
    CompletionSearchResult completion = CodeCompletionOperation.completionSearch(parseResult, options.offset, mr);
   
    assertEquals(completion.getResultCode(), options.expectedStatusCode);
    assertEquals(completion.getReplaceLength(), options.rplLen);
    checkResults(completion.getResults(), options.expectedResults);
  }
View Full Code Here


    }
   
  }
 
  protected void testCodeCompletion(ModuleSource moduleSource, int offset, String... results) throws CoreException {
    CompletionSearchResult cc = client.runCodeCompletion(moduleSource, offset,
      MockCompilerInstalls.DEFAULT_DMD_INSTALL_EXE_PATH);
    new DefUnitResultsChecker(cc.getResults()).simpleCheckResults(results);
  }
View Full Code Here

 
  // Note: we don't use this method to test code completion, we are test the Working Copies of the server.
  // Code completion is just being used as a convenient way to check the source contents of the server's WCs.
  protected void doCodeCompletion(IFile file, int offset, String... results) throws CoreException {
    ISourceModule sourceModule = DLTKCore.createSourceModuleFrom(file);
    CompletionSearchResult cc = client.runCodeCompletion(sourceModule, offset,
      MockCompilerInstalls.DEFAULT_DMD_INSTALL_EXE_PATH);
    new DefUnitResultsChecker(cc.getResults()).simpleCheckResults(results);
  }
View Full Code Here

    try {
      CompletionContext context = new CompletionContext();
      requestor.acceptContext(context);
     
      Path compilerPath = getCompilerPath(moduleSource);
      CompletionSearchResult completionResult = DToolClient.getDefault().runCodeCompletion(
        moduleSource, position, compilerPath);
      if(completionResult.isFailure()) {
        handleCompletionFailure(DeeCoreMessages.ContentAssist_LocationFailure, position);
        return;
      }
     
      for (INamedElement result : completionResult.getResults()) {
        CompletionProposal proposal = createProposal(result, position, completionResult);
        requestor.accept(proposal);
      }
     
    } catch (CoreException e) {
View Full Code Here

TOP

Related Classes of dtool.engine.operations.CompletionSearchResult

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.