This week in class we started taking a look at AOP, Aspect Oriented Programming. I don’t know too much about it yet, but it deals with “cross-cutting concerns” and its use seems to make sense in some cases especially logging. AspectJ is a popular extension to Java.
Anyways, let’s look at adding AspectJ support to Eclipse. I assume you already have Eclipse installed.
First, open Eclipse and open the Software Updates window from the Help menu.
Now click the Available Software tab and click Add Site. Paste in the following URL:
http://download.eclipse.org/tools/ajdt/34/update
Click OK.
Now that the plugin site has been added you will see it listed as AJDT Update Site in the plugin listings. Expand that node to see the available addins. You can grab all of them, but I choose not to get the source code for the plugins. After selecting what you want, click Install.
Follow the installation dialog. Note, you will need to agree to a license agreement.
You will need to restart Eclipse for the install to take affect.
Now that have AspjectJ support in Eclipse you can write the obligatory HelloWorld applicatiion which I will walkthrough in my next post.