diff options
author | aclement <aclement> | 2005-11-11 08:16:23 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-11 08:16:23 +0000 |
commit | 1aeb7f3ef5dc07595dc35249316eaac62c7ba144 (patch) | |
tree | 02d8908ec4a7042eacaaf01b0a6d3442a9543db9 /org.aspectj.ajdt.core | |
parent | 8965f8074211c53ba39127f22d079da102d2bd5e (diff) | |
download | aspectj-1aeb7f3ef5dc07595dc35249316eaac62c7ba144.tar.gz aspectj-1aeb7f3ef5dc07595dc35249316eaac62c7ba144.zip |
more AST stuff: 110465
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java | 22 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java | 4 |
2 files changed, 16 insertions, 10 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java index d583a12e1..e11e520ea 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java @@ -288,18 +288,20 @@ public class PointcutDeclaration extends BodyDeclaration { * Method declared on ASTNode. */ void accept0(ASTVisitor visitor) { - AjASTVisitor ajvis = ((AjASTVisitor)visitor); - boolean visitChildren = ajvis.visit(this); - if (visitChildren) { - // visit children in normal left to right reading order - acceptChild(ajvis, getJavadoc()); - if (this.ast.apiLevel >= AST.JLS3) { - acceptChildren(ajvis, this.modifiers); + if (visitor instanceof AjASTVisitor) { + AjASTVisitor ajvis = ((AjASTVisitor)visitor); + boolean visitChildren = ajvis.visit(this); + if (visitChildren) { + // visit children in normal left to right reading order + acceptChild(ajvis, getJavadoc()); + if (this.ast.apiLevel >= AST.JLS3) { + acceptChildren(ajvis, this.modifiers); + } + acceptChild(ajvis, getName()); + acceptChild(ajvis, getDesignator()); } - acceptChild(ajvis, getName()); - acceptChild(ajvis, getDesignator()); + ajvis.endVisit(this); } - ajvis.endVisit(this); } /* (omit javadoc for this method) diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java index 339b30db3..b16a3606e 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java @@ -65,6 +65,10 @@ public class ASTVisitorTest extends TestCase { check("aspect A{ /** */ public void B.x(){} }", "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))"); } + + public void testAspectWithCommentThenPointcut() { + check("aspect A{ /** */ pointcut x(); }","(compilationUnit(aspect(simpleName)(pointcut(simpleName))))"); + } // original tests public void testAnInterface() { |