Last updated on 30th June 2004.
The AspectJ Development Tools project (AJDT) is a set of plugins for Eclipse that provide support for aspect-oriented software development using AspectJ within the Eclipse IDE.
AJDT is an open-source project hosted on eclipse.org, current contributors are listed on the website. Anyone can get involved, see "How can I contribute?"
Details about how to get hold of AJDT are available from the download page.
AJDT provides Eclipse IDE integration for AspectJ, and includes the AJDE (AspectJ Development Environment) libraries from the AspectJ project as part of its packaging. Development of the AspectJ compiler and AJDE takes place under the AspectJ project.
AJDT is supported through the eclipse.technology.ajdt newsgroup. A web interface is also available.
First check the bug database to see if you've hit a known problem. There's also a view built into AJDT (Window->Show View->Other...->AspectJ->AJDT Event Trace) that displays a lot of diagnostic information about the execution of the plugin (for example, it will show you the exact classpaths being used for compilation). If it appears to be a genuinely new bug, please submit a bug report on AJDT using bugzilla following the bug reporting guidelines.
Informal requests can be posted to the newsgroup or mailing list. Formal requests can be made by raising an AJDT enhancement request on Bugzilla.
AJDT has a developers mailing list, ajdt-dev@dev.eclipse.org, with archives and subscription information available online. Questions regarding the use of AspectJ the language are best directed to the AspectJ users mailing list.
The most common cause of this problem is opening Java files (files with the .java extension) using the JDT's Java Editor. AJDT provides an extension to the Java Editor, the AspectJ Editor, that recognizes AspectJ language structure and provides an outline view that displays crosscutting structure information. To configure Eclipse so that Java files are opened with the AspectJ editor, select "preferences" from the Window menu. Expand the workbench preferences and click on "File Associations." Select file type "*.java," then select the AspectJ Editor and click the "Default" button.
AJDT doesn't yet provide an eager parser for AspectJ. The early problem indication support is therefore expecting to see a regular Java program, and so treats AspectJ keywords as errors. The squiggles can be turned off by opening preferences from the Window menu: Expand the Java preferences and click on "Editor." In the "Problem Indication" tab, uncheck the option "Show problems before compiling."
AJDT doesn't yet provide an eager parser for AspectJ, so the understanding of the editor buffer contents needed to update the outline view is only after a compilation. The process of compiling creates a structure model (including the crosscutting information) that the outline view then renders.
Working with with AspectJ programs in the debugger has the following limitations:
NB. Since 1.1.11 breakpoints can be set in aspects as well as in classes.
The Visualiser consists of two views, the Visualiser and the Visualiser Menu, both of which need to be open: Select "Window" , "Show View" , "Other... Visualiser" from the taskbar, then select "Visualiser" and "Visualiser Menu " and click OK. Alternatively, open the Aspect Visualization perspective by clicking "Window", "Open Perspective", "Other... Aspect Visualization".
The Visualiser has a provider architecture - other plugins define content providers that plug in to the Visualiser through extension points. Only one provider can be active at a time. The active provider determines the bars and stripes that are shown. You can tell which provider is active from the Visualiser title bar. If the AspectJ provider is not active by default, click "Window", "Preferences", then select "Visualiser", select the AspectJ Provider, then click OK.
To visualize an AspectJ project, click on the AspectJ Project in the Package Explorer or the Projects view. If the project has been built the aspects defined in that project should appear in the Menu. The Visualiser shows all the classes in your project with bar length proportional to number of lines of code. Dark bars represent classes not affected by an aspect. Coloured lines on the white bars represent lines of code affected by the Aspect in the Menu with the corresponding colour. It is also possible to click on individual classes or packages in the package explorer to see their individual representations.
The Visualiser starts in class view by default. Click on the package button to choose package view. Here each bar represents a package in your project and length is proportional to total number of lines. Package view was designed as an overview, particularly for large projects. Click on the class button to return to class view.
In either package or class view, clicking on the limit button restricts the view to affected bars only. Clicking again leaves limit mode.
To open the source file of a represented class, double click on the corresponding bar. To open a source file at a line affected by an aspect, double click on the corresponding coloured stripe.
If you would like to find out more the Visualiser has its own Eclipse help pages.
The JoinPoint probe was an experimental function that made a brief appearance in AJDT 0.5.2 and 0.6.0beta. We have temporarily removed it from AJDT whilst we work out the correct user-interaction model and port the Swing UI to SWT.
Your contributions to the AJDT project are strongly welcomed! You can create a patch that fixes a bug or provides an enhancement and submit it to the AJDT developers either as an attachment to a bug in Bugzilla, or as an attachment to a post to the newsgroup or developer mailing list. You can also contribute sample code showing interesting uses of AspectJ, by adding entries to the example plugin. All contributions must be made available under the terms of the Eclipse website see the Eclipse contribution and participation FAQ. Sorry, but for legal reasons we are unable to accept patches emailed directly to developers, and will normally ask you to resubmit these either via Bugzilla or the mailing list.
AJDT development is run as a meritocracy, developers who have a track record of submitting good patches can become committers on the project.
The org.eclipse.ajdt.examples plugin contains various sample projects which are made available under the Examples category of the New wizard, from where they can be imported into your workspace as AspectJ projects. It is easy to add new samples to this plugin, as follows:
AJDT source is held in the Eclipse CVS repository under /home/technology, see the root of the AJDT source tree online. The latest source can be found in subdirectories of org.eclipse.ajdt as follows:
org.eclipse.ajdt | |--> AJDT_30M9_src |--> org.eclipse.ajdt |--> org.eclipse.ajdt.examples |--> org.aspectj.ajde |--> org.eclipse.aspectj |--> org.eclipse.aspectj.feature |--> org.eclipse.contribution.visualiser |--> org.eclipse.contribution.visualiser.tests |--> UpdateSite
Start with a clean workspace under Eclipse 3.0:
:pserver:anonymous@dev.eclipse.org:/home/technology
Each of the projects you just created also contains an Ant build file, "build.xml." The default target builds a packaged version of the project in question. Use the build.xml file in the "update" project to invoke a master build that builds an entire update site structure in its "dist" directory.
See the task list on our project home page.