Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "FAQ for AJDT"

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Overview==
+
== Overview ==
  
What is AJDT?
+
What is AJDT? The AspectJ Development Tools project (AJDT) is a set of plug-ins for Eclipse that provide support for aspect-oriented software development using AspectJ within the Eclipse IDE.  
The AspectJ Development Tools project (AJDT) is a set of plug-ins for Eclipse that provide support for aspect-oriented software development using AspectJ within the Eclipse IDE.
+
  
===Who develops AJDT?===
+
=== Who develops AJDT? ===
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 to the AJDT project?
+
  
===How does AJDT relate to the AspectJ project?===
+
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 to the AJDT project?
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.
+
  
==Community==
+
=== How does AJDT relate to the AspectJ project? ===
  
===Is there an AJDT mailing list?===
+
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 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.
+
  
===Are there any newsgroups for AJDT users?===
+
== Community ==
AJDT is supported through the eclipse.technology.ajdt newsgroup. A web interface is also available.
+
  
===What do I do if I think I've found a bug in AJDT?===
+
=== Is there an AJDT mailing list? ===
First check the bug database to see if you've hit a known problem. If it appears to be a genuinely new bug, please submit a bug report on AJDT using bugzilla following the bug reporting guidelines.
+
  
===Extra useful information to include in an AJDT bug report:===
+
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.
  
Information from the AJDT Event Trace view. This view displays a lot of diagnositc information about the execution of the plug-in, for example, it will show you the exact classpaths being used for compilation, the time spent in the compiler. To open the AJDT Event Trace go to Window > Show view > Other... > AspectJ > AJDT Event Trace.
+
=== Are there any newsgroups for AJDT users? ===
  
===How can I request a new feature in AJDT?===
+
AJDT is supported through the eclipse.technology.ajdt newsgroup. A web interface is also available.  
Informal requests can be posted to the newsgroup or mailing list. Formal requests can be made by raising an AJDT enhancement request on Bugzilla.
+
  
==Using AJDT==
+
=== What do I do if I think I've found a bug in AJDT? ===
  
===What version of AJDT do I need?===
+
First check the bug database to see if you've hit a known problem. If it appears to be a genuinely new bug, please submit a bug report on AJDT using bugzilla following the bug reporting guidelines.  
The recommended version of AJDT depends on the version of Eclipse that you are using. Eclipse 3.4 requires AJDT 1.6, Eclipse 3.3 requires AJDT 1.5, and Eclipse 3.2 requires AJDT 1.4 (etc.). Typically, the latest development version is just as stable as our official releases (we never release anything unless anything unless it passes all tests). You can find the latest development release as well as all of the official AJDT release from the AJDT downloads page.
+
  
===Why aren't AspectJ keywords highlighted in the editor?===
+
=== Extra useful information to include in an AJDT bug report: ===
The most common cause of this problem is having AspectJ constructs in Java files (files with the .java extension) and using the JDT's Java Editor. Aspects and AspectJ constructs should be contained in .aj files which are opened with the AspectJ Editor, an extension to the Java Editor.
+
  
===How can I debug AspectJ programs in Eclipse?===
+
Information from the AJDT Event Trace view. This view displays a lot of diagnositc information about the execution of the plug-in, for example, it will show you the exact classpaths being used for compilation, the time spent in the compiler. To open the AJDT Event Trace go to Window > Show view > Other... > AspectJ > AJDT Event Trace.  
AspectJ programs can be run in the debugger in the same way as Java programs. The tools enable the user to step into, through and out of advice. The AspectJ development tools also provide the facility to set breakpoints in aspects.
+
  
===Why don't breakpoints in around advice work?===
+
=== How can I request a new feature in AJDT? ===
Around advice is inlined by the weaver by default, which means that breakpoints set in the declaring aspect are not detected. To disable inlining select Window > Preferences > AspectJ > Compiler (Windows/Linux), or Eclipse > Preferences > AspectJ > Compiler (Mac). Select the Advanced tab, then check No inline and click OK to apply.
+
  
