summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authormwebster <mwebster>2006-07-12 14:27:55 +0000
committermwebster <mwebster>2006-07-12 14:27:55 +0000
commitb1024db14f7290378784988e14dffd2def5c251f (patch)
tree6b036e8ef3dbcd5e20397841e67e2d99a15013b5 /weaver
parent928cb4a192b7f8acdfe706a35a6e329cc0dff13c (diff)
downloadaspectj-b1024db14f7290378784988e14dffd2def5c251f.tar.gz
aspectj-b1024db14f7290378784988e14dffd2def5c251f.zip
Fix for Bug 150254 "Provide context for LTW verbose messages" (WeavingAdaptorMessageHandler.render())
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
index 40dc168ad..1a637cfbc 100644
--- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
+++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
@@ -79,7 +79,6 @@ public class WeavingAdaptor {
protected Map generatedClasses = new HashMap(); /* String -> UnwovenClassFile */
protected WeavingAdaptor () {
- createMessageHandler();
}
@@ -162,7 +161,7 @@ public class WeavingAdaptor {
registerAspectLibraries(aspectPath);
}
- private void createMessageHandler() {
+ protected void createMessageHandler() {
messageHolder = new WeavingAdaptorMessageHandler(new PrintWriter(System.err));
messageHandler = messageHolder;
if (verbose) messageHandler.dontIgnore(IMessage.INFO);
@@ -360,6 +359,10 @@ public class WeavingAdaptor {
protected boolean error (String message) {
return MessageUtil.error(messageHandler,message);
}
+
+ protected String getContextId () {
+ return "WeavingAdaptor";
+ }
/**
* Dump the given bytcode in _dump/... (dev mode)
@@ -458,6 +461,10 @@ public class WeavingAdaptor {
accumulating = false;
messages.clear();
}
+
+ protected String render(IMessage message) {
+ return "[" + getContextId() + "] " + super.render(message);
+ }
}
private class WeavingClassFileProvider implements IClassFileProvider {