blob: 7f0a5d506a9f89494d880a5a3c1a7caa831b72ec [file] [log] [blame]
Crosscutting Comparison view
----------------------------
Check out "Figures Demo" from org.eclipse.ajdt.ui.tests/workspace
Exclude the SaveAndRestore.aj file (in the figures.support package) from the
build path.
Right-click on the project in the package explorer and select
AspectJ Tools > Save Crosscutting Map
A dialog should appear and the default name for the map file should
be "crosscutting". (CCDIFF_1)
Press OK and check that a "crosscutting.ajmap" file appears in the top level
of the project (CCDIFF_2)
Double-click on the "crosscutting.ajmap" file, check that it is opened in the
AJMap Editor (CCDIFF_3)
Right-click on the "crosscutting.ajmap" file and select AspectJ Tools > Compare
Crosscutting With Current Build. Check that the Crosscutting Comparison view
is opened, and that the table shows no entries (CCDIFF_4)
Include the SaveAndRestore.aj file (in the figures.support package) in the
build path. Three "added" entries should appear in the table, two
for the windowOpened and windowClosing methods being advised, and one for the
declare parents on the FigureElement interface. (CCDIFF_5)
Double-click on the before advice entry and check that it is opened
in the editor. (CCDIFF_6)
Filtering: The description should say "Showing 3 of 6 items". Press the
Filters... button to bring up the relationship filter dialog. Press "Deselect
All", then press OK. Check that the view now shows all 6 entries. (CCDIFF_7)
In the editor comment out the before advice, and save. A build
should occur, and the corresponding entries should disappear from
the view. (CCDIFF_8)
Press the Filters... button, then press "Restore defaults", then tick
"all Added relationships" and press OK. Check that no entries are shown in the
view, and that the description says "Showing 0 of 4 items" (CCDIFF_9)
Comparing two elements
----------------------
Restore the filter settings to the defaults.
Check out the "Comparisons" project from org.eclipse.ajdt.core.tests/workspace.
Open foo/MyAspect.aj in the editor, then select the before and after advice
in the outline view, right-click and select "Compare Crosscutting With >
Each Other". The Crosscutting Comparison view should then show one added
entries. (CCDIFF_10)
Now select the declare warning and the after advice in the outline view and
select the same comparison option. The view should show four entries, two
added and two removed. (CCDIFF_11)
Press the "Propagate Up" button on the view, and the view should become
empty. (CCDIFF_12)
Pressing the button again should return the view to showing 4 entries. (CCDIFF_13)
Right-click the project and select AspectJ Tools > Save Crosscutting Map.
Accept the default, then right-click the generated .ajmap file and select
AspectJ Tools > Compare Crosscutting With Current Build. Then comment out
the declare warning statement in MyAspect.aj and save. The view should
update to show two removed entries, with method-call targets. (CCDIFF_14)
Press the "Propagate Up" button on the view. Two entries should still be
present in the view and the two method-call targets should now appear as
methods Orange.setX() and Apple.setY(). (CCDIFF_15)
Pressing the button again should return the targets to method-calls. (CCDIFF_16)