@Override public boolean visit(Block node) { this.fBuffer.append("{");//$NON-NLS-1$ for (Iterator<Statement> it= node.statements().iterator(); it.hasNext();) { Statement s= it.next(); s.accept(this); } this.fBuffer.append("}");//$NON-NLS-1$ return false; }
@Override public boolean visit(Block node) { this.fBuffer.append("{");//$NON-NLS-1$ for (Iterator<Statement> it= node.statements().iterator(); it.hasNext();) { Statement s= it.next(); s.accept(this); } this.fBuffer.append("}");//$NON-NLS-1$ return false; }
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; }
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; }
@Override public boolean visit(WhileStatement node) { this.fBuffer.append("while (");//$NON-NLS-1$ node.getExpression().accept(this); this.fBuffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
@Override public boolean visit(WhileStatement node) { this.fBuffer.append("while (");//$NON-NLS-1$ node.getExpression().accept(this); this.fBuffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(IfStatement node) { printIndent(); this.buffer.append("if (");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getThenStatement().accept(this); if (node.getElseStatement() != null) { this.buffer.append(" else ");//$NON-NLS-1$ node.getElseStatement().accept(this); } return false; }
public boolean visit(IfStatement node) { printIndent(); this.buffer.append("if (");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getThenStatement().accept(this); if (node.getElseStatement() != null) { this.buffer.append(" else ");//$NON-NLS-1$ node.getElseStatement().accept(this); } return false; }
public boolean visit(DoStatement node) { printIndent(); this.buffer.append("do ");//$NON-NLS-1$ node.getBody().accept(this); this.buffer.append(" while (");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(");\n");//$NON-NLS-1$ return false; }
@Override public boolean visit(LabeledStatement node) { node.getLabel().accept(this); this.fBuffer.append(": ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
@Override public boolean visit(WhileStatement node) { printIndent(); this.buffer.append("while (");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(WhileStatement node) { printIndent(); this.buffer.append("while (");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(LabeledStatement node) { printIndent(); node.getLabel().accept(this); this.buffer.append(": ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
@Override public boolean visit(LabeledStatement node) { printIndent(); node.getLabel().accept(this); this.buffer.append(": ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
@Override public boolean visit(EnhancedForStatement node) { printIndent(); this.buffer.append("for (");//$NON-NLS-1$ node.getParameter().accept(this); this.buffer.append(" : ");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(EnhancedForStatement node) { printIndent(); this.buffer.append("for (");//$NON-NLS-1$ node.getParameter().accept(this); this.buffer.append(" : ");//$NON-NLS-1$ node.getExpression().accept(this); this.buffer.append(") ");//$NON-NLS-1$ node.getBody().accept(this); return false; }
public boolean visit(ForStatement node) { if (isInside(node)) { node.getBody().accept(this); visitBackwards(node.initializers()); } return false; }
@Override public boolean visit(LabeledStatement node) { pushNode(node, node.getLabel().getFullyQualifiedName()); node.getBody().accept(this); return false; }
@Override public boolean visit(final DoStatement node) { this.appendToBuffer("do "); node.getBody().accept(this); this.appendToBuffer(" while ("); node.getExpression().accept(this); this.appendToBuffer(")"); return false; }
@Override public boolean visit(final EnhancedForStatement node) { this.appendToBuffer("for ("); node.getParameter().accept(this); this.appendToBuffer(" : "); node.getExpression().accept(this); this.appendToBuffer(") "); node.getBody().accept(this); return false; }