aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/src
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-25 09:50:32 +0000
committeraclement <aclement>2006-08-25 09:50:32 +0000
commit409e613aacda8d3e5bee8eed3d2919340e0ff7cd (patch)
tree67a0b6a0cfd3e2f4e96c64f6fea7e38e38e88e91 /bridge/src
parent04fa1dcce12934cc5cfe1e5e8b66523c10e93672 (diff)
downloadaspectj-409e613aacda8d3e5bee8eed3d2919340e0ff7cd.tar.gz
aspectj-409e613aacda8d3e5bee8eed3d2919340e0ff7cd.zip
141556#11 - reworked messagehandler with 'ignore' function! (wooo) - hope Matthew doesnt complain.
Diffstat (limited to 'bridge/src')
-rw-r--r--bridge/src/org/aspectj/bridge/CountingMessageHandler.java10
-rw-r--r--bridge/src/org/aspectj/bridge/IMessageHandler.java9
-rw-r--r--bridge/src/org/aspectj/bridge/MessageUtil.java5
-rw-r--r--bridge/src/org/aspectj/bridge/MessageWriter.java8
-rw-r--r--bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java8
5 files changed, 40 insertions, 0 deletions
diff --git a/bridge/src/org/aspectj/bridge/CountingMessageHandler.java b/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
index 5c8c080fb..52d759678 100644
--- a/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
+++ b/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
@@ -75,6 +75,15 @@ public class CountingMessageHandler implements IMessageHandler {
delegate.dontIgnore(kind);
}
+ /**
+ * Delegate
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ * @param kind
+ */
+ public void ignore(IMessage.Kind kind) {
+ delegate.ignore(kind);
+ }
+
/** @return delegate.toString() */
public String toString() {
return delegate.toString();
@@ -149,4 +158,5 @@ public class CountingMessageHandler implements IMessageHandler {
if (proxy != null) proxy.reset();
counters.clear();
}
+
}
diff --git a/bridge/src/org/aspectj/bridge/IMessageHandler.java b/bridge/src/org/aspectj/bridge/IMessageHandler.java
index 1c3beb9f3..f09eae26e 100644
--- a/bridge/src/org/aspectj/bridge/IMessageHandler.java
+++ b/bridge/src/org/aspectj/bridge/IMessageHandler.java
@@ -52,6 +52,8 @@ public interface IMessageHandler {
public void dontIgnore(IMessage.Kind kind) {
;
}
+ public void ignore(IMessage.Kind kind) {
+ }
};
/**
@@ -77,4 +79,11 @@ public interface IMessageHandler {
* @param kind
*/
void dontIgnore(IMessage.Kind kind);
+
+ /**
+ * Allow fine grained configuration after initialization.
+ *
+ * @param kind
+ */
+ void ignore(IMessage.Kind kind);
}
diff --git a/bridge/src/org/aspectj/bridge/MessageUtil.java b/bridge/src/org/aspectj/bridge/MessageUtil.java
index 1b75c0041..db089f618 100644
--- a/bridge/src/org/aspectj/bridge/MessageUtil.java
+++ b/bridge/src/org/aspectj/bridge/MessageUtil.java
@@ -369,6 +369,8 @@ public class MessageUtil {
public void dontIgnore(IMessage.Kind kind) {
;
}
+ public void ignore(Kind kind) {
+ }
};
return visitMessages(holder, selector, true, false);
}
@@ -599,6 +601,9 @@ public class MessageUtil {
String text = message.getMessage();
return ((null != message) && (-1 != text.indexOf(infix)));
}
+
+ public void ignore(Kind kind) {
+ }
}
// ------------------ components to render messages
diff --git a/bridge/src/org/aspectj/bridge/MessageWriter.java b/bridge/src/org/aspectj/bridge/MessageWriter.java
index 0c3422ecc..ab3fc259a 100644
--- a/bridge/src/org/aspectj/bridge/MessageWriter.java
+++ b/bridge/src/org/aspectj/bridge/MessageWriter.java
@@ -68,6 +68,14 @@ public class MessageWriter implements IMessageHandler {
;
}
+ /**
+ * No-op
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ * @param kind
+ */
+ public void ignore(IMessage.Kind kind) {
+ }
+
/** @return null to not print, or message rendering (including newlines) */
protected String render(IMessage message) {
return message.toString();
diff --git a/bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java b/bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java
index 2f13f85cf..d9465c322 100644
--- a/bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java
+++ b/bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java
@@ -67,6 +67,14 @@ public class PinpointingMessageHandler implements IMessageHandler {
public void dontIgnore(Kind kind) {
delegate.dontIgnore(kind);
}
+
+
+ /* (non-Javadoc)
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ */
+ public void ignore(Kind kind) {
+ delegate.ignore(kind);
+ }
private static class PinpointedMessage implements IMessage {