Package org.eclipse.dltk.ast

Examples of org.eclipse.dltk.ast.ASTListNode


    return super.visit(s);
  }
 
  @Override
  public boolean visit(InterfaceDeclaration s) throws Exception {
    ASTListNode superClasses = s.getSuperClasses();
    if (superClasses != null) {
      for (Object ob : superClasses.getChilds()) {
        markIfNotExists(ob);
      }
    }
    return super.visit(s);
  }
View Full Code Here


      return false;
    }
    if (s instanceof RutaListExpression) {
      RutaListExpression le = (RutaListExpression) s;
      append(CURLY_OPEN);
      ASTListNode exprs = le.getExprs();
      traverseAstNodes(exprs.getChilds());
      append(CURLY_CLOSE);
      return false;
    }

    // special format for paranthesed expressions: (expression)
View Full Code Here

public class RutaStringExpression extends RutaExpression {
  private ASTListNode exprs;

  public RutaStringExpression(int start, int end, List<Expression> exprList) {
    super(start, end, null, RutaTypeConstants.RUTA_TYPE_S);
    this.exprs = new ASTListNode(start, end, exprList);
  }
View Full Code Here

  private int type;

  public RutaListExpression(int start, int end, List<Expression> exprList, int type) {
    super(start, end, null, RutaTypeConstants.RUTA_TYPE_S);
    this.setExprs(new ASTListNode(start, end, exprList));
    this.type = type;
  }
View Full Code Here

      TypeDeclaration t = (TypeDeclaration) node;
      List children;

      // Handle base classes highlighting
      ASTListNode s = t.getSuperClasses();

      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);
View Full Code Here

  private int type;

  public RutaListExpression(int start, int end, List<Expression> exprList, int type) {
    super(start, end, null, RutaTypeConstants.RUTA_TYPE_S);
    this.setExprs(new ASTListNode(start, end, exprList));
    this.type = type;
  }
View Full Code Here

      TypeDeclaration t = (TypeDeclaration) node;
      List children;

      // Handle base classes highlighting
      ASTListNode s = t.getSuperClasses();

      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);
        }
View Full Code Here

      return false;
    }
    if (s instanceof RutaListExpression) {
      RutaListExpression le = (RutaListExpression) s;
      append(CURLY_OPEN);
      ASTListNode exprs = le.getExprs();
      traverseAstNodes(exprs.getChilds());
      append(CURLY_CLOSE);
      return false;
    }

    // special format for paranthesed expressions: (expression)
View Full Code Here

    this.interfaceList = interfaceList;
  }

  public ASTListNode getSuperClasses() {
    int start = getBodyStart() - 1;
    ASTListNode listNode = new ASTListNode(start, start);
    if (superClass != null) {
      listNode.addNode(superClass);
      if (superClass.sourceStart() < start) {
        start = superClass.sourceStart();
      }
    }
    if (interfaceList != null) {
      for (TypeReference iface : interfaceList) {
        listNode.addNode(iface);
        if (iface.sourceStart() < start) {
          start = iface.sourceStart();
        }
      }
    }
    listNode.setStart(start);
    return listNode;
  }
View Full Code Here

    }
    return super.visit(type);
  }

  protected String[] processSuperClasses(TypeDeclaration type) {
    ASTListNode superClasses = type.getSuperClasses();
    if (superClasses == null) {
      return new String[] {};
    }
    List superClassNames = superClasses.getChilds();
    List<String> result = new ArrayList<String>(superClassNames.size());
    Iterator iterator = superClassNames.iterator();
    while (iterator.hasNext()) {
      Object nameNode = iterator.next();
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.ASTListNode

Copyright © 2018 www.massapicom. 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.