AspectJ Development Tools v0.5.2 Release Notes

Changes from 0.5.1 release

Changes from 0.5.0 release

Installation instructions

  1. Download and install the org.aspectj.ajde v1.0.6 plugin following the instructions at www.aspectj.org. If you have previously installed the 1.0.5 plugin, please remove the 1.0.5 version from your plugins directory. (This step not required for an upgrade from a 0.5.1 installation)

  2. Download the file org.eclipse.ajdt.ui_0.5.2.zip to a temporary directory on your machine

  3. Unzip org.eclipse.ajdt.ui_0.5.2 into the “plugins” directory of your eclipse installation (e.g. C:/eclipse/plugins). If you have previously installed the 0.5.0 or 0.5.1 plugin, please remove them from your plugins directory.

  4. Start Eclipse.

  5. 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:





Disabling early problem indication for AspectJ elements:

The early problem indication feature of the JDT underlines potential errors in the editor as you type (before compilation). This feature is not AspectJ-aware. S a result, AspectJ keywords may be highlighted as errors by underlining with a req “squiggle”(see below):




This feature is perfectly harmless, but can be irritating. You can disable the early error indication by selectng “Preferences” from the “Window” menu and then expanding the “Java” node. Click on “Editor” and then select the “Problem Indication” tab. Finally, deselect the “Show problems before compiling” option and press apply.




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.eclipse.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".




Debugging

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.