aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java19
-rw-r--r--ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java6
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java15
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java7
-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
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java10
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java12
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java9
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java5
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java9
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java3
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java7
-rw-r--r--taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java6
-rw-r--r--testing-client/testsrc/org/aspectj/testing/TesterTest.java4
-rw-r--r--testing/src/org/aspectj/testing/run/RunStatus.java4
-rw-r--r--tests/java5/ataspectj/MessageHandler.java3
-rw-r--r--weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java4
-rw-r--r--weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java7
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java1
-rw-r--r--weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java3
24 files changed, 132 insertions, 42 deletions
diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
index ce984ab33..eb5f9cfb6 100644
--- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
+++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
@@ -50,7 +50,6 @@ public class CompilerAdapter {
private BuildNotifierAdapter currNotifier = null;
private boolean initialized = false;
private boolean structureDirty = true;
- private boolean showInfoMessages = false;
// set to false in incremental mode to re-do initial build
private boolean nextBuild = false;
@@ -58,14 +57,7 @@ public class CompilerAdapter {
super();
}
- public void showInfoMessages(boolean show) { // XXX surface in GUI
- showInfoMessages = show;
- }
- public boolean getShowInfoMessages() {
- return showInfoMessages;
- }
-
- public void nextBuildFresh() {
+ public void nextBuildFresh() {
if (nextBuild) {
nextBuild = false;
}
@@ -616,15 +608,15 @@ public class CompilerAdapter {
public MessageHandlerAdapter() {
this.taskListManager = Ajde.getDefault().getTaskListManager();
+ ignore(IMessage.INFO);
}
public boolean handleMessage(IMessage message) throws AbortException {
IMessage.Kind kind = message.getKind();
if (kind == IMessage.ABORT) return handleAbort(message);
- if (isIgnoring(kind)
- || (!showInfoMessages && IMessage.INFO.equals(kind))) {
+ if (isIgnoring(kind)) {
return true;
- }
+ }
taskListManager.addSourcelineTask(message);
return true;// return super.handleMessage(message); // also store...
@@ -641,6 +633,9 @@ public class CompilerAdapter {
}
public IMessageHandler getMessageHandler() {
+ if (messageHandler == null) {
+ init();
+ }
return messageHandler;
}
diff --git a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
index 80cda993d..3d4937de6 100644
--- a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
@@ -74,7 +74,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstCompile() {
if (debugTests) System.out.println("\n\n\ntestCancelFirstCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("compiled:",1); // Force a cancel after the first compile occurs
@@ -105,7 +104,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelThirdCompile() {
if (debugTests) System.out.println("\n\n\ntestCancelThirdCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("compiled:",3); // Force a cancel after the third compile occurs
@@ -135,7 +133,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstAspectWeave() {
if (debugTests) System.out.println("\n\n\ntestCancelFirstAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven aspect ",1); // Force a cancel after the first weave aspect occurs
@@ -163,7 +160,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelThirdAspectWeave() {
if (debugTests) System.out.println("\n\n\ntestCancelThirdAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
// Force a cancel after the third weave occurs.
@@ -207,7 +203,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstClassWeave() {
if (debugTests) System.out.println("testCancelFirstClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven class",1);
@@ -248,7 +243,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelSecondClassWeave() {
if (debugTests) System.out.println("testCancelSecondClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven class",2);
diff --git a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
index d2e95da66..0153630c2 100644
--- a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Set;
import org.aspectj.ajde.internal.CompilerAdapter;
+import org.aspectj.bridge.IMessage;
import org.aspectj.util.FileUtil;
public class ReweavableTestCase extends AjdeTestCase {
@@ -77,7 +78,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testNonReweavableCompile() {
if (debugTests) System.out.println("testNonReweavableCompile: Building with NonReweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("NonReweavable1.lst").getAbsolutePath(),new BPM(),false);
assertFalse("Did not expect to find a message about the weaver operating in reweavable mode",
@@ -115,7 +116,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableCompile() {
if (debugTests) System.out.println("testReweavableCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -162,7 +163,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableCompressCompile() {
if (debugTests) System.out.println("testReweavableCompressCompile: Building with ReweavableCompress1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("ReweavableCompress1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -222,7 +223,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableSimpleCompile() {
if (debugTests) System.out.println("testReweavableSimpleCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -276,7 +277,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testForReweavableSimpleErrorCompile() {
if (debugTests) System.out.println("testForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -332,7 +333,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testErrorScenario2Compile() {
if (debugTests) System.out.println("testErrorScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -364,7 +365,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testWorkingScenario2Compile() {
if (debugTests) System.out.println("testWorkingScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
index 528654a9b..57a5fcaaf 100644
--- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
@@ -106,7 +106,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesAdvice() {
if (debugTests) System.out.println("testWeaveMessagesAdvice: Building with One.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("One.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("advice",true);
}
@@ -120,7 +119,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesITD() {
if (debugTests) System.out.println("\ntestWeaveMessagesITD: Building with Two.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Two.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("itd",true);
}
@@ -132,7 +130,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclare() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclare: Building with Three.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Three.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare1",true);
}
@@ -144,7 +141,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareExtends() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareExtends: Building with Four.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Four.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.extends",true);
}
@@ -155,7 +151,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareSoft() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareSoft: Building with Five.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Five.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.soft",true);
}
@@ -167,7 +162,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
if (!LangUtil.is15VMOrGreater()) return; // annotation classes won't be about pre 15
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Six.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Six.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.annotation",true);
}
@@ -178,7 +172,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareAnnotationWeaveInfoOff() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Seven.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Seven.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.annotationNoWeaveInfo",true);
}
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 {
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java b/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
index c9b4a6d9f..df06ee773 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
@@ -60,4 +60,14 @@ public class DefaultMessageHandler implements IMessageHandler {
}
}
+ public void ignore(IMessage.Kind kind) {
+ if (kind.equals(IMessage.WEAVEINFO)) {
+ showWeaveInfo = false;
+ } else if (kind.equals(IMessage.DEBUG)) {
+ isVerbose = false;
+ } else if (kind.equals(IMessage.WARNING)) {
+ showWarn = true;
+ }
+ }
+
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
index 4b2c82c13..9db0feb3d 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
@@ -122,15 +122,11 @@ public class BuildArgParser extends Main {
// Now jump through firey hoops to turn them on/off
if (handler instanceof CountingMessageHandler) {
IMessageHandler delegate = ((CountingMessageHandler)handler).delegate;
- // Without dontIgnore() on the IMessageHandler interface, we have to do this *blurgh*
- if (delegate instanceof MessageHandler) {
- if (swi)
- ((MessageHandler)delegate).dontIgnore(IMessage.WEAVEINFO);
- else
- ((MessageHandler)delegate).ignore(IMessage.WEAVEINFO);
- }
+ if (swi)
+ delegate.dontIgnore(IMessage.WEAVEINFO);
+ else
+ delegate.ignore(IMessage.WEAVEINFO);
}
-
boolean incrementalMode = buildConfig.isIncrementalMode()
|| buildConfig.isIncrementalFileMode();
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
index a57c61f1a..b4feb146a 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
@@ -152,6 +152,14 @@ public class WeaverMessageHandler implements IMessageHandler {
;
}
+ /**
+ * No-op
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ * @param kind
+ */
+ public void ignore(Kind kind) {
+ }
+
private int getStartPos(ISourceLocation sLoc,CompilationResult result) {
int pos = 0;
if (sLoc == null) return 0;
@@ -234,5 +242,6 @@ public class WeaverMessageHandler implements IMessageHandler {
IProblem[] retValue = (IProblem[])ret.toArray(new IProblem[]{});
return retValue;
}
+
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
index 953085151..737d696cf 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
@@ -240,7 +240,10 @@ public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFacto
*/
public void dontIgnore(IMessage.Kind kind) {
;
- }
+ }
+
+ public void ignore(Kind kind) {
+ }
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
index 5c5d4dd9e..a4eba9dcf 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
@@ -33,6 +33,7 @@ import org.aspectj.bridge.MessageHandler;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.ReflectionFactory;
import org.aspectj.bridge.Version;
+import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.bridge.context.CompilationAndWeavingContext;
import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil;
@@ -657,6 +658,14 @@ public class Main {
return null;
}
}
+
+ /**
+ * No-op
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ * @param kind
+ */
+ public void ignore(Kind kind) {
+ }
}
public static class LogModeMessagePrinter extends MessagePrinter {
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java
index 2d0e1ba6d..5f4d217ec 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java
@@ -529,4 +529,7 @@ class AbortInterceptor implements IMessageHandler {
public void dontIgnore(Kind kind) {
}
+
+ public void ignore(Kind kind) {
+ }
}
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
index a4a99b099..1e0551f2d 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
@@ -89,4 +89,11 @@ public class TestMessageHolder implements IMessageHolder {
}
+ /* (non-Javadoc)
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ */
+ public void ignore(Kind kind) {
+ // TODO Auto-generated method stub
+ }
+
}
diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 62034beb8..8a48f550e 100644
--- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -2112,6 +2112,12 @@ private static class AntMessageHandler implements IMessageHandler {
*/
public void dontIgnore(Kind kind) {
}
+
+ /* (non-Javadoc)
+ * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+ */
+ public void ignore(Kind kind) {
+ }
}
}
diff --git a/testing-client/testsrc/org/aspectj/testing/TesterTest.java b/testing-client/testsrc/org/aspectj/testing/TesterTest.java
index 198f4da0b..c2fceb81a 100644
--- a/testing-client/testsrc/org/aspectj/testing/TesterTest.java
+++ b/testing-client/testsrc/org/aspectj/testing/TesterTest.java
@@ -207,11 +207,13 @@ public class TesterTest extends TestCase {
;
}
+ public void ignore(IMessage.Kind kind) {
+ }
+
public boolean handleMessage(IMessage message) {
(message.isFailed() ? failures : passes).add(message);
return true;
}
-
}
}
// /**
diff --git a/testing/src/org/aspectj/testing/run/RunStatus.java b/testing/src/org/aspectj/testing/run/RunStatus.java
index 8582bcfc7..763cc9103 100644
--- a/testing/src/org/aspectj/testing/run/RunStatus.java
+++ b/testing/src/org/aspectj/testing/run/RunStatus.java
@@ -282,6 +282,10 @@ public class RunStatus implements IRunStatus {
messageHolder.dontIgnore(kind);
}
+ public void ignore(IMessage.Kind kind) {
+ messageHolder.ignore(kind);
+ }
+
/**
* @see org.aspectj.bridge.IMessageHolder#hasAnyMessage(org.aspectj.bridge.IMessage.Kind, boolean)
*/
diff --git a/tests/java5/ataspectj/MessageHandler.java b/tests/java5/ataspectj/MessageHandler.java
index 111b32fc0..237756c83 100644
--- a/tests/java5/ataspectj/MessageHandler.java
+++ b/tests/java5/ataspectj/MessageHandler.java
@@ -24,4 +24,7 @@ public class MessageHandler implements IMessageHandler {
}
+ public void ignore(IMessage.Kind kind) {
+
+ }
} \ No newline at end of file
diff --git a/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java b/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
index 96266c23a..7994d8f39 100644
--- a/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
+++ b/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
@@ -174,6 +174,10 @@ public class ReflectionWorld extends World implements IReflectionWorld {
public void dontIgnore(org.aspectj.bridge.IMessage.Kind kind) {
// empty
}
+
+ public void ignore(org.aspectj.bridge.IMessage.Kind kind) {
+ // empty
+ }
}
diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
index 26244e2a0..4e4213e19 100644
--- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
+++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
@@ -523,6 +523,12 @@ public class WeavingAdaptor implements IMessageContext {
delegate.dontIgnore(kind);
}
}
+
+ public void ignore(Kind kind) {
+ if (null != kind) {
+ delegate.ignore(kind);
+ }
+ }
private boolean addMessage (IMessage message) {
messages.add(message);
@@ -541,6 +547,7 @@ public class WeavingAdaptor implements IMessageContext {
public void setDelegate (IMessageHandler messageHandler) {
delegate = messageHandler;
}
+
}
protected class WeavingAdaptorMessageWriter extends MessageWriter {
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
index b22d306c3..b7a1ef319 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
@@ -103,6 +103,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public boolean isIgnoring(Kind kind) {return false;}
public void dontIgnore(IMessage.Kind kind) {;}
+ public void ignore(Kind kind) {}
}
public void testReferenceToNonAnnotationType() {
diff --git a/weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java b/weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java
index be245c9c3..c1791b24d 100644
--- a/weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java
+++ b/weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java
@@ -311,6 +311,9 @@ public class PointcutParserTest extends TestCase {
public void dontIgnore(Kind kind) {
}
+
+ public void ignore(Kind kind) {
+ }
}
}