@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
@Override public SourcePosition getSourcePosition() { return new SourcePosition(null, null, -1, -1, -1); }
public SourcePosition findSourcePosition(Element element) { while (element instanceof DecoratedElement) { element = ((DecoratedElement) element).getDelegate(); } if (element instanceof ElementAdaptor) { return ((ElementAdaptor)element).getSourcePosition(); } TreePath path = this.trees.getPath(element); if (path != null) { CompilationUnitTree cu = path.getCompilationUnit(); SourcePositions positions = this.trees.getSourcePositions(); long position = positions.getStartPosition(cu, path.getLeaf()); long line = cu.getLineMap().getLineNumber(position); long column = cu.getLineMap().getColumnNumber(position); return new SourcePosition(path, cu.getSourceFile(), position, line, column); } else { return null; } }
public SourcePosition findSourcePosition(Element element) { while (element instanceof DecoratedElement) { element = ((DecoratedElement) element).getDelegate(); } if (element instanceof ElementAdaptor) { return ((ElementAdaptor)element).getSourcePosition(); } TreePath path = this.trees.getPath(element); if (path != null) { CompilationUnitTree cu = path.getCompilationUnit(); SourcePositions positions = this.trees.getSourcePositions(); long position = positions.getStartPosition(cu, path.getLeaf()); long line = cu.getLineMap().getLineNumber(position); long column = cu.getLineMap().getColumnNumber(position); return new SourcePosition(path, cu.getSourceFile(), position, line, column); } else { return null; } }