Examples of IHasPosition


Examples of org.aspectj.weaver.IHasPosition

    }
  }

 
  private void reportError(Parser parser, ParserException pe) {
    IHasPosition tok = pe.getLocation();
    int start, end;
    if (tok == IToken.EOF) {
      start = sourceEnd+1;
      end = sourceEnd+1;
    } else {
      start = tok.getStart();
      end = tok.getEnd();
    }
    String found = "<unknown>";
    if (tok instanceof IToken) {
      found = ((IToken)tok).getString();
    }
View Full Code Here

Examples of org.aspectj.weaver.IHasPosition

  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j = location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

Examples of org.aspectj.weaver.IHasPosition

  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j = location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

Examples of org.aspectj.weaver.IHasPosition

  private String buildUserMessageFromParserException(String pc, ParserException ex) {
    StringBuffer msg = new StringBuffer();
    msg.append("Pointcut is not well-formed: expecting '");
    msg.append(ex.getMessage());
    msg.append("'");
    IHasPosition location = ex.getLocation();
    msg.append(" at character position ");
    msg.append(location.getStart());
    msg.append("\n");
    msg.append(pc);
    msg.append("\n");
    for (int i = 0; i < location.getStart(); i++) {
      msg.append(" ");
    }
    for (int j=location.getStart(); j <= location.getEnd(); j++) {
      msg.append("^");
    }
    msg.append("\n");
    return msg.toString();
  }
View Full Code Here

Examples of org.aspectj.weaver.IHasPosition

    }
  }

 
  private void reportError(Parser parser, ParserException pe) {
    IHasPosition tok = pe.getLocation();
    int start, end;
    if (tok == IToken.EOF) {
      start = sourceEnd+1;
      end = sourceEnd+1;
    } else {
      start = tok.getStart();
      end = tok.getEnd();
    }
    String found = "<unknown>";
    if (tok instanceof IToken) {
      found = ((IToken)tok).getString();
    }
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.