您的位置:首页 >> 编程开发 >> Java >> Java基础 >> Eclipse >> 正文
Eclipse RSS
 

Develop aspect-oriented Java applications with Eclipse and AJDT by Matt Chapman , Helen Hawkins

http://www.rdxx.com 04年12月20日 12:12 Blog 我要投稿

关键词: PMA , Java , Eclipse , ATI , Aspect , NT , IE , ONS , IT , IP , ASP

The AspectJ Development Tools for Eclipse (AJDT) is an open source Eclipse Technology Project that provides the tooling required to develop and run AspectJ applications. We believe good tools have a key role to play in realizing the full benefits of aspect-oriented programming, and particularly in helping newcomers understand the concepts involved.

After reading this article, we hope you will have a good feel for the support that AJDT provides for using AspectJ. We'll start by showing you how to get up and running with AJDT. Then we'll dive straight into things, creating an AspectJ application from scratch. You'll see how to create aspects and Java classes, and how to run the application. Our first example is very simple to keep the focus on the tools and introduce the different visual and navigational features that AJDT provides to help with your development. Even so, this simple application illustrates one real-world use of aspects.

We then move onto a slightly more complex example so that we can explore the tools in more detail, and show you how to work with existing projects. This example has several aspects that are integral to the application, as well as a debug aspect that we'll only want to include if we're actually debugging the application. We show how AJDT enables you to selectively apply and remove this debug aspect. After that, we visit the powerful Visualization perspective, to gain a higher-level understanding of how the many different aspects affect the rest of the application. Finally, we look at a couple of more advanced features of the tools, including those for debugging AspectJ applications and generating documentation.

Throughout this article, we are assuming some basic familiarity with AspectJ and aspect-oriented programming (AOP). For introductory material on AOP and programming in AspectJ, please see the Resources; alternatively, you can install AJDT and follow the Help links to AspectJ, where you will find the AspectJ documentation.

Installing AJDT
To follow along with this article, you'll need to be running AJDT version 1.1.11 or later, which requires Eclipse 3.0 (final). There is an earlier version of AJDT available that works with Eclipse 2.1; however, many of the features we discuss in this article were added in version 1.1.11.

To install the latest AJDT for Eclipse 3.0, follow these steps:

  1. Start Eclipse, then go to Help>Software Updates>Find and Install....

  2. Search for new features to install and add a new remote site called AJDT Update Site with the URL http://download.eclipse.org/technology/ajdt/30/update.

    If you need a proxy server to access the Internet, set your proxy preferences via Window>Preferences>Install/Update.

  3. Expand the AJDT Update Site node and select AspectJ. Choose to install the Eclipse AspectJ Development Tools, then read and accept the copyright statement.

  4. Click Finish.

As of version 1.1.11, AJDT is fully integrated into the Eclipse 3.0 framework, so there are several ways to make sure that it is properly installed. The most useful of these is the AJDT documentation's integration with both the Eclipse help and the Eclipse Platform welcome pages. To navigate to both the AJDT help and the documentation for AspectJ 1.2 select

9 7 3 1 2 4 8 :


 
 
标签: PMA , Java , Eclipse , ATI , Aspect , NT , IE , ONS , IT , IP , ASP 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站