Examples of sourceEnd()


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

    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

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

          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

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

      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

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

            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

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

      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

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

      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

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

    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

Examples of org.eclipse.dltk.ast.declarations.MethodDeclaration.sourceEnd()

        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement
                .sourceEnd() - statement.sourceStart())));
        traverse(result, statement.getStatements(), offset, code);
      } else if (node instanceof MethodDeclaration) {
        MethodDeclaration statement = (MethodDeclaration) node;
        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement
                .sourceEnd() - statement.sourceStart())));
        traverse(result, statement.getStatements(), offset, code);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.declarations.MethodDeclaration.sourceEnd()

        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement
                .sourceEnd() - statement.sourceStart())));
        traverse(result, statement.getStatements(), offset, code);
      } else if (node instanceof MethodDeclaration) {
        MethodDeclaration statement = (MethodDeclaration) node;
        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement
                .sourceEnd() - statement.sourceStart())));
        traverse(result, statement.getStatements(), offset, code);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.declarations.ModuleDeclaration.sourceEnd()

    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(fSourceModule);
    if (moduleDeclaration == null)
      return new IModelElement[0];
    UseStatement[] useStatements = ASTUtils.getUseStatements(
        moduleDeclaration, moduleDeclaration.sourceEnd());
    List<UseStatementElement> elements = new LinkedList<UseStatementElement>();
    for (UseStatement useStatement : useStatements) {
      for (UsePart usePart : useStatement.getParts()) {
        elements.add(new UseStatementElement(
            (ModelElement) fSourceModule, usePart));
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.