diff options
author | wisberg <wisberg> | 2003-03-05 22:04:08 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-03-05 22:04:08 +0000 |
commit | d8f3379560c450b80ca7851d798d6e6245832d82 (patch) | |
tree | 6da3bf2a3a33a5f90ccc84995acb20dab0cfa060 /testing | |
parent | d493883dc0a1b6d766c7b849ee9f58274064cbbe (diff) | |
download | aspectj-d8f3379560c450b80ca7851d798d6e6245832d82.tar.gz aspectj-d8f3379560c450b80ca7851d798d6e6245832d82.zip |
neglected commit for sourcelocation context
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/org/aspectj/testing/xml/SoftSourceLocation.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/testing/src/org/aspectj/testing/xml/SoftSourceLocation.java b/testing/src/org/aspectj/testing/xml/SoftSourceLocation.java index 1276eb853..48d88db69 100644 --- a/testing/src/org/aspectj/testing/xml/SoftSourceLocation.java +++ b/testing/src/org/aspectj/testing/xml/SoftSourceLocation.java @@ -17,6 +17,7 @@ package org.aspectj.testing.xml; import java.io.File; import org.aspectj.bridge.ISourceLocation; +import org.aspectj.util.LangUtil; /** * Immutable source location. @@ -56,6 +57,7 @@ public class SoftSourceLocation implements ISourceLocation { // XXX endLine? private int line; private int column; private int endLine; + private String context; public SoftSourceLocation() { } @@ -74,6 +76,9 @@ public class SoftSourceLocation implements ISourceLocation { // XXX endLine? public int getEndLine() { return line; } + public String getContext() { + return context; + } public void setFile(String sourceFile) { this.sourceFile = new File(sourceFile); @@ -93,7 +98,10 @@ public class SoftSourceLocation implements ISourceLocation { // XXX endLine? public void setEndLine(String line) { this.endLine = convert(line); } - + + public void setContext(String context) { + this.context = context; + } private int convert(String in) { return Integer.valueOf(in).intValue(); @@ -103,11 +111,11 @@ public class SoftSourceLocation implements ISourceLocation { // XXX endLine? return null; } - /** @return String : file:line:column */ + /** @return String : {context\n}file:line:column */ public String toString() { - return getSourceFile().getPath() + ":" + getLine() + ":" + getColumn(); + return (null == context ? "" : context + LangUtil.EOL) + + getSourceFile().getPath() + + ":" + getLine() + + ":" + getColumn(); } - - //XXX making the build work again, Wes needs to implement the correct fix - public String getContext() { return null; } } |