@Override public Void visitIfStatement(IfStatement node) { writer.print("if ("); visit(node.getCondition()); writer.print(") "); visit(node.getThenStatement()); visit(" else ", node.getElseStatement()); return null; }
/* * @see ASTVisitor#visit(IfStatement) */ @Override public boolean visit(IfStatement node) { this.fBuffer.append("if ("); // $NON-NLS-1$ node.getExpression().accept(this); this.fBuffer.append(") "); // $NON-NLS-1$ node.getThenStatement().accept(this); if (node.getElseStatement() != null) { this.fBuffer.append(" else "); // $NON-NLS-1$ node.getElseStatement().accept(this); } return false; }