diff options
author | wisberg <wisberg> | 2003-04-30 02:38:29 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-04-30 02:38:29 +0000 |
commit | f6663c8be91d3adc6a42caef76171b937f5b841e (patch) | |
tree | c47eeefe6f379023cb2873f3028eb00ed97f24c7 /ajde | |
parent | fa2ef1c63f5ace1c92e2590b78d3e22bc3826007 (diff) | |
download | aspectj-f6663c8be91d3adc6a42caef76171b937f5b841e.tar.gz aspectj-f6663c8be91d3adc6a42caef76171b937f5b841e.zip |
- IMessage-based compiler messages
- better toString for logging message lists
Diffstat (limited to 'ajde')
-rw-r--r-- | ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java index d127220eb..2664088bf 100644 --- a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java +++ b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java @@ -27,8 +27,15 @@ public class NullIdeTaskListManager implements TaskListManager { List sourceLineTasks = new ArrayList(); - public void addSourcelineTask(String message, ISourceLocation sourceLocation, IMessage.Kind kind) { - sourceLineTasks.add(new SourceLineTask(message,sourceLocation,kind)); + public void addSourcelineTask( + String message, + ISourceLocation sourceLocation, + IMessage.Kind kind) { + addSourcelineTask(new Message(message, kind, null, sourceLocation)); + } + + public void addSourcelineTask(IMessage message) { + sourceLineTasks.add(new SourceLineTask(message)); // System.out.println("> added sourceline task: " + message + ", file: " + sourceLocation.getSourceFile().getAbsolutePath() // + ": " + sourceLocation.getLine()); } @@ -57,11 +64,21 @@ public class NullIdeTaskListManager implements TaskListManager { public ISourceLocation location; public IMessage.Kind kind; - public SourceLineTask(String m,ISourceLocation l,IMessage.Kind k) { - message = m; - location = l; - kind = k; + public SourceLineTask(IMessage m) { + message = m.getMessage(); + location = m.getISourceLocation(); + kind = m.getKind(); } + public String toString() { + String loc = "<no location"; + if (null != location) { + loc = location.getSourceFile() + ":" + location.getLine(); + } + return "SourceLineTask [" + message + + ", " + loc + + ", " + kind + + "]"; + } } } |