From 03abae3c03923335a4650d47d590d188062e9765 Mon Sep 17 00:00:00 2001 From: acolyer Date: Mon, 15 Mar 2004 15:29:44 +0000 Subject: [PATCH] move weaving to inside of the compiler.compile loop. ensure messages are associated with source wherever possible --- bridge/src/org/aspectj/bridge/Message.java | 5 +++++ bridge/src/org/aspectj/bridge/SourceLocation.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bridge/src/org/aspectj/bridge/Message.java b/bridge/src/org/aspectj/bridge/Message.java index bcc38d23c..af032b6de 100644 --- a/bridge/src/org/aspectj/bridge/Message.java +++ b/bridge/src/org/aspectj/bridge/Message.java @@ -42,6 +42,11 @@ public class Message implements IMessage { location); } + public Message(String message, ISourceLocation location, boolean isError, ISourceLocation[] extraSourceLocations) { + this(message, "",(isError ? IMessage.ERROR : IMessage.WARNING), location, null, + (extraSourceLocations.length > 0 ? extraSourceLocations : null)); + } + /** * Create a message, handling null values for message and kind * if thrown is not null. diff --git a/bridge/src/org/aspectj/bridge/SourceLocation.java b/bridge/src/org/aspectj/bridge/SourceLocation.java index c44d0b942..259fc2067 100644 --- a/bridge/src/org/aspectj/bridge/SourceLocation.java +++ b/bridge/src/org/aspectj/bridge/SourceLocation.java @@ -133,9 +133,11 @@ public class SourceLocation implements ISourceLocation, java.io.Serializable { } if (sourceFile != ISourceLocation.NO_FILE) { sb.append(sourceFile.getPath()); + } + if (startLine > 0) { sb.append(":"); + sb.append(startLine); //"" + startLine + "-" + endLine); } - sb.append(startLine); //"" + startLine + "-" + endLine); if (!noColumn) { sb.append(":" + column); } -- 2.39.5