Examples of discardWorkingCopy()


Examples of dtool.engine.ModuleParseCache.discardWorkingCopy()

        clientModuleCache.setWorkingCopyAndGetParsedModule(inputPath, doc.get());
        // This operation actually runs with the client cache, not on engine server
        performLongRunningComputation_withUpdatedServerWorkingCopy();
      } finally {
        if(sourceModule.isWorkingCopy() == false) {
          clientModuleCache.discardWorkingCopy(inputPath);
        }
      }
    }
   
    @Override
View Full Code Here

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

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

  }
 
  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

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

    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

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

    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

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

       
        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

Examples of org.eclipse.jdt.core.ICompilationUnit.discardWorkingCopy()

          TextEdit edit = imports.rewriteImports(monitor);
          JavaUtil.applyEdit(copy, edit, true, monitor);
        }
        if (copy.isWorkingCopy()) {
          copy.commitWorkingCopy(true, monitor);
          copy.discardWorkingCopy();
        }
        IWorkbenchPartSite site = getEditorSite();
        if (site != null) {
          OrganizeImportsAction action = new OrganizeImportsAction(site);
          action.run(unit);
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.discardWorkingCopy()

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        CrashReporter.reportException(e);
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
            + e.getLocalizedMessage());
      }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.discardWorkingCopy()

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
            + e.getLocalizedMessage());
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.discardWorkingCopy()

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
            + e.getLocalizedMessage());
      }
    }
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.