aspect JastAddJFileOffsets { public CompilationUnit ASTNode.getCompilationUnit() { ASTNode node = this; while(node != null && !(node instanceof CompilationUnit)) node = node.getParent(); return (CompilationUnit)node; } public String ASTNode.getFileName() { CompilationUnit cu = getCompilationUnit(); if (cu != null) return cu.pathName(); return null; } syn int ASTNode.createOffset(int symbolLocation) { CompilationUnit cu = getCompilationUnit(); if (cu != null) return cu.offset(ASTNode.getLine(symbolLocation), ASTNode.getColumn(symbolLocation)); else return -1; } syn int ASTNode.getBeginOffset() = createOffset(getStart()); syn int ASTNode.getEndOffset() = createOffset(getEnd()); }