From 9d88235861f705615ac697a75a37e8a7e99a0351 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 18 Aug 2004 13:03:50 +0000 Subject: [PATCH] javadoc checks moved here from inside shadows. --- .../compiler/problem/AjProblemReporter.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java index 2a4882e94..77457f879 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java @@ -16,6 +16,7 @@ import java.lang.reflect.Modifier; import java.util.Iterator; +import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration; import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration; import org.aspectj.ajdt.internal.compiler.ast.Proceed; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; @@ -30,9 +31,11 @@ import org.eclipse.jdt.internal.compiler.CompilationResult; import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy; import org.eclipse.jdt.internal.compiler.IProblemFactory; import org.eclipse.jdt.internal.compiler.ast.ASTNode; +import org.eclipse.jdt.internal.compiler.ast.Argument; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.compiler.impl.ReferenceContext; import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; +import org.eclipse.jdt.internal.compiler.lookup.MethodScope; import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; @@ -48,6 +51,7 @@ import org.eclipse.jdt.core.compiler.CharOperation; * @author Jim Hugunin */ public class AjProblemReporter extends ProblemReporter { + private static final boolean DUMP_STACK = false; public EclipseFactory factory; @@ -187,5 +191,35 @@ public class AjProblemReporter extends ProblemReporter { referenceContext, unitResult); } + + + + // PR71076 + public void javadocMissingParamTag(Argument arg, int modifiers) { + boolean reportIt = true; + if (arg.binding!=null && (arg.binding.declaringScope instanceof MethodScope) ) { + MethodScope ms = (MethodScope) arg.binding.declaringScope; + if (ms.referenceContext!=null && (ms.referenceContext instanceof AdviceDeclaration)) { + AdviceDeclaration adviceDecl = (AdviceDeclaration)ms.referenceContext; + if (arg.name!=null) { + if (adviceDecl.selector.length>4 && + adviceDecl.selector[0] == 'a' && + adviceDecl.selector[1] == 'j' && + adviceDecl.selector[2] == 'c' && + adviceDecl.selector[3] == '$') { + + String stringArgName = new String(arg.name); + if (stringArgName.equals("thisJoinPoint")) reportIt = false; + if (stringArgName.equals("thisJoinPointStaticPart")) reportIt = false; + if (stringArgName.equals("thisEnclosingJoinPointStaticPart")) reportIt = false; + if (arg.type.toString().indexOf("AroundClosure")!=-1) reportIt = false; + } + } + } + } + if (arg.name!=null && new String(arg.name).startsWith("ajc$")) reportIt = false; + if (reportIt) + super.javadocMissingParamTag(arg, modifiers); + } } -- 2.39.5