===How does the Visualiser work?===
+
Informal requests can be posted to the newsgroup or mailing list. Formal requests can be made by raising an AJDT enhancement request on Bugzilla.  
The Visualiser is an extensible Eclipse plug-in that can be used to visualize anything that lends itself to a 'bars and stripes' style representation. In AJDT the Visualiser is used to show how aspects affect a project. See the Visualiser web page for more information.
+
  
===Why do I sometimes see errors in the editor but not in the problems view?===
+
== Using AJDT ==
By default the AspectJ editor is used for files with the .aj extension and the Java editor for files with the .java extension. Some experienced AspectJ users may wish to use AspectJ function in .java files such as referring to ITD methods or fields, using inner aspects, implementing interfaces defined in aspects or calling methods on aspects. In this case you will see errors in the Java editor (although there will not be errors in the problems view). You may wish to either convert the file extension to .aj or use the AspectJ editor.
+
  
To open a .java file with the AspectJ editor right click, then select Open With > AspectJ/Java Editor. To use the AspectJ editor for all .java files select Window > Preferences > General > File Associations (Windows/Linux), or Eclipse > Preferences > General > File Associations (Mac). Select .java in the right-hand window, then use the section below to change the default editor.
+
=== What version of AJDT do I need? ===
  
===What are the limitations of the AspectJ Editor?===
+
The recommended version of AJDT depends on the version of Eclipse that you are using. Eclipse 3.4 requires AJDT 1.6, Eclipse 3.3 requires AJDT 1.5, and Eclipse 3.2 requires AJDT 1.4 (etc.). Typically, the latest development version is just as stable as our official releases (we never release anything unless anything unless it passes all tests). You can find the latest development release as well as all of the official AJDT release from the AJDT downloads page.  
Although similar, using the AspectJ editor is not exactly the same as using a Java editor. Besides an AspectJ editor providing AspectJ-related capabilities, there is some functionality that it does not provide, but the Java editor does. For example, override/implement gutter markers are not shown.
+
  
If there is some functionality that is missing from AspectJ editors that is present in Java editors, please mention it on the mailing list or raise a bug for it.
+
=== Why aren't AspectJ keywords highlighted in the editor? ===
  
===What happens if I write my aspects in .java files?===
+
The most common cause of this problem is having AspectJ constructs in Java files (files with the .java extension) and using the JDT's Java Editor. Aspects and AspectJ constructs should be contained in .aj files which are opened with the AspectJ Editor, an extension to the Java Editor.  
AJDT does not support aspects written in .java files. Although the compiler will compile them correctly, you will find some loss of functionality in AJDT if you do use .java files for your aspects:
+
  
+ The Outline and Package Explorer views will not show aspects or their contents.
+
=== How can I debug AspectJ programs in Eclipse? ===
+ The Cross References view will not show any information for an aspect in a .java file, although it will show information for any classes advised by that aspect.
+
  
===How do I use Ant to build my AspectJ projects in AJDT?===
+
AspectJ programs can be run in the debugger in the same way as Java programs. The tools enable the user to step into, through and out of advice. The AspectJ development tools also provide the facility to set breakpoints in aspects.  
To use Ant to build an AspectJ project you need to use the iajc Ant task instead of the javac task. The definition of this is found in ajde.jar in the org.aspectj.ajde plug-in. In addition you will need some other plug-ins on the classpath. A simple example written for Eclipse 3.2.1 is shown below. Note that paths and version numbers will be different on different machines and different Eclipse versions. Using Ant independently from Eclipse will be slightly different - see the AspectJ development guide for more details and for more information about the iajc Ant task.
+
  
 +
=== Why don't breakpoints in around advice work? ===
 +
 +
Around advice is inlined by the weaver by default, which means that breakpoints set in the declaring aspect are not detected. To disable inlining select Window > Preferences > AspectJ > Compiler (Windows/Linux), or Eclipse > Preferences > AspectJ > Compiler (Mac). Select the Advanced tab, then check No inline and click OK to apply.
 +
 +
=== How does the Visualiser work? ===
 +
 +
