Configuring an AspectJ project

Our team is using AspectJ for the first time and I'm trying to make sure that I have my setup correct inorder to use it effectively.  The AspectJ file (.aj) is correctly being read when I run my project through IDEA.  However, the .aj file does not appear to be compiling correctly in the editor.

On the pointcut line, there is a gray squiggly line and the tooltip says "AspectJ statement not yet supported by IDEA".  Inside of the around method, "proceed" and "thisJoinPoint" are both highlighted in red.

Here are the following steps that I've followed to get the runtime to work, however I still have the compilation issue in the editor.

  1. Only have the "AspectJ Support" plugin enabled.
  2. Compiler set to "Ajc" and pointed it to my downloaded version of aspectjtools.jar.
  3. aspectjrt.jar added to my Project libraries

Here is the code:

public aspect WindowCreatedAspect {     pointcut windowCreated() : execution(* Engine.createWindow(Key, Window, boolean));          Object around() : windowCreated() {         Object ret = proceed();         Object[] args = thisJoinPoint.getArgs();         if (args != null && args.length == 3) {
               //Do some stuff         }         return ret; //Sguiggly line under the return ret;     }     }

Any ideas on why the editor does not seem to be setup right?


AspectJ support in IDEA is currently limited to inter-type declarations.
Full AOP support is in progress but not yet available.


Do you have an idea of when the AOP support will be available?



Planned for IDEA 11.
May be not in initial release but in one of updates.


Please sign in to leave a comment.