Tuesday, March 03, 2009

IntelliJ's support for @AspectJ pointcuts in Spring 2.x AOP

I came across a really nice feature in IntelliJ IDEA 8.1 (it may be in earlier versions, but I'm using 8.1). I've been doing some AOP work within Spring Framework 2.5.6, using the excellent @AspectJ pointcut annotations. Once you have everything configured in your Spring application context, IntelliJ will start to annotate where pointcuts are being applied within your code. The annotation/emblem shows up in the left hand gutter of the editor window, right next to the line numbers. Clicking on the emblem will cause a popup listing of all the advices that are applied at that particular join point. You can even navigate directly to the advice from the popup. Very cool. Eclipse has something similar with their AspectJ development tools (AJDT), but this is the first time I've seen something like this in IntelliJ, my preferred Java editor.

1 comment: