Community
Participate
Working Groups
Using the -outxml option in AJDT the generated aop.xml files are not correct after the first build and contain all the aspects that have ever been built (including those in different projects and duplicates if an aspect has been built twice). It seems that there is a global list of aspects (aspectNames in AjBuildManager) that is never cleared.
I have also just noticed that the generated names are wrong for inner classes. I think "spacewar.Display2$SpaceObjectPainting" should be "spacewar.Display2.SpaceObjectPainting".
The aspectNames list should either be moved into AjState or removed entirely. If moved into AjState we will need it to be aware of file deletions as that may affect the set of aspects - hmmm, but now I come to type that, it might be that aspect deletions force a full build anyway, which creates a new state and would empty the set of aspects. The alternative would be to remove the list entirely and just work it out at the point we create the xml file.
Created attachment 36324 [details] patch containing testcase Apply this patch to the tests project.
Created attachment 36325 [details] patch containing fix Apply this patch to the org.aspectj.ajdt.core project. This patch contains a proposed fix. Namely, to move the list of aspectNames to the AjState. Note that when any changes are made to an aspect (including the deletion of one) we go back to source and do a full build. This creates a new AjState and consequently a new aspectNames list.
patches committed.
fix available.