diff options
author | aclement <aclement> | 2009-04-08 17:28:05 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-04-08 17:28:05 +0000 |
commit | e1d807495d9078382ddedbd698b8b09cb09d0ec2 (patch) | |
tree | b475d171b6b714e2184bf0264f109e0936c7e3b3 | |
parent | 023dcb3a04b8a0c23a3b22f6f1f0d35fa8a0dcb2 (diff) | |
download | aspectj-e1d807495d9078382ddedbd698b8b09cb09d0ec2.tar.gz aspectj-e1d807495d9078382ddedbd698b8b09cb09d0ec2.zip |
265356: positional info for anno style messages
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java index 711ec4538..506aabfbf 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java @@ -225,8 +225,7 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor { } /** - * aspect must be public nested aspect must be static cannot extend a - * concrete aspect pointcut in perclause must be good. + * aspect must be public nested aspect must be static cannot extend a concrete aspect pointcut in perclause must be good. */ private void validateAspectDeclaration(TypeDeclaration typeDecl) { if (typeStack.size() > 1) { @@ -293,10 +292,9 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor { } /** - * 1) Advice must be public 2) Advice must have a void return type if not - * around advice 3) Advice must not have any other @AspectJ annotations 4) - * After throwing advice must declare the thrown formal 5) After returning - * advice must declare the returning formal 6) Advice must not be static + * 1) Advice must be public 2) Advice must have a void return type if not around advice 3) Advice must not have any other @AspectJ + * annotations 4) After throwing advice must declare the thrown formal 5) After returning advice must declare the returning + * formal 6) Advice must not be static */ private void validateAdvice(MethodDeclaration methodDeclaration) { @@ -385,7 +383,8 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor { if (pointcutExpression == null) pointcutExpression = getStringLiteralFor("value", adviceAnn, pcLocation); try { - ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0]); + // +1 to give first char of pointcut string + ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0] + 1); PatternParser pp = new PatternParser(pointcutExpression, context); Pointcut pc = pp.parsePointcut(); pp.checkEof(); |