Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Statement.accept()


  public boolean visit(Block node) {
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.statements().iterator(); it.hasNext(); ) {
      Statement s = (Statement) it.next();
      s.accept(this);
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
View Full Code Here


    this.buffer.append(") ");//$NON-NLS-1$
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.statements().iterator(); it.hasNext(); ) {
      Statement s = (Statement) it.next();
      s.accept(this);
      this.indent--; // incremented in visit(SwitchCase)
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
View Full Code Here

        _openBrace();

        for (Iterator it = node.statements().iterator(); it.hasNext();) {
            Statement s = (Statement) it.next();
            s.accept(this);
        }

        _checkComments((node.getStartPosition() + node.getLength()) - 1);
        _closeBrace(newLineAfterBlock);
        _newLineAfterBlock = true;
View Full Code Here

                _output(_indent);
            }

            if (elseStatement instanceof Block) {
                _output("else ");
                elseStatement.accept(this);
            } else if (elseStatement instanceof IfStatement) {
                _indentIfStatement = false;
                _output("else ");
                elseStatement.accept(this);
            } else {
View Full Code Here

                _output("else ");
                elseStatement.accept(this);
            } else if (elseStatement instanceof IfStatement) {
                _indentIfStatement = false;
                _output("else ");
                elseStatement.accept(this);
            } else {
                _output("else\n");
                _increaseIndent();
                elseStatement.accept(this);
                _decreaseIndent();
View Full Code Here

                _output("else ");
                elseStatement.accept(this);
            } else {
                _output("else\n");
                _increaseIndent();
                elseStatement.accept(this);
                _decreaseIndent();
            }
        }

        return false;
View Full Code Here

            if (!(s instanceof SwitchCase)) {
                _increaseIndent();
            }

            s.accept(this);

            if (!(s instanceof SwitchCase)) {
                _decreaseIndent();
            }
        }
View Full Code Here

  public boolean visit(Block node) {
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.statements().iterator(); it.hasNext(); ) {
      Statement s = (Statement) it.next();
      s.accept(this);
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
    return false;
View Full Code Here

    this.buffer.append(") ");//$NON-NLS-1$
    this.buffer.append("{\n");//$NON-NLS-1$
    this.indent++;
    for (Iterator it = node.statements().iterator(); it.hasNext(); ) {
      Statement s = (Statement) it.next();
      s.accept(this);
      this.indent--; // incremented in visit(SwitchCase)
    }
    this.indent--;
    printIndent();
    this.buffer.append("}\n");//$NON-NLS-1$
View Full Code Here

      indent++;

      for (Object o : node.statements()) {
        Statement s = (Statement) o;
        s.accept(this);
      }

      indent--;
      printlni("}");
      println();
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.