AspectJ Development Tools v0.5.2 Release Notes

Installation instructions

  1. Start Eclipse.

  2. Confirm that both the AspectJ and AJDT plugins have been successfully installed:

Post Installation Customization (important)

Configuring the editor:

You need to configure Eclipse to use the AspectJ/Java editor for .java source files (in place of the Java editor supplied by JDT).

Adding the New Aspect Wizard Shortcut:

Here's how it looks:

Things you need to know about the plugin.

Automatic build suppression

By default, AJDT suppresses automatic builds on resource modification (for AspectJ projects only) since AspectJ does not yet support incremental compilation. To build an AspectJ project, either select the project in the packages view and then select “Rebuild” from the project menu, or use the AspectJ build button:

AJDT supports multiple build configurations within a project (created using the New Build Configuration wizard). To select an alternate configuration for building, use the pulldown beside the build button:

No Eager Parsing

Currently there is no eager parsing support for AJDT. A consequence of this is that the outline view does not update as you edit, but instead is updated as a result of performing a build (compilation).

Running an AspectJ Program

Launch an AspectJ application using the normal Eclipse run button (running man icon). Before doing this, you need to configure your project to use the AspectJ runtime library at runtime. Select the project in the packages view, and choose "Properties" from the context menu.

Select the "Java Build Path" section, and then the "Libraries" tab. Click on "Add External JARs.."

Browse to the org.aspectj.ajde_1.0.6 directory in the "plugins" sub-directory of your Eclipse installation. Select "aspectjrt.jar" and click "Open." (Note the image below is out of date and shows the 1.0.5 plugin directory).

The project properties should now look as below, click "OK".


Breakpoints can be set in Java classes (but not in aspects). To set a breakpoint, double-click in the editor margin (the context menu option “Add Breakpoint” does not work yet). The debugger will stop at the breakpoint, but is not yet able to find the corresponding sourcecode and hence stepping through the program in conjunction with the source is not possible. This requires support for JSR 45 which is not in Eclipse 2.0. A debugging solution is a high priority item for the AJDT project.

Using existing AspectJ .lst files

The AspectJ command line tools support a richer build configuration file format than AJDT. If you experience problems using an existing .lst file with a project inside Eclipse then opening the file in the Build Configuration Editor (double-click in packages view for example) and saving it again should correct most problems.