List of usage examples for org.eclipse.jdt.core.dom WhileStatement WhileStatement
WhileStatement(AST ast)
From source file:org.eclipse.jdt.core.dom.ASTConverter.java
License:Open Source License
public WhileStatement convert(org.eclipse.jdt.internal.compiler.ast.WhileStatement statement) { final WhileStatement whileStatement = new WhileStatement(this.ast); whileStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1); whileStatement.setExpression(convert(statement.condition)); final Statement action = convert(statement.action); if (action == null) return null; whileStatement.setBody(action);//from ww w.jav a 2s . c om return whileStatement; }