List of usage examples for org.eclipse.jdt.core.dom ThrowStatement getStartPosition
public final int getStartPosition()
From source file:br.uff.ic.gems.resources.ast.Visitor.java
@Override public boolean visit(ThrowStatement node) { int beginLine = cu.getLineNumber(node.getStartPosition()); int endLine = cu.getLineNumber(node.getStartPosition() + node.getLength()); int beginColumn = cu.getColumnNumber(node.getStartPosition()); int endColumn = cu.getColumnNumber(node.getStartPosition() + node.getLength()); languageConstructs.add(//from w ww .ja v a2 s .c om new LanguageConstruct(node.getClass().getSimpleName(), beginLine, endLine, beginColumn, endColumn)); return true; }
From source file:sharpen.core.CSharpBuilder.java
License:Open Source License
private CSThrowStatement mapThrowStatement(ThrowStatement node) { Expression exception = node.getExpression(); if (isCurrentExceptionVariable(exception)) { return new CSThrowStatement(node.getStartPosition(), null); }//from w w w .j a v a 2 s . co m return new CSThrowStatement(node.getStartPosition(), mapExpression(exception)); }