List of usage examples for org.eclipse.jdt.core.dom SwitchCase setSourceRange
public final void setSourceRange(int startPosition, int length)
From source file:org.eclipse.jdt.core.dom.ASTConverter.java
License:Open Source License
public SwitchCase convert(org.eclipse.jdt.internal.compiler.ast.CaseStatement statement) { SwitchCase switchCase = new SwitchCase(this.ast); org.eclipse.jdt.internal.compiler.ast.Expression constantExpression = statement.constantExpression; if (constantExpression == null) { switchCase.setExpression(null);//w w w. ja v a2s.co m } else { switchCase.setExpression(convert(constantExpression)); } switchCase.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1); retrieveColonPosition(switchCase); return switchCase; }