diff options
author | aclement <aclement> | 2005-11-10 11:06:07 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-10 11:06:07 +0000 |
commit | e433d6704633b9c3293f1b4c8507592ad987f2b8 (patch) | |
tree | 63c3505bdc2ed83f8da1e556314d28f4e05502b0 | |
parent | 0f7cb310b399fe3ab9b9ed4fb228752beba00975 (diff) | |
download | aspectj-e433d6704633b9c3293f1b4c8507592ad987f2b8.tar.gz aspectj-e433d6704633b9c3293f1b4c8507592ad987f2b8.zip |
fixes from AST bug: 110465.
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java | 5 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java | 24 |
2 files changed, 19 insertions, 10 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java index 192dbdbe8..e9f442370 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java @@ -64,11 +64,12 @@ public class InterTypeMethodDeclaration extends MethodDeclaration { return result; } + + /* (omit javadoc for this method) * Method declared on ASTNode. */ - void accept0(ASTVisitor visitor) { - AjASTVisitor ajvis = (AjASTVisitor)visitor; + void accept0(ASTVisitor ajvis) { boolean visitChildren = ajvis.visit(this); if (visitChildren) { // visit children in normal left to right reading order 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 ea0fc5872..339b30db3 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 @@ -25,6 +25,7 @@ import org.aspectj.org.eclipse.jdt.core.dom.AroundAdviceDeclaration; import org.aspectj.org.eclipse.jdt.core.dom.Assignment; import org.aspectj.org.eclipse.jdt.core.dom.BeforeAdviceDeclaration; import org.aspectj.org.eclipse.jdt.core.dom.Block; +import org.aspectj.org.eclipse.jdt.core.dom.BlockComment; import org.aspectj.org.eclipse.jdt.core.dom.BodyDeclaration; import org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit; import org.aspectj.org.eclipse.jdt.core.dom.DeclareDeclaration; @@ -55,15 +56,15 @@ import org.aspectj.weaver.patterns.DeclareSoft; public class ASTVisitorTest extends TestCase { // from bug 110465 - will currently break because of casts -// public void testAspectWithITD() { -// check("aspect A{ public void B.x(){} }", -// "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))"); -// } -// -// public void testAspectWithCommentThenITD() { -// check("aspect A{ /** */ public void B.x(){} }","yyy"); -// } + public void testAspectWithITD() { + check("aspect A{ public void B.x(){} }", + "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))"); + } + public void testAspectWithCommentThenITD() { + check("aspect A{ /** */ public void B.x(){} }", + "(compilationUnit(aspect(simpleName)(methodITD(primitiveType)(simpleName)(block))))"); + } // original tests public void testAnInterface() { @@ -514,6 +515,13 @@ class TestVisitor extends AjASTVisitor { b.append("(variableDeclaration"); //$NON-NLS-1$ return isVisitingChildren(); } + public boolean visit(BlockComment bc) { + b.append("(blockcomment"); + return isVisitingChildren(); + } + public void endVisit(BlockComment bc) { + b.append(")"); + } public void endVisit(VariableDeclaration node) { b.append(")"); //$NON-NLS-1$ } |