From: wisberg Date: Wed, 30 Apr 2003 02:38:29 +0000 (+0000) Subject: - IMessage-based compiler messages X-Git-Tag: V1_1_0_RC2~111 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6663c8be91d3adc6a42caef76171b937f5b841e;p=aspectj.git - IMessage-based compiler messages - better toString for logging message lists --- 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 = "