Package org.eclipse.dltk.ast

Examples of org.eclipse.dltk.ast.ASTNode.sourceEnd()


    protected boolean find(Expression s) throws Exception {
      if (s.sourceStart() < astNode.sourceStart() && s.sourceEnd() == astNode.sourceEnd()) {
        List<ASTNode> children = s.getChilds();
        for (int i = 0; i < children.size(); ++i) {
          ASTNode fieldReference = children.get(i);
          if (fieldReference.sourceStart() == astNode.sourceStart() && fieldReference.sourceEnd() == astNode.sourceEnd()) {
            if (i > 0) {
              ASTNode receiverReference = children.get(i - 1);
              IType[] receiverTypes = null;
              if (receiverReference instanceof VariableReference) {
                receiverTypes = PDTTypeInferenceUtils.getTypes((VariableReference) receiverReference, sourceModule);
View Full Code Here


    ASTNode quantifierPart = null;
    if (q != null && !q.isEmpty()) {
      quantifierPart = q.get(q.size() - 1);
    }
    if (quantifierPart != null) {
      bounds[1] = Math.max(bounds[1], quantifierPart.sourceEnd());
    }
    if (c != null && !c.isEmpty()) {
      bounds[1] = Math.max(bounds[1], c.get(c.size() - 1).sourceEnd());
    }
    if (a != null && !a.isEmpty()) {
View Full Code Here

    ASTNode quantifierPart = null;
    if (quantifierPartExpressions != null && !quantifierPartExpressions.isEmpty()) {
      quantifierPart = quantifierPartExpressions.get(quantifierPartExpressions.size() - 1);
    }
    if (quantifierPart != null) {
      bounds[1] = Math.max(bounds[1], quantifierPart.sourceEnd());
    }
    return new RutaRuleElement(bounds[0], bounds[1], head, quantifierPartExpressions, conditions,
            actions);
  }
View Full Code Here

          bounds[0] = Math.min(bounds[0], firstNode.sourceStart());
        }

        ASTNode lastNode = list.get(list.size() - 1);
        if (lastNode != null) {
          bounds[1] = Math.max(bounds[0], lastNode.sourceEnd());
        }
      }
    }
    return bounds;
  }
View Full Code Here

      ASTNode n = (ASTNode) i.next();
      if (n.equals(node)) {
        elements.add(n);
        return;
      }
      if (n.sourceStart() <= node.sourceStart() && node.sourceEnd() <= n.sourceEnd()) {
        elements.add(n);
        findElementsTo(RutaASTUtil.getStatements(n), node, elements);
        return;
      }
    }
View Full Code Here

            selectionElements.add(e);
          }
        }
        return;
      }
      if (nde.sourceStart() <= node.sourceStart() && node.sourceEnd() <= nde.sourceEnd()) {
        if (element instanceof IParent) {
          if (nde instanceof TypeDeclaration) {
            TypeDeclaration type = (TypeDeclaration) nde;
            String typeName = getNodeChildName(type);
            IModelElement e = findChildrenByName(typeName, element);
View Full Code Here

      if (s != null && s.getChilds() != null) {
        children = s.getChilds();
        Iterator it = children.iterator();
        while (it.hasNext()) {
          ASTNode n = (ASTNode) it.next();
          requestor.addPosition(n.sourceStart(), n.sourceEnd(),
                  RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR);
        }
      }

      requestor.addPosition(t.getNameStart(), t.getNameEnd(),
View Full Code Here

      ASTNode n = (ASTNode) i.next();
      if (n.equals(node)) {
        elements.add(n);
        return;
      }
      if (n.sourceStart() <= node.sourceStart() && node.sourceEnd() <= n.sourceEnd()) {
        elements.add(n);
        findElementsTo(RutaASTUtil.getStatements(n), node, elements);
        return;
      }
    }
View Full Code Here

    ASTNode quantifierPart = null;
    if (quantifierPartExpressions != null && !quantifierPartExpressions.isEmpty()) {
      quantifierPart = quantifierPartExpressions.get(quantifierPartExpressions.size() - 1);
    }
    if (quantifierPart != null) {
      bounds[1] = Math.max(bounds[1], quantifierPart.sourceEnd());
    }
    return new RutaRuleElement(bounds[0], bounds[1], head, quantifierPartExpressions,
            conditions, actions);
  }
View Full Code Here

            selectionElements.add(e);
          }
        }
        return;
      }
      if (nde.sourceStart() <= node.sourceStart() && node.sourceEnd() <= nde.sourceEnd()) {
        if (element instanceof IParent) {
          if (nde instanceof TypeDeclaration) {
            TypeDeclaration type = (TypeDeclaration) nde;
            String typeName = getNodeChildName(type);
            IModelElement e = findChildrenByName(typeName, element);
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.