Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.ISourceModule.discardWorkingCopy()


     
      DeeCompletionEngine completionEngine = new DeeCompletionEngine();
      completionEngine.setRequestor(new CompletionRequestorTestCheck());
      completionEngine.complete((IModuleSource) srcModule, offset, 0);
    } finally {
      srcModule.discardWorkingCopy();
    }
  }
 
}
View Full Code Here


  }
 
  protected void testUpdatesToWorkingCopy() throws CoreException, IOException {
    ISourceModule sourceModule = testsProject.getSourceModule("source/basic_foo.d");
    IFile moduleFile = (IFile) sourceModule.getResource();
    sourceModule.discardWorkingCopy();
   
    String originalFileContents = "module wc_change0;";
    updateFileContents(moduleFile, originalFileContents);
   
    sourceModule.becomeWorkingCopy(new NullProblemRequestor(), new NullProgressMonitor());
View Full Code Here

    doCodeCompletion(moduleFile, 0, "wc_change1");
   
    sourceModule.getBuffer().setContents("module wc_change2;");
    doCodeCompletion(moduleFile, 0, "wc_change2");
   
    sourceModule.discardWorkingCopy();
    doCodeCompletion(moduleFile, 0, "wc_change0");
   
   
    sourceModule = testsProject.getSourceModule("source/basic_pack/foo.d");
    moduleFile = (IFile) sourceModule.getResource();
View Full Code Here

    sourceModule.commitWorkingCopy(true, new NullProgressMonitor());
    doCodeCompletion(moduleFile, 0, "wc_commitWC_Test/");

    sourceModule.getBuffer().setContents("module wc_commitWC_Test2;");
    sourceModule.commitWorkingCopy(true, new NullProgressMonitor());
    sourceModule.discardWorkingCopy();
    doCodeCompletion(moduleFile, 0, "wc_commitWC_Test2/");
   
    // Test setContents of non-working copy - only valid if sourceModule in buildpath it seems
    if(sourceModule.exists()) {
      sourceModule.getBuffer().setContents("module wc_change3;");
View Full Code Here

       
        root= SharedASTProvider.getAST(wc, SharedASTProvider.WAIT_YES, null);
        endTime= System.currentTimeMillis();

      } finally {
        wc.discardWorkingCopy();
      }
     
    } else if (input instanceof ISourceModule && (getCurrentInputKind() == ASTInputKindAction.USE_CACHE)) {
      ISourceModule cu= (ISourceModule) input;
      startTime= System.currentTimeMillis();
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.