Package org.eclipse.jdt.core

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


  public void reconcileCompilationUnit() {
    ICompilationUnit cu = getCompilationUnit();
    if (cu != null) {
      try {
        synchronized(cu) {
          cu.makeConsistent(getProgressMonitor());
          cu.reconcile(ICompilationUnit.NO_AST, false, getWorkingCopyOwner(), getProgressMonitor());
        }
      }
      catch (JavaModelException e) {
        Logger.logException(e);
View Full Code Here


  public void reconcileCompilationUnit() {
    ICompilationUnit cu = getCompilationUnit();
    if (cu != null) {
      try {
        synchronized(cu) {
          cu.makeConsistent(getProgressMonitor());
          cu.reconcile(ICompilationUnit.NO_AST, false, getWorkingCopyOwner(), getProgressMonitor());
        }
      }
      catch (JavaModelException e) {
        Logger.logException(e);
View Full Code Here

          try {
            IBuffer workingCopyBuffer = workingCopy.getBuffer();
            if (workingCopyBuffer == null) return;
            primaryBuffer.setContents(workingCopyBuffer.getCharacters());
            primaryBuffer.save(this.progressMonitor, this.force);
            primary.makeConsistent(this);
            hasSaved = true;
          } finally {
            if (!hasSaved){
              // restore original buffer contents since something went wrong
              primaryBuffer.setContents(primaryContents);
View Full Code Here

            }
          }
        } else {
          // for a primary working copy no need to set the content of the buffer again
          primaryBuffer.save(this.progressMonitor, this.force);
          primary.makeConsistent(this);
        }
      } else {
        // working copy on cu outside classpath OR resource doesn't exist yet
        String encoding = null;
        try {
View Full Code Here

        try {
          List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();

          int invocationOffset = context.getInvocationOffset();
          IJavaElement element = cu.getElementAt(invocationOffset);
          cu.makeConsistent(monitor);

          // check for type/method/field specific annotation
          // proposal computers
          if (element instanceof SourceRefElement
              && ((SourceRefElement) element).getElementInfo() instanceof AnnotatableInfo) {
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.