Examples of IProblem


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

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

        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

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

      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

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

  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

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

  /**
   * 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

Examples of org.eclipse.dltk.compiler.problem.IProblem

          IProblemReporter rep) throws RecognitionException {
    if (element instanceof RutaFunction) {
      RutaFunction f = (RutaFunction) element;
      String name = f.getName();
      if (!name.equals(strings[0])) {
        IProblem problem = problemFactory.createUnknownFunctionProblem(f);
        rep.reportProblem(problem);
        return false;
      }
      boolean ok = true;
      List<Expression> childs = f.getChilds();
      if (childs.size() != 1) {
        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);
        rep.reportProblem(problem);
        ok = false;
      }
      Expression expr = childs.get(0);
      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {
        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");
        rep.reportProblem(problem);
        ok = false;
      }
      return ok;
    }
View Full Code Here

Examples of org.eclipse.dltk.compiler.problem.IProblem

          IProblemReporter rep) throws RecognitionException {
    if (element instanceof RutaAction) {
      RutaAction a = (RutaAction) element;
      String name = a.getName();
      if (!name.equals(strings[0])) {
        IProblem problem = problemFactory.createUnknownActionProblem(a);
        rep.reportProblem(problem);
        return false;
      }
      boolean ok = true;
      List<Expression> childs = a.getChilds();
      for (Expression expression : childs) {
        if (expression.getKind() != RutaTypeConstants.RUTA_TYPE_N) {
          IProblem problem = problemFactory.createWrongArgumentTypeProblem(expression,
                  "NumberExpression");
          rep.reportProblem(problem);
          ok = false;
        }
      }
View Full Code Here

Examples of org.eclipse.dltk.compiler.problem.IProblem

          IProblemReporter rep) throws RecognitionException {
    if (element instanceof RutaFunction) {
      RutaFunction f = (RutaFunction) element;
      String name = f.getName();
      if (!name.equals(strings[0])) {
        IProblem problem = problemFactory.createUnknownFunctionProblem(f);
        rep.reportProblem(problem);
        return false;
      }
      boolean ok = true;
      List<Expression> childs = f.getChilds();
      if (childs.size() != 1) {
        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);
        rep.reportProblem(problem);
        ok = false;
      }
      Expression expr = childs.get(0);
      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {
        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");
        rep.reportProblem(problem);
        ok = false;
      }
      return ok;
    }
View Full Code Here

Examples of org.eclipse.dltk.compiler.problem.IProblem

          IProblemReporter rep) throws RecognitionException {
    if (element instanceof RutaCondition) {
      RutaCondition a = (RutaCondition) element;
      String name = a.getName();
      if (!name.equals(strings[0])) {
        IProblem problem = problemFactory.createUnknownConditionProblem(a);
        rep.reportProblem(problem);
        return false;
      }
      boolean ok = true;
      List<Expression> childs = a.getChilds();
      if (childs.size() != 2) {
        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 2);
        rep.reportProblem(problem);
        ok = false;
      }
      for (Expression expression : childs) {
        if (expression.getKind() != RutaTypeConstants.RUTA_TYPE_S) {
          IProblem problem = problemFactory.createWrongArgumentTypeProblem(expression,
                  "StringExpression");
          rep.reportProblem(problem);
          ok = false;
        }
      }
View Full Code Here

Examples of org.eclipse.dltk.compiler.problem.IProblem

          IProblemReporter rep) throws RecognitionException {
    if (element instanceof RutaFunction) {
      RutaFunction f = (RutaFunction) element;
      String name = f.getName();
      if (!name.equals(strings[0])) {
        IProblem problem = problemFactory.createUnknownFunctionProblem(f);
        rep.reportProblem(problem);
        return false;
      }
      boolean ok = true;
      List<Expression> childs = f.getChilds();
      if (childs.size() != 1) {
        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);
        rep.reportProblem(problem);
        ok = false;
      }
      Expression expr = childs.get(0);
      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {
        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");
        rep.reportProblem(problem);
        ok = false;
      }
      return ok;
    }
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.