diff options
Diffstat (limited to 'bridge')
3 files changed, 14 insertions, 2 deletions
diff --git a/bridge/src/main/java/org/aspectj/bridge/IMessage.java b/bridge/src/main/java/org/aspectj/bridge/IMessage.java index b53a8c727..21ef8d7ab 100644 --- a/bridge/src/main/java/org/aspectj/bridge/IMessage.java +++ b/bridge/src/main/java/org/aspectj/bridge/IMessage.java @@ -28,8 +28,9 @@ public interface IMessage { // int values must sync with KINDS order below Kind WEAVEINFO = new Kind("weaveinfo", 5); Kind INFO = new Kind("info", 10); + Kind USAGE = new Kind("usage", 15); Kind DEBUG = new Kind("debug", 20); - Kind TASKTAG = new Kind("task", 25); // represents a 'TODO' from eclipse - producted by the compiler and + Kind TASKTAG = new Kind("task", 25); // represents a 'TODO' from eclipse - produced by the compiler and // consumed by AJDT Kind WARNING = new Kind("warning", 30); Kind ERROR = new Kind("error", 40); @@ -42,7 +43,7 @@ public interface IMessage { /** * list of Kind in precedence order. 0 is less than IMessage.Kind#COMPARATOR.compareTo(KINDS.get(i), KINDS.get(i + 1)) */ - List<Kind> KINDS = Collections.unmodifiableList(Arrays.asList(new Kind[] { WEAVEINFO, INFO, DEBUG, TASKTAG, + List<Kind> KINDS = Collections.unmodifiableList(Arrays.asList(new Kind[] { WEAVEINFO, INFO, USAGE, DEBUG, TASKTAG, WARNING, ERROR, FAIL, ABORT })); /** @return non-null String with simple message */ @@ -60,6 +61,9 @@ public interface IMessage { /** @return true if this is an internal debug message */ boolean isDebug(); + /** @return true if this is a compiler usage message */ + boolean isUsage(); + /** @return true if this is information for the user */ boolean isInfo(); diff --git a/bridge/src/main/java/org/aspectj/bridge/Message.java b/bridge/src/main/java/org/aspectj/bridge/Message.java index a4f17072b..959491c1f 100644 --- a/bridge/src/main/java/org/aspectj/bridge/Message.java +++ b/bridge/src/main/java/org/aspectj/bridge/Message.java @@ -121,6 +121,13 @@ public class Message implements IMessage { return kind == IMessage.DEBUG; } + /** + * @return true if kind == IMessage.USAGE + */ + public boolean isUsage() { + return kind == IMessage.USAGE; + } + public boolean isTaskTag() { return kind == IMessage.TASKTAG; } diff --git a/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java index c54ff6789..b8c975cd0 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/PinpointingMessageHandler.java @@ -91,6 +91,7 @@ public class PinpointingMessageHandler implements IMessageHandler { public boolean isError() { return delegate.isError(); } public boolean isWarning() { return delegate.isWarning();} public boolean isDebug() { return delegate.isDebug();} + public boolean isUsage() { return delegate.isUsage();} public boolean isInfo() { return delegate.isInfo();} public boolean isAbort() { return delegate.isAbort();} public boolean isTaskTag() { return delegate.isTaskTag();} |