diff options
author | aclement <aclement> | 2004-12-20 14:46:11 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-12-20 14:46:11 +0000 |
commit | 5bcf8fadcc2dd607a27e33004a691dc35d983b9d (patch) | |
tree | 6a3f069545e733f6bc585e386319224ec77324d3 /weaver | |
parent | 427c0d3dfdcc6a74c7e0bc6fcf1f55206ee04a8e (diff) | |
download | aspectj-5bcf8fadcc2dd607a27e33004a691dc35d983b9d.tar.gz aspectj-5bcf8fadcc2dd607a27e33004a691dc35d983b9d.zip |
Hopefully fixes disappearance of decsofts in AJDT. The addition of the offset to the source location caused problems because a declare soft was being assigned 2 diff offsets in different parts of the weaver. First source location was the offset of the 'declare', second location was the offset for the declares pointcut expression. Now resolved so offset is always position of the 'declare'.
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Advice.java | 6 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/CrosscuttingMembers.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/Advice.java b/weaver/src/org/aspectj/weaver/Advice.java index bafbb3ef5..1c8c92b98 100644 --- a/weaver/src/org/aspectj/weaver/Advice.java +++ b/weaver/src/org/aspectj/weaver/Advice.java @@ -17,6 +17,7 @@ import java.util.Collections; import java.util.List; import org.aspectj.bridge.IMessage; +import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.patterns.AndPointcut; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; @@ -67,9 +68,8 @@ public abstract class Advice extends ShadowMunger { return ret; } - public static Advice makeSoftener(World world, Pointcut entry, TypePattern exceptionType,ResolvedTypeX inAspect) { - Advice ret = world.concreteAdvice(AdviceKind.Softener, - entry, null, 0, entry); + public static Advice makeSoftener(World world, Pointcut entry, TypePattern exceptionType,ResolvedTypeX inAspect,IHasSourceLocation loc) { + Advice ret = world.concreteAdvice(AdviceKind.Softener, entry, null, 0, loc); ret.exceptionType = exceptionType; ret.concreteAspect = inAspect; diff --git a/weaver/src/org/aspectj/weaver/CrosscuttingMembers.java b/weaver/src/org/aspectj/weaver/CrosscuttingMembers.java index 62ba60412..0685ef0be 100644 --- a/weaver/src/org/aspectj/weaver/CrosscuttingMembers.java +++ b/weaver/src/org/aspectj/weaver/CrosscuttingMembers.java @@ -109,7 +109,7 @@ public class CrosscuttingMembers { } else if (declare instanceof DeclareSoft) { DeclareSoft d = (DeclareSoft)declare; // Ordered so that during concretization we can check the related munger - ShadowMunger m = Advice.makeSoftener(world, d.getPointcut(), d.getException(),inAspect); + ShadowMunger m = Advice.makeSoftener(world, d.getPointcut(), d.getException(),inAspect,d); Pointcut concretePointcut = d.getPointcut().concretize(inAspect, 0,m); m.pointcut = concretePointcut; declareSofts.add(new DeclareSoft(d.getException(), concretePointcut)); |