Package org.eclipse.dltk.ast

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


    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


        if (list == null || list.isEmpty()) {
          continue;
        }
        ASTNode firstNode = list.get(0);
        if (firstNode != null) {
          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());
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

            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 (list == null || list.isEmpty()) {
          continue;
        }
        ASTNode firstNode = list.get(0);
        if (firstNode != null) {
          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());
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(), RutaPreferenceConstants.EDITOR_VARIABLE_COLOR);
    }
View Full Code Here

        ISourceRange sourceRange = field.getNameRange();
        ASTNode previousStatement = null;
        for (Iterator iterator = statements.iterator(); iterator
            .hasNext();) {
          ASTNode statement = (ASTNode) iterator.next();
          if (statement.sourceStart() <= sourceRange.getOffset()
              && statement.sourceEnd() >= (sourceRange
                  .getOffset() + sourceRange.getLength())) {
            // define statement
            phpDocBlocks = getPHPDocBlockBetweenStatements(
                previousStatement, statement, phpDocBlocks);
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.