Package org.aspectj.org.eclipse.jdt.core.compiler

Examples of org.aspectj.org.eclipse.jdt.core.compiler.IProblem


      end = adviceDeclaration.bodyEnd;
      // try to get the best end position
      IProblem[] problems = adviceDeclaration.compilationResult().problems;
      if (problems != null) {
        for (int i = 0, max = adviceDeclaration.compilationResult().problemCount; i < max; i++) {
          IProblem currentProblem = problems[i];
          if (currentProblem.getSourceStart() == start && currentProblem.getID() == IProblem.ParsingErrorInsertToComplete) {
            end = currentProblem.getSourceEnd();
            break;
          }
        }
      }
      int startPosition = adviceDecl.getStartPosition();
View Full Code Here


        end = methodDeclaration.bodyEnd;
        // try to get the best end position
        IProblem[] problems = methodDeclaration.compilationResult().problems;
        if (problems != null) {
          for (int i = 0, max = methodDeclaration.compilationResult().problemCount; i < max; i++) {
            IProblem currentProblem = problems[i];
            if (currentProblem.getSourceStart() == start
                && currentProblem.getID() == IProblem.ParsingErrorInsertToComplete) {
              end = currentProblem.getSourceEnd();
              break;
            }
          }
        }
        int startPosition = methodDecl.getStartPosition();
View Full Code Here

      if (problemLength == 0) {
        this.messages = EMPTY_MESSAGES;
      } else {
        this.messages = new Message[problemLength];
        for (int i = 0; i < problemLength; i++) {
          IProblem problem = this.problems[i];
          int start = problem.getSourceStart();
          int end = problem.getSourceEnd();
          messages[i] = new Message(problem.getMessage(), start, end - start + 1);
        }
      }
    }
    return this.messages;
  }
View Full Code Here

  public void removeUnnecessaryProblems(Member member, int problemLineNumber) {
    if (result == null) return;
    IProblem[] probs = result.getProblems();
    if (probs!=null) {
      for (int i = 0; i < probs.length; i++) {
        IProblem problem = probs[i];
        if (problem == null) continue;
        if (problem.getID() == IProblem.UnusedMethodDeclaredThrownException
            || problem.getID() == IProblem.UnusedConstructorDeclaredThrownException) {
          if (problem.getSourceLineNumber() == problemLineNumber) {
            UnusedDeclaredThrownExceptionFilter filter =
              new UnusedDeclaredThrownExceptionFilter(problem);
            result.removeProblems(filter)
          }
        }
View Full Code Here

  /**
   * All problems end up routed through here at some point...
   */
  public IProblem createProblem(char[] fileName, int problemId, String[] problemArguments, String[] messageArguments,
      int severity, int problemStartPosition, int problemEndPosition, int lineNumber) {
    IProblem problem = super.createProblem(fileName, problemId, problemArguments, messageArguments, severity,
        problemStartPosition, problemEndPosition, lineNumber, 0);
    if (factory.getWorld().isInPinpointMode()) {
      MessageIssued ex = new MessageIssued();
      ex.fillInStackTrace();
      StringWriter sw = new StringWriter();
View Full Code Here

   
    /**
     * All problems end up routed through here at some point...
     */
    public IProblem createProblem(char[] fileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int problemStartPosition, int problemEndPosition, int lineNumber) {
      IProblem problem = super.createProblem(fileName, problemId, problemArguments,
          messageArguments, severity, problemStartPosition, problemEndPosition,
          lineNumber);
      if (factory.getWorld().isInPinpointMode()) {
        MessageIssued ex = new MessageIssued();
        ex.fillInStackTrace();
View Full Code Here

        filename = sLoc.getSourceFile().getPath().toCharArray();
        usedBinarySourceFileName = true;
      }
    }
    ReferenceContext referenceContext = findReferenceContextFor(problemSource);
    IProblem problem = compiler.problemReporter.createProblem(
                filename,
                IProblem.Unclassified,
                new String[0],
                new String[] {message.getMessage()},
                severity,
                startPos,
                endPos,
                sLoc != null ? sLoc.getLine() : 0
                );
    IProblem[] seeAlso = buildSeeAlsoProblems(problem,message.getExtraSourceLocations(),
                          problemSource, 
                          usedBinarySourceFileName);
    problem.setSeeAlsoProblems(seeAlso);
   
    StringBuffer details = new StringBuffer();
    // Stick more info in supplementary message info
    if (message.getDetails() != null) {
      details.append(message.getDetails());
    }
    // Remember if this message was due to a deow
    if (message.getDeclared()) {
      details.append("[deow=true]");
    }
    if (details.length()!=0) {
      problem.setSupplementaryMessageInfo(details.toString());
    }
    compiler.problemReporter.record(problem, problemSource, referenceContext);
    return true;
  }
View Full Code Here

        end = adviceDeclaration.bodyEnd;
        // try to get the best end position
        IProblem[] problems = adviceDeclaration.compilationResult().problems;
        if (problems != null) {
          for (int i = 0, max = adviceDeclaration.compilationResult().problemCount; i < max; i++) {
            IProblem currentProblem = problems[i];
            if (currentProblem.getSourceStart() == start && currentProblem.getID() == IProblem.ParsingErrorInsertToComplete) {
              end = currentProblem.getSourceEnd();
              break;
            }
          }
        }
        int startPosition = adviceDecl.getStartPosition();
View Full Code Here

        end = methodDeclaration.bodyEnd;
        // try to get the best end position
        IProblem[] problems = methodDeclaration.compilationResult().problems;
        if (problems != null) {
          for (int i = 0, max = methodDeclaration.compilationResult().problemCount; i < max; i++) {
            IProblem currentProblem = problems[i];
            if (currentProblem.getSourceStart() == start && currentProblem.getID() == IProblem.ParsingErrorInsertToComplete) {
              end = currentProblem.getSourceEnd();
              break;
            }
          }
        }
        int startPosition = methodDecl.getStartPosition();
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.core.compiler.IProblem

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.