Eclipse AspectJ compiler use project
Abstract:
This article tells you how to use Eclipse AspectJ compiler project .. entry-level curriculum ..Article Tools
Question you want compiled in the Eclipse AspectJ project.Not using Eclipse or Ant?
If you are prepared based on the aspect-oriented ApsectJ procedures when not used Eclipse or Ant, I suggest you skip this chapter and the next chapter started learning from the deployment of AspectJ procedures commonly used methods.
Solutions to download and install Eclipse AspectJ Development Tools (AJDT) plug-in.
Disclaimer: Matrix authorized access to any site, reproduced, make sure to keep the following information and links to the author Author: jerric (the author's blog: http://blog.matrix.org.cn/page/jerric)
Original: http://www.matrix.org.cn/resource/article/44/44423_Eclipse + AspectJ.html
Keyword: Eclipse; AspectJ
Discussion and Eclipse projects, the AspectJ is an open source project, while its integrated development environment to provide the most abundant AspectJ plug-ins. You can download AspectJ http://www.eclipse.org/ajdt the Eclipse plug-in, and then find a corresponding note.
Best practice experience is download the latest version of AspectJ, and the corresponding latest AJDT and support its Eclipse. If you are unsure what the download, you can download pages in AJDT find a compatibility list, it can help you do so choose.
If AJDT to check whether it has the correct installation of plug-in the Eclipse menu, choose File New Project…, in the New Project dialog should have a ApsectJ project options, in Figure 2-1 shown.
Mx version of the Eclipse 3 default settings are all hidden surcharge wizard. You can choose Show All Wizards selected frame to show New AspectJ Project options.
In New Project dialog box, select the AspectJ Project Options, and then click Next, and to the next steps to set up a new AspectJ project.
Once the project is completed the wizard, the Eclipse interface of the work will suggest you switch to Java Perspective, and, if you are the first to use the wizard, it will ask you to confirm the application of several AJDT. Recommend using Java Perspective, and accept the default parameters of the project. Upon completion of your project will be shown in Figure 2-2.
AJDT version 1.1.7 and above will automatically default under the aspects of your java code and incremental compilers; if you think this affects your overall development more efficient, you can turn off this function.
ApsectJ created in the new project at the same time, it has been a good compiler automatically. You can also click on the button Build AspectJ Project, the project to mandatory compiler.

Figure 2-1 creation of a new AspectJ project

Figure 2-2 in the Eclipse Java Perspective in the AspectJ project shows that the source code files and jar
You should have the procedure can be compiled and run good. In the meantime, you can pay attention to the Java Perspective AJDT some expansion. The most notable is in the Outline view, when you select one aspect or advised category, there will be new regional show that the application has been recommended by the local. More examples shown in Figure 2-4 and 2-5.

Figure 2-4 Outline view Show with a specific application type or aspect of the proposal

Figure 2-5 Outline view Show in the use of a specific type of application which of the recommendations
AJDT also provides another view to graphically show you how to apply to the aspects of your projects. Select Window Open Perspective Other…, Aspect Visualization perspective and choose to open that view. This new view will be listed in your category has been applied in the aspects, as shown in Figure 2-6.

Figure 2-6 has been selected projects AJDT an example of Aspect Visualization perspective
Switch back to Java perspective, and you run the procedure. In a run in the Eclipse AspectJ procedures and operating procedures for an ordinary Java as simple. Java perspective, the choice includes public static void main (String [] args) method of categories, and then in the main menu, select Run Run As Java Application. Eclipse category will be selected in the Find and implement main () method. Command-line output will be displayed in the Console view, as shown in Figure 2-7.

Figure 2-7 run at the 5.1 code Console view, the output of
AJDT contains the rich features and expansion can even write a whole chapter. Take time to see AJDT provided by the parameters and characteristics, so when you use this book in the other code, you can quickly grasp what you most useful features.
Reference
Eclipse and The Eclipse Cookbook 2.9 of the code demonstrated how to use Ant to automate compiler; you can http://www.eclipse.org/ajdt the User Resources: Documentation was AJDT plug-integrity link to the user's guide. Borland JBuilder Plug-in the AspectJ http://sourceforge.net/projects/aspectj4jbuildr/ downloaded Sun's NetBeans plug-in the AspectJ http://sourceforge.net/projects/aspectj4netbeans/ download. Reference Steve Holzner (O'Reilly), Eclipse and The Eclipse Cookbook.
Releated Java Articles
January 23, 2006 | Filed Under Java Developement Tools |






