From f6663c8be91d3adc6a42caef76171b937f5b841e Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 30 Apr 2003 02:38:29 +0000 Subject: [PATCH] - IMessage-based compiler messages - better toString for logging message lists --- .../aspectj/ajde/NullIdeTaskListManager.java | 29 +++++++++++++++---- 1 file 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 = "