List of usage examples for org.eclipse.jdt.core.dom TryStatement getLength
public final int getLength()
From source file:br.uff.ic.gems.resources.ast.Visitor.java
@Override public boolean visit(TryStatement 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()); Block body = node.getBody();//from www . j a v a2 s .c o m if (body != null) { int beginLineBody = cu.getLineNumber(body.getStartPosition()); int endLineBody = cu.getLineNumber(body.getStartPosition() + body.getLength()); int beginColumnBody = cu.getColumnNumber(body.getStartPosition()); int endColumnBody = cu.getColumnNumber(body.getStartPosition() + body.getLength()); languageConstructs.add(new LanguageConstruct(node.getClass().getSimpleName(), beginLine, endLine, beginColumn, endColumn, beginLineBody, endLineBody, beginColumnBody, endColumnBody, null)); } else { languageConstructs.add(new LanguageConstruct(node.getClass().getSimpleName(), beginLine, endLine, beginColumn, endColumn)); } return true; }