The Visualiser is an extensible Eclipse plug-in that can be used to visualize anything that lends itself to a 'bars and stripes' style representation. In AJDT the Visualiser is used to show how aspects affect a project. See the Visualiser web page for more information.
 +
 +
=== Why do I sometimes see errors in the editor but not in the problems view? ===
 +
 +
By default the AspectJ editor is used for files with the .aj extension and the Java editor for files with the .java extension. Some experienced AspectJ users may wish to use AspectJ function in .java files such as referring to ITD methods or fields, using inner aspects, implementing interfaces defined in aspects or calling methods on aspects. In this case you will see errors in the Java editor (although there will not be errors in the problems view). You may wish to either convert the file extension to .aj or use the AspectJ editor.
 +
 +
To open a .java file with the AspectJ editor right click, then select Open With > AspectJ/Java Editor. To use the AspectJ editor for all .java files select Window > Preferences > General > File Associations (Windows/Linux), or Eclipse > Preferences > General > File Associations (Mac). Select .java in the right-hand window, then use the section below to change the default editor.
 +
 +
=== What are the limitations of the AspectJ Editor? ===
 +
 +
Although similar, using the AspectJ editor is not exactly the same as using a Java editor. Besides an AspectJ editor providing AspectJ-related capabilities, there is some functionality that it does not provide, but the Java editor does. For example, override/implement gutter markers are not shown.
 +
 +
If there is some functionality that is missing from AspectJ editors that is present in Java editors, please mention it on the mailing list or raise a bug for it.
 +
 +
=== What happens if I write my aspects in .java files? ===
 +
 +
AJDT does not support aspects written in .java files. Although the compiler will compile them correctly, you will find some loss of functionality in AJDT if you do use .java files for your aspects:
 +
 +
+ The Outline and Package Explorer views will not show aspects or their contents. + The Cross References view will not show any information for an aspect in a .java file, although it will show information for any classes advised by that aspect.
 +
 +
=== How do I use Ant to build my AspectJ projects in AJDT? ===
 +
 +
