Package org.eclipse.dltk.ast.statements

Examples of org.eclipse.dltk.ast.statements.Statement.sourceEnd()


  private static Statement getBlock(IfStatement ifStatement, ASTNode node) {
    Statement falseStatement = ifStatement.getFalseStatement();
    Statement trueStatement = ifStatement.getTrueStatement();
    if (trueStatement != null
        && trueStatement.sourceStart() <= node.sourceStart()
        && trueStatement.sourceEnd() >= node.sourceEnd()) {
      return trueStatement;
    } else if (falseStatement != null
        && falseStatement.sourceStart() <= node.sourceStart()
        && falseStatement.sourceEnd() >= node.sourceEnd()) {
      return falseStatement;
View Full Code Here


    }
    if (!statements.isEmpty()) {
      Statement s1 = (Statement) statements.get(0);
      Statement s2 = (Statement) statements.get(statements.size() - 1);
      start = s1.sourceStart();
      end = s2.sourceEnd();
    }
    List<ASTError> errors = getErrors();
    if (!errors.isEmpty()) {
      ASTError lastError = errors.get(errors.size() - 1);
      end = (end > lastError.sourceEnd()) ? end : lastError.sourceEnd();
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.