IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

IntelliJ IDEA lets you create aspects in two forms: as .aj files and .java files containing classes annotated with @Aspect.

Note that by the time you start to create the aspects, you must have already enabled the AspectJ support plugins and defined aspectjrt.jar as a library.

To create an aspect
  1. In the Project tool window, do one of the following:
    • Select the source directory or package in which you want to create a new aspect, and choose File | New.
    • Select the source directory or package, and press or or or or .
    • Right-click the source directory or package to open the context menu, and select New.
  2. Select Aspect.
  3. In the dialog that opens:
    1. Specify the name of the aspect in the Name field.
    2. Select one of the following options from the Kind list:
      • Aspect to create a .aj file with the specified name.
      • @Aspect to create a .java file containing a class annotated with @Aspect.
    3. Click OK.

See Also



Web Resources: