Examples of AbortCompilation


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

      } else {
        weave(); // notification happens as weave progresses...
        // weaver.getWorld().flush(); // pr152257
      }
    } catch (IOException ex) {
      AbortCompilation ac = new AbortCompilation(null, ex);
      throw ac;
    } catch (RuntimeException rEx) {
      if (rEx instanceof AbortCompilation) {
        throw rEx; // Don't wrap AbortCompilation exceptions!
      }

      // This will be unwrapped in Compiler.handleInternalException() and the nested
      // RuntimeException thrown back to the original caller - which is AspectJ
      // which will then then log it as a compiler problem.
      throw new AbortCompilation(true, rEx);
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

        try {
          if (weaveQueuedEntries()) {
            droppingBackToFullBuild = true;
          }
        } catch (IOException ex) {
          AbortCompilation ac = new AbortCompilation(null, ex);
          throw ac;
        }
      }
    }
    postWeave();
    try {
      // not great ... but one more check before we continue, see pr132314
      if (!reportedErrors && units != null) {
        for (int i = 0; i < units.length; i++) {
          if (units[i] != null && units[i].compilationResult != null && units[i].compilationResult.hasErrors()) {
            reportedErrors = true;
            break;
          }
        }
      }
      if (isXTerminateAfterCompilation || (reportedErrors && !proceedOnError)) {
        // no point weaving... just tell the requestor we're done
        notifyRequestor();
      } else {
        // weave(); // notification happens as weave progresses...
        // weaver.getWorld().flush(); // pr152257
      }
      // } catch (IOException ex) {
      // AbortCompilation ac = new AbortCompilation(null,ex);
      // throw ac;
    } catch (RuntimeException rEx) {
      if (rEx instanceof AbortCompilation) {
        throw rEx; // Don't wrap AbortCompilation exceptions!
      }

      // This will be unwrapped in Compiler.handleInternalException() and the nested
      // RuntimeException thrown back to the original caller - which is AspectJ
      // which will then then log it as a compiler problem.
      throw new AbortCompilation(true, rEx);
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    try {
      if (weaveQueuedEntries()) {
        droppingBackToFullBuild = true;
      }
    } catch (IOException ex) {
      AbortCompilation ac = new AbortCompilation(null, ex);
      throw ac;
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

        recordProgress(fromPercent + ((progressCompletionCount / (double) progressMaxTypes) * (toPercent - fromPercent)),
            msg.toString());
        // progressPhasePrefix+result.getClassName()+" (from "+nowProcessing.fileName()+")");

        if (progressListener.isCancelledRequested()) {
          throw new AbortCompilation(true, new OperationCanceledException("Weaving cancelled as requested"));
        }
      }
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

          progressListener.setText("compiled: " + result.fileName());
        }
        state.noteResult(result);

        if (progressListener != null && progressListener.isCancelledRequested()) {
          throw new AbortCompilation(true, new OperationCanceledException("Compilation cancelled as requested"));
        }
      }
    };
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    this.monitor = monitor;
  }

  public CategorizedProblem createProblem(char[] originatingFileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) {
    if (this.monitor != null && this.monitor.isCanceled())
      throw new AbortCompilation(true/*silent*/, new OperationCanceledException());
    return super.createProblem(originatingFileName, problemId, problemArguments, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

public char[] getContents() {

  try
    return Util.getResourceContentsAsCharArray(this.resource);
  } catch (CoreException e) {
    throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
  }
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    this.notifier.checkCancelWithinCompiler();

  if (this.initialTypeNames != null && this.initialTypeNames.includes(qualifiedTypeName)) {
    if (isIncrementalBuild)
      // catch the case that a type inside a source file has been renamed but other class files are looking for it
      throw new AbortCompilation(true, new AbortIncrementalBuildException(qualifiedTypeName));
    return null; // looking for a file which we know was provided at the beginning of the compilation
  }

  if (this.additionalUnits != null && this.sourceLocations.length > 0) {
    // if an additional source file is waiting to be compiled, answer it BUT not if this is a secondary type search
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

  if (monitor != null && monitor.isCanceled() && !cancelling) {
    // Once the compiler has been canceled, don't check again.
    setCancelling(true);
    // Only AbortCompilation can stop the compiler cleanly.
    // We check cancelation again following the call to compile.
    throw new AbortCompilation(true, null);
  }
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

  private void checkCanceled() {
    if (this.monitor != null && this.monitor.isCanceled()) {
      if (NameLookup.VERBOSE)
        System.out.println(Thread.currentThread() + " CANCELLING LOOKUP "); //$NON-NLS-1$
      throw new AbortCompilation(true/*silent*/, new OperationCanceledException());
    }
  }
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.