Janning Vygen
Janning Vygen

Reputation: 9222

How to show warnings "AdviceDidNotMatch" in eclipse/STS as errors?

We use some Apsects in our software. When we refactor a method, the pointcut doesn't match anymore. The advice gets a warning marker in eclipse. I want this advice to get an error marker instead of just a warning. I checked all preferences but it seems to be not possible to me.

Do you know how to show warnings "AdviceDidNotMatch" in eclipse/STS as errors?

Upvotes: 0

Views: 105

Answers (1)

Andy Clement
Andy Clement

Reputation: 2560

It looks like a missing feature in AJDT. The message is an XLint so should be configurable. I just raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=444546 and committed a fix, so if you wait for a dev build tomorrow of AJDT (for eclipse 4.4) you will be able to set it. The update site for the new build will be: http://download.eclipse.org/tools/ajdt/44/dev/update

To configure it:

Select project > right click > 'Properties' > Select 'AspectJ Compiler' on the left. In the right hand tab under the 'AspectJ 5' section you will see 'Advice did not match' which should default to 'warning'. Change it to 'error' and after a full build you will have your errors.

Upvotes: 2

Related Questions