Since AJDT 2.1.0 for Eclipse 3.6, see this [http://contraptionsforprogramming.blogspot.com/2010/03/ajdt-pde-builds-redux.html blog post].
 +
 +
<br> On earlier versions of AJDT, to use Ant to build an AspectJ project you need to use the iajc Ant task instead of the javac task. The definition of this is found in ajde.jar in the org.aspectj.ajde plug-in. In addition you will need some other plug-ins on the classpath. A simple example written for Eclipse 3.2.1 is shown below. Note that paths and version numbers will be different on different machines and different Eclipse versions. Using Ant independently from Eclipse will be slightly different - see the AspectJ development guide for more details and for more information about the iajc Ant task.
 +
<source lang="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
  
Line 69: Line 84:
  
 
<target name="init">
 
<target name="init">
  <path id="ajde.classpath">
+
<path id="ajde.classpath">
    <pathelement path="../../plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"/>
    <pathelement path="../../plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar"/>
    <pathelement path="../../plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar"/>
    <pathelement path="../../plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar"/>
    <pathelement path="../../plugins/org.eclipse.ant.core_3.1.100.v20060531.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.ant.core_3.1.100.v20060531.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.variables_3.1.100.v20060605.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.variables_3.1.100.v20060605.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar"/>
    <pathelement path="../../plugins/org.eclipse.text_3.2.0.v20060605-1400.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.text_3.2.0.v20060605-1400.jar"/>
    <pathelement path="../../plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar"/>
+
  <pathelement path="../../plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar"/>
    <pathelement path="../../plugins/org.aspectj.ajde_1.5.3.200610201049/ajde.jar"/>
+
  <pathelement path="../../plugins/org.aspectj.ajde_1.5.3.200610201049/ajde.jar"/>
    <pathelement path="../../plugins/org.aspectj.weaver_1.5.3.200610201049/aspectjweaver.jar"/>
+
  <pathelement path="../../plugins/org.aspectj.weaver_1.5.3.200610201049/aspectjweaver.jar"/>
    <pathelement path="../../plugins/org.aspectj.runtime_1.5.3.200610201049/aspectjrt.jar"/>
+
  <pathelement path="../../plugins/org.aspectj.runtime_1.5.3.200610201049/aspectjrt.jar"/>
  </path>
+
</path>
  <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
+
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
    <classpath refid="ajde.classpath" />
+
  <classpath refid="ajde.classpath" />
  </taskdef>
+
</taskdef>
 
</target>
 
</target>
  
 
<target name="build" depends="init">
 
<target name="build" depends="init">
  <delete dir="/bin"/>
+
<delete dir="/bin"/>
  <mkdir dir="/bin"/>
+
<mkdir dir="/bin"/>
  <path id="user.classpath">
+
<path id="user.classpath">
    <!-- add additional classpath entries here -->
+
  <!-- add additional classpath entries here -->
  </path>
+
</path>
  <!-- read additional ajc options from a file if required -->
+
<!-- read additional ajc options from a file if required -->
  <property name="ajcArgFile" value=""/>
+
 
  <!-- fork the compiler -->
+
<property name="ajcArgFile" value=""/>
  <iajc destDir="/bin" failonerror="true" argfiles=""
+
<!-- fork the compiler -->
    verbose="true" fork="true" maxmem="512m">
+
 
    <forkclasspath refid="ajde.classpath" />
+
<iajc destDir="/bin" failonerror="true" argfiles=""
    <forkclasspath refid="user.classpath" />
+
  verbose="true" fork="true" maxmem="512m">
    <src path="src/"/>
+
  <forkclasspath refid="ajde.classpath" />
  </iajc>
+
  <forkclasspath refid="user.classpath" />
 +
  <src path="src/"/>
 +
</iajc>
 
</target>
 
</target>
  
</project>
+
</project>
 +
</source>
 +
 
 +
=== Can I upgrade my AspectJ version? ===
 +
 
 +
Upgrading the AspectJ version in an install of AJDT is not generally recommended because it is likely that different releases will not be compatible with each other. However we do plan to provide some scripts in the near future that will upgrade your AspectJ to a higher compatible version if available.
 +
 
 +
== Extending ==
 +
 
 +
=== How can I build tools which extend AJDT? ===
 +
 
 +
See [[Developer's guide to building tools on top of AJDT and AspectJ]].
 +
 
 +
== Contributing ==
 +
 
 +
=== How can I contribute to the AJDT project? ===
  
 +
See the [[AJDT Developer FAQ]].
  
===Can I upgrade my AspectJ version?===
+
=== Where will I find the source for AJDT? ===
Upgrading the AspectJ version in an install of AJDT is not generally recommended because it is likely that different releases will not be compatible with each other. However we do plan to provide some scripts in the near future that will upgrade your AspectJ to a higher compatible version if available.
+
  
==Extending==
+
See the [[AJDT Developer FAQ]].
  
===How can I build tools which extend AJDT?===
+
=== How do I setup an AJDT development environment in Eclipse? ===
See [[Developer's guide to building tools on top of AJDT and AspectJ]].
+
  
==Contributing==
+
See the [[AJDT Developer FAQ]].
  
===How can I contribute to the AJDT project?===
+
=== How can I package my sample code for contribution to the examples plug-in? ===
See the Developer FAQ
+
  
===Where will I find the source for AJDT?===
+
See the [[AJDT Developer FAQ]].
See the Developer FAQ
+
  
===How do I setup an AJDT development environment in Eclipse?===
+
== Plans ==
See the Developer FAQ
+
  
===How can I package my sample code for contribution to the examples plug-in?===
+
=== Where do I find out about future releases of AJDT? ===
See the Developer FAQ
+
  
==Plans==
+
See the plans page for information about future releases.
  
===Where do I find out about future releases of AJDT?===
+
=== What new AJDT features are being worked on at the moment? ===
See the plans page for information about future releases.
+
  
===What new AJDT features are being worked on at the moment?===
+
Look for open AJDT bugs in bugzilla or ask a question to the mailing list. We are a friendly bunch and are happy to answer your questions.  
Look for open AJDT bugs in bugzilla or ask a question to the mailing list. We are a friendly bunch and are happy to answer your questions.
+
  
 
[[Category:AJDT]]
 
[[Category:AJDT]]

Latest revision as of 14:17, 31 May 2010

Overview

What is AJDT? The AspectJ Development Tools project (AJDT) is a set of plug-ins for Eclipse that provide support for aspect-oriented software development using AspectJ within the Eclipse IDE.

Who develops AJDT?

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 to the AJDT project?

How does AJDT relate to the AspectJ project?

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.

Community

Is there an AJDT mailing list?

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.

Are there any newsgroups for AJDT users?

AJDT is supported through the eclipse.technology.ajdt newsgroup. A web interface is also available.

What do I do if I think I've found a bug in AJDT?

First check the bug database to see if you've hit a known problem. If it appears to be a genuinely new bug, please submit a bug report on AJDT using bugzilla following the bug reporting guidelines.

Extra useful information to include in an AJDT bug report:

Information from the AJDT Event Trace view. This view displays a lot of diagnositc information about the execution of the plug-in, for example, it will show you the exact classpaths being used for compilation, the time spent in the compiler. To open the AJDT Event Trace go to Window > Show view > Other... > AspectJ > AJDT Event Trace.

How can I request a new feature in AJDT?

Informal requests can be posted to the newsgroup or mailing list. Formal requests can be made by raising an AJDT enhancement request on Bugzilla.

Using AJDT

What version of AJDT do I need?

The recommended version of AJDT depends on the version of Eclipse that you are using. Eclipse 3.4 requires AJDT 1.6, Eclipse 3.3 requires AJDT 1.5, and Eclipse 3.2 requires AJDT 1.4 (etc.). Typically, the latest development version is just as stable as our official releases (we never release anything unless anything unless it passes all tests). You can find the latest development release as well as all of the official AJDT release from the AJDT downloads page.

Why aren't AspectJ keywords highlighted in the editor?

The most common cause of this problem is having AspectJ constructs in Java files (files with the .java extension) and using the JDT's Java Editor. Aspects and AspectJ constructs should be contained in .aj files which are opened with the AspectJ Editor, an extension to the Java Editor.

How can I debug AspectJ programs in Eclipse?

AspectJ programs can be run in the debugger in the same way as Java programs. The tools enable the user to step into, through and out of advice. The AspectJ development tools also provide the facility to set breakpoints in aspects.

Why don't breakpoints in around advice work?

Around advice is inlined by the weaver by default, which means that breakpoints set in the declaring aspect are not detected. To disable inlining select Window > Preferences > AspectJ > Compiler (Windows/Linux), or Eclipse > Preferences > AspectJ > Compiler (Mac). Select the Advanced tab, then check No inline and click OK to apply.

How does the Visualiser work?

The Visualiser is an extensible Eclipse plug-in that can be used to visualize anything that lends itself to a 'bars and stripes' style representation. In AJDT the Visualiser is used to show how aspects affect a project. See the Visualiser web page for more information.

Why do I sometimes see errors in the editor but not in the problems view?

By default the AspectJ editor is used for files with the .aj extension and the Java editor for files with the .java extension. Some experienced AspectJ users may wish to use AspectJ function in .java files such as referring to ITD methods or fields, using inner aspects, implementing interfaces defined in aspects or calling methods on aspects. In this case you will see errors in the Java editor (although there will not be errors in the problems view). You may wish to either convert the file extension to .aj or use the AspectJ editor.

To open a .java file with the AspectJ editor right click, then select Open With > AspectJ/Java Editor. To use the AspectJ editor for all .java files select Window > Preferences > General > File Associations (Windows/Linux), or Eclipse > Preferences > General > File Associations (Mac). Select .java in the right-hand window, then use the section below to change the default editor.

What are the limitations of the AspectJ Editor?

Although similar, using the AspectJ editor is not exactly the same as using a Java editor. Besides an AspectJ editor providing AspectJ-related capabilities, there is some functionality that it does not provide, but the Java editor does. For example, override/implement gutter markers are not shown.

If there is some functionality that is missing from AspectJ editors that is present in Java editors, please mention it on the mailing list or raise a bug for it.

What happens if I write my aspects in .java files?

AJDT does not support aspects written in .java files. Although the compiler will compile them correctly, you will find some loss of functionality in AJDT if you do use .java files for your aspects:

+ The Outline and Package Explorer views will not show aspects or their contents. + The Cross References view will not show any information for an aspect in a .java file, although it will show information for any classes advised by that aspect.

How do I use Ant to build my AspectJ projects in AJDT?

Since AJDT 2.1.0 for Eclipse 3.6, see this blog post.


On earlier versions of AJDT, to use Ant to build an AspectJ project you need to use the iajc Ant task instead of the javac task. The definition of this is found in ajde.jar in the org.aspectj.ajde plug-in. In addition you will need some other plug-ins on the classpath. A simple example written for Eclipse 3.2.1 is shown below. Note that paths and version numbers will be different on different machines and different Eclipse versions. Using Ant independently from Eclipse will be slightly different - see the AspectJ development guide for more details and for more information about the iajc Ant task.

<?xml version="1.0" encoding="UTF-8"?>
 
<project name="My Project" default="build" basedir=".">
 
<target name="init">
<path id="ajde.classpath">
	  <pathelement path="../../plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar"/>
	  <pathelement path="../../plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar"/>
	  <pathelement path="../../plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601.jar"/>
	  <pathelement path="../../plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar"/>
	  <pathelement path="../../plugins/org.eclipse.ant.core_3.1.100.v20060531.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.variables_3.1.100.v20060605.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar"/>
	  <pathelement path="../../plugins/org.eclipse.text_3.2.0.v20060605-1400.jar"/>
	  <pathelement path="../../plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar"/>
	  <pathelement path="../../plugins/org.aspectj.ajde_1.5.3.200610201049/ajde.jar"/>
	  <pathelement path="../../plugins/org.aspectj.weaver_1.5.3.200610201049/aspectjweaver.jar"/>
	  <pathelement path="../../plugins/org.aspectj.runtime_1.5.3.200610201049/aspectjrt.jar"/>
</path>
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
	  <classpath refid="ajde.classpath" />
</taskdef>
</target>
 
<target name="build" depends="init">
<delete dir="/bin"/>
<mkdir dir="/bin"/>
<path id="user.classpath">
	  <!-- add additional classpath entries here -->
</path>
 <!-- read additional ajc options from a file if required -->
 
<property name="ajcArgFile" value=""/>
 <!-- fork the compiler -->
 
<iajc destDir="/bin" failonerror="true" argfiles=""
	  verbose="true" fork="true" maxmem="512m">
	  <forkclasspath refid="ajde.classpath" />
	  <forkclasspath refid="user.classpath" />
	  <src path="src/"/>
</iajc>
</target>
 
</project>

Can I upgrade my AspectJ version?

Upgrading the AspectJ version in an install of AJDT is not generally recommended because it is likely that different releases will not be compatible with each other. However we do plan to provide some scripts in the near future that will upgrade your AspectJ to a higher compatible version if available.

Extending

How can I build tools which extend AJDT?

See Developer's guide to building tools on top of AJDT and AspectJ.

Contributing

How can I contribute to the AJDT project?

See the AJDT Developer FAQ.

Where will I find the source for AJDT?

See the AJDT Developer FAQ.

How do I setup an AJDT development environment in Eclipse?

See the AJDT Developer FAQ.

How can I package my sample code for contribution to the examples plug-in?

See the AJDT Developer FAQ.

Plans

Where do I find out about future releases of AJDT?

See the plans page for information about future releases.

What new AJDT features are being worked on at the moment?

Look for open AJDT bugs in bugzilla or ask a question to the mailing list. We are a friendly bunch and are happy to answer your questions.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.