AspectJ Support for Forte is an extension to Sun Microsystem's Forte for Java. AJDE for Forte will allow you to
The AspectJ Development environment has been rewritten for AspectJ 1.0 alpha 1. This documentation is targeted at the 0.8beta4 release but much of it still applies to the current release.
Installation
Use the installer to place the "ajdeForForte.jar" in Forte's modules directory and "aspectjrt.jar" in to Forte's lib/ext directory.
Right-click the "Modules" item and select "New Module from File..."
Find the ajdeForForte.jar in the directory that you installed into (e.g. c:\forte4j\modules) and select it.
Key Improvements
Key Concepts
AJDE support can be toggled on and off by means of the "AJ" button.
For working with AspectJ code use only the AspectJ toolbar and the "AspectJ Structure" explorer, along with the filesystem explorer--do not use the regular compile/debug/execute buttons.
You must mount a filesystem whose path ends with "ajworkingdir" and will be warned to do so if you don't. This is where ajc will put it's generated source and output class files.
Known Bugs & Limitations
"Mode" switching is not supported in this version--you must do all of your AspectJ work in the "Editing" mode. If you switch modes the IDE has to be restarted for the AspectJ window to show again.
There is no compiler progress dialog--the way to tell if the compile is finished is to watch the "status" area of the main window.
The structure view is not persistent between IDE launches--you must compile to view the structure for a program.
The debugger has not seen much use and it's stability and performance is limited.
Documentation for 0.8beta4
If you have not already done so, start by installing Forte4J from http://www.sun.com/forte/ffj, and start Forte4J.
2.1 Add the ajdeForForte module
You are now ready to start using AJDE for Forte. Refer to section 3 for instructions.
2.2 OPTIONAL: Set up ajc as an external compiler
The following procedure is not necessary to use AJDE for Forte. You do not need to do the following steps unless you want to use ajc as one of Forte's external compilers (not recommended unless you know what you are doing and are aware of the performance overhead). Refer to the next section about the standard way to compile AspectJ files.
right-click the nested "External Compilation" item and select "New External Compilation Service" (the new item will appear as a child node of the "External Compilation" node)
click on the newly created service and in the right (properties) pane make the following changes:
"External Compiler" -> c:{/}apps{/}aspectj0.7{/}bin{/}ajc.bat -d c:{/}apps{/}aspectj0.7{/}examples -classpath {filesystems}{:}{classpath} {files}
Error Expression -> make a new one by clicking "..." and adding a new "Preset" called "AJC" with the following entries
click on the "Java Sources" item in the same "Project Settings" window and change the "Default Compiler" to "AJC"
To uninstall follow Forte's documentation on un-installing modules (process is similar to 2.2).
3.1 Setting up the AspectJ Examples
enter "AspectJ Examples" as the projects' name and click "OK"
browse into the AspectJ install directory (e.g. "C:\apps\aspectj0.7")
in the "Explorer" window right-click "Project AspectJ Examples" and select "Add Existing..."
from the "examples" file system select all of the directories (by shift-clicking the top and bottom most" and click "OK"
click the "AJ" button (or in the "View" menu select "AspectJ Structure View"
In the "Explorer" window you can now select the "AspectJ Structure" tab and navigate the structure of the examples
You should also add a filesystem whose leaf directory is called "ajworkindir"--this is where the preprocessed files and output classes will be placed
3.2 Compiling the Spacewar Example
3.3 Running the Spacewar Example