Viewing crosscutting information

In this section you are going to use the Cross References view to see how your aspect advises your class. The cross references view shows crosscutting information and can also be used to navigate.

  1. Make sure that your World aspect is open in the editor, and check that Build Automatically is turned on from the Project menu.
  2. If the Cross References view is not already open, open it now. Select  Window > Show View > Other.... Expand the  AspectJ folder and select  Cross References. Click Finish to open the view.
  3. Select the aspect declaration in the editor and make sure that the Cross References view shows one advises relationship.

    Cross References view

  4. Double click on the Hello.sayHello() method in the Cross References view. The Hello class will open in the editor with the sayHello() method highlighted. The cross references view has updated to show relationships for the new selection.

    Cross References view

Related concepts

AspectJ views
AspectJ editor

Related tasks

Using the Cross References view