From: aclement Date: Sat, 27 Sep 2008 17:27:51 +0000 (+0000) Subject: tracking aspects in effect last build X-Git-Tag: V1_6_2~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9bd7429e83ab61f44cfa773b7186778975f31e00;p=aspectj.git tracking aspects in effect last build --- diff --git a/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java b/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java index 70ce8ad9c..d8efcaf08 100644 --- a/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java +++ b/weaver/src/org/aspectj/weaver/AsmRelationshipProvider.java @@ -79,6 +79,10 @@ public class AsmRelationshipProvider { if (back != null && back.getTargets() != null) { back.addTarget(sourceHandle); } + if (sourceNode.getSourceLocation()!=null) { + AsmManager.getDefault().addAspectInEffectThisBuild(sourceNode.getSourceLocation().getSourceFile()); + } + } // For ITDs @@ -89,15 +93,16 @@ public class AsmRelationshipProvider { return; if (originatingAspect.getSourceLocation() != null) { String sourceHandle = ""; + IProgramElement sourceNode = null; if (munger.getSourceLocation() != null && munger.getSourceLocation().getOffset() != -1) { - IProgramElement sourceNode = AsmManager.getDefault() + sourceNode = AsmManager.getDefault() .getHierarchy().findElementForSourceLine( munger.getSourceLocation()); sourceHandle = AsmManager.getDefault().getHandleProvider() .createHandleIdentifier(sourceNode); } else { - IProgramElement sourceNode = AsmManager.getDefault() + sourceNode = AsmManager.getDefault() .getHierarchy().findElementForSourceLine( originatingAspect.getSourceLocation()); sourceHandle = AsmManager.getDefault().getHandleProvider() @@ -123,6 +128,7 @@ public class AsmRelationshipProvider { IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARED_BY, false, true); back.addTarget(sourceHandle); + AsmManager.getDefault().addAspectInEffectThisBuild(sourceNode.getSourceLocation().getSourceFile()); } } @@ -192,6 +198,9 @@ public class AsmRelationshipProvider { IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATED_BY, false, true); back.addTarget(sourceHandle); + if (sourceNode.getSourceLocation()!=null) { + AsmManager.getDefault().addAspectInEffectThisBuild(sourceNode.getSourceLocation().getSourceFile()); + } } public void adviceMunger(IHierarchy model, Shadow shadow, @@ -264,6 +273,9 @@ public class AsmRelationshipProvider { back.addTarget(adviceHandle);// back.getTargets().add( // adviceHandle); } + if (adviceElement.getSourceLocation()!=null) { + AsmManager.getDefault().addAspectInEffectThisBuild(adviceElement.getSourceLocation().getSourceFile()); + } } }