Supports the AspectJ (org.aspectj.ajde) 1.0.6 plugin.
Fixes bug 22267 - external jars added to Java Build Path were incorrectly handled under Linux
Fixes bug 22339 - AJ Builder now has a name!
Fixes bug 21998 - .class files always placed under workspace
Rebuild All now works when using multiple projects (in 0.5.0 this sometimes caused failure and subsequent plugin deactivation)
Supports project dependencies in Java Build Path
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)
Download the file org.eclipse.ajdt.ui_0.5.2.zip to a temporary directory on your machine
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.
Start Eclipse.
Confirm that both the AspectJ and AJDT plugins have been successfully installed:
From the help menu, select “About Eclipse Platform,” and then click on “Plug-in Details”
You should see the org.aspectj.ajde plugin listed at version 1.0.6. (Note the image below is out of date and shows a 1.0.5 version plugin)
...and the org.eclipse.ajdt.ui plugin listed at version 0.5.2.. (note the image below is out of date and shows a 0.5.0 version number)
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).
Select “Preferences” from the “Window” menu.
Expand the “Workbench” node, and select “File Associations.” In the pane on the right of the dialog box click on “*.java.” Highlight the AspectJ/Java editor, and click on “Default.”
The AspectJ/Java editor should now be shown as the default.
Adding the New Aspect Wizard Shortcut:
Open the Java perspective, and then from the “Window“ menu select “Customize Perspective.”
Expand the “File New” branch and select the “Aspect” node (and AspectJ Project too if you like). A shortcut to create a new aspect will now appear alongside the new class wizard shortcut in the “New...” menu.
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.
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.