### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v retrieving revision 1.66 diff -u -r1.66 Javadoc.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 20 Aug 2009 13:21:00 -0000 1.66 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 29 Sep 2010 16:00:59 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -325,7 +325,7 @@ // @param tags CompilerOptions compilerOptions = methScope.compilerOptions(); resolveParamTags(methScope, reportMissing, compilerOptions.reportUnusedParameterIncludeDocCommentReference /* considerParamRefAsUsage*/); - resolveTypeParameterTags(methScope, reportMissing); + resolveTypeParameterTags(methScope, reportMissing && compilerOptions.reportMissingJavadocTagsMethodTypeParameters); // @return tags if (this.returnStatement == null) { Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v retrieving revision 1.232 diff -u -r1.232 CompilerOptions.java --- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 24 Sep 2010 06:30:56 -0000 1.232 +++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 29 Sep 2010 16:00:59 -0000 @@ -76,6 +76,7 @@ public static final String OPTION_ReportMissingJavadocTags = "org.eclipse.jdt.core.compiler.problem.missingJavadocTags"; //$NON-NLS-1$ public static final String OPTION_ReportMissingJavadocTagsVisibility = "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility"; //$NON-NLS-1$ public static final String OPTION_ReportMissingJavadocTagsOverriding = "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding"; //$NON-NLS-1$ + public static final String OPTION_ReportMissingJavadocTagsMethodTypeParameters = "org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters"; //$NON-NLS-1$ public static final String OPTION_ReportMissingJavadocComments = "org.eclipse.jdt.core.compiler.problem.missingJavadocComments"; //$NON-NLS-1$ public static final String OPTION_ReportMissingJavadocTagDescription = "org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription"; //$NON-NLS-1$ public static final String OPTION_ReportMissingJavadocCommentsVisibility = "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility"; //$NON-NLS-1$ @@ -326,6 +327,8 @@ public int reportMissingJavadocTagsVisibility; /** Specify if need to flag missing javadoc tags for overriding method */ public boolean reportMissingJavadocTagsOverriding; + /** Specify if need to flag missing javadoc tags for method type parameters (java 1.5 and above)*/ + public boolean reportMissingJavadocTagsMethodTypeParameters; /** Only report missing javadoc comment above a given level of visibility of associated construct */ public int reportMissingJavadocCommentsVisibility; /** Specify if need to flag missing javadoc comment for overriding method */ @@ -857,6 +860,7 @@ optionsMap.put(OPTION_ReportMissingJavadocTags, getSeverityString(MissingJavadocTags)); optionsMap.put(OPTION_ReportMissingJavadocTagsVisibility, getVisibilityString(this.reportMissingJavadocTagsVisibility)); optionsMap.put(OPTION_ReportMissingJavadocTagsOverriding, this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED); + optionsMap.put(OPTION_ReportMissingJavadocTagsMethodTypeParameters, this.reportMissingJavadocTagsMethodTypeParameters ? ENABLED : DISABLED); optionsMap.put(OPTION_ReportMissingJavadocComments, getSeverityString(MissingJavadocComments)); optionsMap.put(OPTION_ReportMissingJavadocTagDescription, this.reportMissingJavadocTagDescription); optionsMap.put(OPTION_ReportMissingJavadocCommentsVisibility, getVisibilityString(this.reportMissingJavadocCommentsVisibility)); @@ -1018,6 +1022,7 @@ // check missing javadoc tags this.reportMissingJavadocTagsVisibility = ClassFileConstants.AccPublic; this.reportMissingJavadocTagsOverriding = false; + this.reportMissingJavadocTagsMethodTypeParameters = false; // check missing javadoc comments this.reportMissingJavadocCommentsVisibility = ClassFileConstants.AccPublic; @@ -1399,6 +1404,13 @@ this.reportMissingJavadocTagsOverriding = false; } } + if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTagsMethodTypeParameters)) != null) { + if (ENABLED.equals(optionValue)) { + this.reportMissingJavadocTagsMethodTypeParameters = true; + } else if (DISABLED.equals(optionValue)) { + this.reportMissingJavadocTagsMethodTypeParameters = false; + } + } if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocComments)) != null) { updateSeverity(MissingJavadocComments, optionValue); } @@ -1476,6 +1488,7 @@ buf.append("\n\t\t+ visibility level to report invalid javadoc tags: ").append(getVisibilityString(this.reportInvalidJavadocTagsVisibility)); //$NON-NLS-1$ buf.append("\n\t\t+ missing javadoc tags: ").append(getSeverityString(MissingJavadocTags)); //$NON-NLS-1$ buf.append("\n\t\t+ visibility level to report missing javadoc tags: ").append(getVisibilityString(this.reportMissingJavadocTagsVisibility)); //$NON-NLS-1$ + buf.append("\n\t\t+ report missing javadoc tags for method type parameters: ").append(this.reportMissingJavadocTagsMethodTypeParameters ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t\t+ report missing javadoc tags in overriding methods: ").append(this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t\t+ missing javadoc comments: ").append(getSeverityString(MissingJavadocComments)); //$NON-NLS-1$ buf.append("\n\t\t+ report missing tag description option: ").append(this.reportMissingJavadocTagDescription); //$NON-NLS-1$ Index: model/org/eclipse/jdt/core/JavaCore.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v retrieving revision 1.653 diff -u -r1.653 JavaCore.java --- model/org/eclipse/jdt/core/JavaCore.java 24 Sep 2010 06:30:56 -0000 1.653 +++ model/org/eclipse/jdt/core/JavaCore.java 29 Sep 2010 16:00:59 -0000 @@ -1206,6 +1206,21 @@ */ public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING = PLUGIN_ID + ".compiler.problem.missingJavadocTagsOverriding"; //$NON-NLS-1$ /** + * Compiler option ID: Reporting Missing Javadoc Tags for Method Type Parameters. + *

Specify whether a missing @param for a type parameter in a method declaration should be reported. + * When enabled, the compiler will issue a missing javadoc tag error or warning for the type parameter without a + * corresponding @param tag.

+ *

This option only has an effect if the compiler compliance is 1.5 or greater.

+ *
+ *
Option id:
"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters"
+ *
Possible values:
{ "enabled", "disabled" }
+ *
Default:
"disabled"
+ *
+ * @since 3.7 + * @category CompilerOptionID + */ + public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_METHOD_TYPE_PARAMETERS = PLUGIN_ID + ".compiler.problem.missingJavadocTagsMethodTypeParameters"; //$NON-NLS-1$ + /** * Compiler option ID: Reporting Missing Javadoc Comments. *

This is the generic control for the severity of missing Javadoc comment problems. * When enabled, the compiler will issue an error or a warning when Javadoc comments are missing. #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v retrieving revision 1.211 diff -u -r1.211 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 24 Sep 2010 06:30:50 -0000 1.211 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 29 Sep 2010 16:01:03 -0000 @@ -1836,6 +1836,7 @@ "