Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 77449 Details for
Bug 73352
[Javadoc] Missing description should be warned for all tags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch + test case
patch_b73352_jdt.core_jdt.ui_on_top_HEAD(v809)_v04.txt (text/plain), 26.85 KB, created by
Eric Jodet
on 2007-08-31 04:53:40 EDT
(
hide
)
Description:
patch + test case
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2007-08-31 04:53:40 EDT
Size:
26.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java,v >retrieving revision 1.9 >diff -u -r1.9 JavadocProblemsConfigurationBlock.java >--- ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java 27 Sep 2005 16:41:04 -0000 1.9 >+++ ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java 30 Aug 2007 13:58:12 -0000 >@@ -46,6 +46,7 @@ > private static final Key PREF_PB_MISSING_JAVADOC_TAGS_OVERRIDING= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING); > > private static final Key PREF_PB_MISSING_JAVADOC_COMMENTS= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS); >+ private static final Key PREF_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION= getJDTCoreKey(JavaCore.COMPILER_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION); > private static final Key PREF_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY); > private static final Key PREF_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING); > >@@ -81,7 +82,7 @@ > PREF_PB_INVALID_JAVADOC_TAGS_VISIBILITY, > PREF_PB_INVALID_JAVADOC_TAGS_NOT_VISIBLE_REF, PREF_PB_INVALID_JAVADOC_TAGS_DEPRECATED_REF, > PREF_PB_MISSING_JAVADOC_TAGS, PREF_PB_MISSING_JAVADOC_TAGS_VISIBILITY, PREF_PB_MISSING_JAVADOC_TAGS_OVERRIDING, >- PREF_PB_MISSING_JAVADOC_COMMENTS, PREF_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY, PREF_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING, >+ PREF_PB_MISSING_JAVADOC_COMMENTS, PREF_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION, PREF_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY, PREF_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING, > }; > return keys; > } >@@ -165,6 +166,9 @@ > label= PreferencesMessages.JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_label; > addCheckBox(composite, label, PREF_PB_INVALID_JAVADOC_TAGS, enabledDisabled, indent); > >+ label= PreferencesMessages.JavadocProblemsConfigurationBlock_pb_invalid_javadoc_consider_description_label; >+ addCheckBox(composite, label, PREF_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION, enabledDisabled, indent); >+ > label= PreferencesMessages.JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_not_visible_ref_label; > addCheckBox(composite, label, PREF_PB_INVALID_JAVADOC_TAGS_NOT_VISIBLE_REF, enabledDisabled, indent); > >@@ -188,7 +192,7 @@ > > label = PreferencesMessages.JavadocProblemsConfigurationBlock_pb_missing_comments_label; > addComboBox(composite, label, PREF_PB_MISSING_JAVADOC_COMMENTS, errorWarningIgnore, errorWarningIgnoreLabels, 0); >- >+ > label = PreferencesMessages.JavadocProblemsConfigurationBlock_pb_missing_comments_visibility_label; > addComboBox(composite, label, PREF_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY, visibilities, visibilitiesLabels, indent); > >@@ -231,6 +235,7 @@ > getCheckBox(PREF_PB_INVALID_JAVADOC_TAGS).setEnabled(enableInvalidTagsErrors); > getCheckBox(PREF_PB_INVALID_JAVADOC_TAGS_NOT_VISIBLE_REF).setEnabled(enableInvalidTagsErrors); > getCheckBox(PREF_PB_INVALID_JAVADOC_TAGS_DEPRECATED_REF).setEnabled(enableInvalidTagsErrors); >+ getCheckBox(PREF_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION).setEnabled(enableInvalidTagsErrors); > setComboEnabled(PREF_PB_INVALID_JAVADOC_TAGS_VISIBILITY, enableInvalidTagsErrors); > > boolean enableMissingTagsErrors= !checkValue(PREF_PB_MISSING_JAVADOC_TAGS, IGNORE); >Index: ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java,v >retrieving revision 1.87 >diff -u -r1.87 PreferencesMessages.java >--- ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java 26 Jul 2007 12:12:49 -0000 1.87 >+++ ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java 30 Aug 2007 13:58:12 -0000 >@@ -452,6 +452,7 @@ > public static String JavadocProblemsConfigurationBlock_javadoc_description; > public static String JavadocProblemsConfigurationBlock_pb_javadoc_support_label; > public static String JavadocProblemsConfigurationBlock_pb_invalid_javadoc_label; >+ public static String JavadocProblemsConfigurationBlock_pb_invalid_javadoc_consider_description_label; > public static String JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_label; > public static String JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_visibility_label; > public static String JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_not_visible_ref_label; >Index: ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties,v >retrieving revision 1.434 >diff -u -r1.434 PreferencesMessages.properties >--- ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties 26 Jul 2007 14:19:43 -0000 1.434 >+++ ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties 30 Aug 2007 13:58:13 -0000 >@@ -500,6 +500,7 @@ > JavadocProblemsConfigurationBlock_pb_javadoc_support_label=Proc&ess Javadoc comments (includes search and refactoring) > JavadocProblemsConfigurationBlock_pb_invalid_javadoc_label=Mal&formed Javadoc comments: > JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_label=Report e&rrors in tags >+JavadocProblemsConfigurationBlock_pb_invalid_javadoc_consider_description_label=Consider tag description > JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_visibility_label=On&ly consider members as visible as: > JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_not_visible_ref_label=Report non &visible references > JavadocProblemsConfigurationBlock_pb_invalid_javadoc_tags_deprecated_label=Report de&precated references >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v >retrieving revision 1.190 >diff -u -r1.190 IProblem.java >--- compiler/org/eclipse/jdt/core/compiler/IProblem.java 11 Jul 2007 13:47:21 -0000 1.190 >+++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 30 Aug 2007 13:58:16 -0000 >@@ -815,6 +815,11 @@ > * Javadoc comments > */ > /** >+ * Problem warned on missing tag description. >+ * @since 3.4 >+ */ >+ int JavadocMissingDescription = Javadoc + Internal + 463; >+ /** > * Problem warned on duplicated tag. > * @since 3.3 > */ >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.184 >diff -u -r1.184 CompilerOptions.java >--- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 7 May 2007 17:01:22 -0000 1.184 >+++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 30 Aug 2007 13:58:17 -0000 >@@ -74,6 +74,7 @@ > 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_ReportMissingJavadocComments = "org.eclipse.jdt.core.compiler.problem.missingJavadocComments"; //$NON-NLS-1$ >+ public static final String OPTION_ReportInvalidJavadocTagsConsiderDescription = "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsConsiderDescription"; //$NON-NLS-1$ > public static final String OPTION_ReportMissingJavadocCommentsVisibility = "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility"; //$NON-NLS-1$ > public static final String OPTION_ReportMissingJavadocCommentsOverriding = "org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding"; //$NON-NLS-1$ > public static final String OPTION_ReportFinallyBlockNotCompletingNormally = "org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally"; //$NON-NLS-1$ >@@ -199,6 +200,7 @@ > public static final long OverridingMethodWithoutSuperInvocation = ASTNode.Bit50L; > public static final long PotentialNullReference = ASTNode.Bit51L; > public static final long RedundantNullCheck = ASTNode.Bit52L; >+ public static final long InvalidJavadocConsiderDescription = ASTNode.Bit53L; > > // Map: String optionKey --> Long irritant> > private static Map OptionToIrritants; >@@ -284,6 +286,7 @@ > public boolean reportInvalidJavadocTags = false; > public boolean reportInvalidJavadocTagsDeprecatedRef = false; > public boolean reportInvalidJavadocTagsNotVisibleRef = false; >+ public boolean reportInvalidJavadocTagsConsiderDescription = false; > > // check missing javadoc tags > public int reportMissingJavadocTagsVisibility = ClassFileConstants.AccPublic; >@@ -391,6 +394,7 @@ > optionsMap.put(OPTION_ReportMissingJavadocTagsVisibility, getVisibilityString(this.reportMissingJavadocTagsVisibility)); > optionsMap.put(OPTION_ReportMissingJavadocTagsOverriding, this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED); > optionsMap.put(OPTION_ReportMissingJavadocComments, getSeverityString(MissingJavadocComments)); >+ optionsMap.put(OPTION_ReportInvalidJavadocTagsConsiderDescription, this.reportInvalidJavadocTagsConsiderDescription ? ENABLED : DISABLED); > optionsMap.put(OPTION_ReportMissingJavadocCommentsVisibility, getVisibilityString(this.reportMissingJavadocCommentsVisibility)); > optionsMap.put(OPTION_ReportMissingJavadocCommentsOverriding, this.reportMissingJavadocCommentsOverriding ? ENABLED : DISABLED); > optionsMap.put(OPTION_ReportFinallyBlockNotCompletingNormally, getSeverityString(FinallyBlockNotCompleting)); >@@ -454,6 +458,8 @@ > case (int) UsingDeprecatedAPI : > case (int) (InvalidJavadoc | UsingDeprecatedAPI) : > return OPTION_ReportDeprecation; >+ case (int) InvalidJavadocConsiderDescription : >+ return OPTION_ReportInvalidJavadocTagsConsiderDescription; > case (int) MaskedCatchBlock : > return OPTION_ReportHiddenCatchBlock; > case (int) UnusedLocalVariable : >@@ -890,7 +896,14 @@ > } > if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocComments)) != null) { > updateSeverity(MissingJavadocComments, optionValue); >- } >+ } >+ if ((optionValue = optionsMap.get(OPTION_ReportInvalidJavadocTagsConsiderDescription)) != null) { >+ if (ENABLED.equals(optionValue)) { >+ this.reportInvalidJavadocTagsConsiderDescription = true; >+ } else if (DISABLED.equals(optionValue)) { >+ this.reportInvalidJavadocTagsConsiderDescription = false; >+ } >+ } > if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocCommentsVisibility)) != null) { > if (PUBLIC.equals(optionValue)) { > this.reportMissingJavadocCommentsVisibility = ClassFileConstants.AccPublic; >@@ -966,6 +979,7 @@ > 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 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+ consider description ").append(this.reportInvalidJavadocTagsConsiderDescription ? ENABLED : DISABLED); //$NON-NLS-1$ > buf.append("\n\t\t+ visibility level to report missing javadoc comments: ").append(getVisibilityString(this.reportMissingJavadocCommentsVisibility)); //$NON-NLS-1$ > buf.append("\n\t\t+ report missing javadoc comments in overriding methods: ").append(this.reportMissingJavadocCommentsOverriding ? ENABLED : DISABLED); //$NON-NLS-1$ > buf.append("\n\t- finally block not completing normally: ").append(getSeverityString(FinallyBlockNotCompleting)); //$NON-NLS-1$ >@@ -1118,6 +1132,7 @@ > OPTION_ReportMethodWithConstructorName, > OPTION_ReportMissingDeprecatedAnnotation, > OPTION_ReportMissingJavadocComments, >+ OPTION_ReportInvalidJavadocTagsConsiderDescription, > OPTION_ReportMissingJavadocTags, > OPTION_ReportMissingOverrideAnnotation, > OPTION_ReportMissingSerialVersion, >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.580 >diff -u -r1.580 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 28 Aug 2007 10:03:38 -0000 1.580 >+++ model/org/eclipse/jdt/core/JavaCore.java 30 Aug 2007 13:58:22 -0000 >@@ -535,6 +535,12 @@ > /** > * Possible configurable option ID. > * @see #getDefaultOptions() >+ * @since 3.4 >+ */ >+ public static final String COMPILER_PB_INVALID_JAVADOC_TAGS_CONSIDER_DESCRIPTION = PLUGIN_ID + ".compiler.problem.invalidJavadocTagsConsiderDescription"; //$NON-NLS-1$ >+ /** >+ * Possible configurable option ID. >+ * @see #getDefaultOptions() > * @since 3.1 > */ > public static final String COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF = PLUGIN_ID + ".compiler.problem.invalidJavadocTagsDeprecatedRef"; //$NON-NLS-1$ >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.351 >diff -u -r1.351 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 19 Jul 2007 14:07:25 -0000 1.351 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 30 Aug 2007 13:58:20 -0000 >@@ -275,6 +275,7 @@ > case IProblem.JavadocUsingDeprecatedMethod: > case IProblem.JavadocUsingDeprecatedType: > case IProblem.JavadocHiddenReference: >+ case IProblem.JavadocMissingDescription: > return CompilerOptions.InvalidJavadoc; > > case IProblem.JavadocMissingParamTag: >@@ -1060,6 +1061,11 @@ > return ProblemSeverities.Ignore; > } > break; >+ case IProblem.JavadocMissingDescription: >+ if (! this.options.reportInvalidJavadocTagsConsiderDescription) { >+ return ProblemSeverities.Ignore; >+ } >+ break; > /* > * Javadoc invalid tags due to deprecated references > */ >@@ -3729,6 +3735,17 @@ > sourceStart, > sourceEnd); > } >+public void javadocMissingDescription(int sourceStart, int sourceEnd){ >+ int severity = computeSeverity(IProblem.JavadocMissingDescription); >+ if (severity == ProblemSeverities.Ignore) return; >+ this.handle( >+ IProblem.JavadocMissingDescription, >+ NoArgument, >+ NoArgument, >+ severity, >+ sourceStart, >+ sourceEnd); >+} > public void javadocDuplicatedThrowsClassName(TypeReference typeReference, int modifiers) { > int severity = computeSeverity(IProblem.JavadocDuplicateThrowsClassName); > if (severity == ProblemSeverities.Ignore) return; >Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.221 >diff -u -r1.221 messages.properties >--- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 11 Jul 2007 13:40:49 -0000 1.221 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 30 Aug 2007 13:58:20 -0000 >@@ -373,6 +373,7 @@ > 460 = Empty block should be documented > > ### DOC >+463 = Description expected after this token > 464 = Unexpected duplicated tag @{0} > 465 = ''{0}'' visibility for malformed doc comments hides this ''{1}'' reference > 466 = Invalid member type qualification >Index: compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java,v >retrieving revision 1.68 >diff -u -r1.68 AbstractCommentParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 16 Jul 2007 20:02:16 -0000 1.68 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 30 Aug 2007 13:58:18 -0000 >@@ -855,7 +855,12 @@ > if (token == TerminalTokens.TokenNameWHITESPACE) { > this.scanner.currentPosition = restart; > this.index = restart; >- return pushParamName(isTypeParam); >+ if (! pushParamName(isTypeParam)) return false; >+ if (this.reportProblems && verifyEndLine(this.scanner.currentPosition)) { >+ this.sourceParser.problemReporter().javadocMissingDescription(start, end); >+ return false; >+ } >+ return true; > } > } > // Report problem >@@ -1131,7 +1136,12 @@ > if (this.reportProblems) > this.sourceParser.problemReporter().javadocMissingThrowsClassName(this.tagSourceStart, this.tagSourceEnd, this.sourceParser.modifiers); > } else { >- return pushThrowName(typeRef); >+ if (! pushThrowName(typeRef)) return false; >+ if (this.reportProblems && verifyEndLine(this.scanner.currentPosition)) { >+ this.sourceParser.problemReporter().javadocMissingDescription(start, getTokenEndPosition()); >+ return false; >+ } >+ return true; > } > } catch (InvalidInputException ex) { > if (this.reportProblems) this.sourceParser.problemReporter().javadocInvalidThrowsClass(start, getTokenEndPosition()); >Index: formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java,v >retrieving revision 1.62 >diff -u -r1.62 DefaultCodeFormatter.java >--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 6 Mar 2007 02:38:50 -0000 1.62 >+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 30 Aug 2007 13:58:20 -0000 >@@ -298,6 +298,7 @@ > optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.IGNORE); > optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, CompilerOptions.PUBLIC); > optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTags, CompilerOptions.DISABLED); >+ optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsConsiderDescription, CompilerOptions.DISABLED); > optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.DISABLED); > optionsMap.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.DISABLED); > optionsMap.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.IGNORE); >#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.116 >diff -u -r1.116 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 9 Jul 2007 15:28:31 -0000 1.116 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 30 Aug 2007 13:58:24 -0000 >@@ -1240,7 +1240,8 @@ > " <option key=\"org.eclipse.jdt.core.compiler.problem.indirectStaticAccess\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadoc\" value=\"ignore\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTags\" value=\"disabled\"/>\n" + >- " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef\" value=\"disabled\"/>\n" + >+ " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsConsiderDescription\" value=\"disabled\"/>\n" + >+ " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef\" value=\"disabled\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef\" value=\"disabled\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility\" value=\"public\"/>\n" + > " <option key=\"org.eclipse.jdt.core.compiler.problem.localVariableHiding\" value=\"ignore\"/>\n" + >@@ -1297,7 +1298,7 @@ > " <sources>\n" + > " <source output=\"---OUTPUT_DIR_PLACEHOLDER---\" path=\"---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\">\n" + > " <problems errors=\"1\" problems=\"1\" warnings=\"0\">\n" + >- " <problem categoryID=\"40\" charEnd=\"28\" charStart=\"25\" id=\"UndefinedType\" line=\"3\" problemID=\"16777218\" severity=\"ERROR\">\n" + >+ " <problem categoryID=\"40\" charEnd=\"28\" charStart=\"25\" id=\"UndefinedType\" line=\"3\" optionKey=\"org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsConsiderDescription\" problemID=\"16777218\" severity=\"ERROR\">\n" + > " <message value=\"Zork cannot be resolved to a type\"/>\n" + > " <source_context sourceEnd=\"3\" sourceStart=\"0\" value=\"Zork z;\"/>\n" + > " <arguments>\n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java,v >retrieving revision 1.36 >diff -u -r1.36 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 16 Mar 2007 18:31:22 -0000 1.36 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 30 Aug 2007 13:58:26 -0000 >@@ -20,6 +20,7 @@ > > String docCommentSupport = CompilerOptions.ENABLED; > String reportInvalidJavadoc = CompilerOptions.ERROR; >+ String reportInvalidJavadocConsiderDescription = null; > String reportInvalidJavadocVisibility = CompilerOptions.PRIVATE; > String reportMissingJavadocTags = CompilerOptions.ERROR; > String reportMissingJavadocComments = null; >@@ -68,6 +69,11 @@ > } else { > options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc); > } >+ if (reportInvalidJavadocConsiderDescription != null) { >+ options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsConsiderDescription, CompilerOptions.ENABLED); >+ } else { >+ options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsConsiderDescription, CompilerOptions.DISABLED); >+ } > options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE); > options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE); > options.put(CompilerOptions.OPTION_ReportDeprecation, reportDeprecation); >@@ -5773,4 +5779,125 @@ > "Javadoc: Missing tag for parameter anotherInt\n" + > "----------\n"); > } >+ >+ /** >+ * @bug 73352: [Javadoc] Missing description should be warned for all tags >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=73352" >+ */ >+ public void testBug73352a() { >+ String[] units = new String[] { >+ "X.java", >+ "/**\n" + >+ "* @since\n" + >+ "* @author\n" + >+ "* @version\n" + >+ "*/\n" + >+ "public class X {\n" + >+ " /**\n" + >+ " * @param aParam\n" + >+ " * @return\n" + >+ " * @see\n" + >+ " * @since\n" + >+ " * @throws NullPointerException\n" + >+ " * @exception NullPointerException\n" + >+ " */\n" + >+ " public String foo(String aParam) {\n" + >+ " return new String();\n" + >+ " }\n" + >+ "}\n" >+ }; >+ reportInvalidJavadoc = CompilerOptions.WARNING; >+ reportInvalidJavadocConsiderDescription = CompilerOptions.ENABLED; >+ runNegativeTest(units, >+ "----------\n" + >+ "1. WARNING in X.java (at line 8)\n" + >+ " * @param aParam\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Description expected after this token\n" + >+ "----------\n" + >+ "2. WARNING in X.java (at line 9)\n" + >+ " * @return\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Missing return type description\n" + >+ "----------\n" + >+ "3. WARNING in X.java (at line 10)\n" + >+ " * @see\n" + >+ " ^^^\n" + >+ "Javadoc: Missing reference\n" + >+ "----------\n" + >+ "4. WARNING in X.java (at line 12)\n" + >+ " * @throws NullPointerException\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Description expected after this token\n" + >+ "----------\n" + >+ "5. WARNING in X.java (at line 13)\n" + >+ " * @exception NullPointerException\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Description expected after this token\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug73352b() { >+ String[] units = new String[] { >+ "X.java", >+ "/**\n" + >+ "* @since version 3\n" + >+ "* @author John Doe\n" + >+ "* @version 2\n" + >+ "*/\n" + >+ "public class X {\n" + >+ " /**\n" + >+ " * @param aParam param description\n" + >+ " * @return String\n" + >+ " * @see String a reference\n" + >+ " * @since version 2\n" + >+ " * @throws NullPointerException null pointer description\n" + >+ " * @exception NullPointerException null pointer description\n" + >+ " */\n" + >+ " public String foo(String aParam) {\n" + >+ " return new String();\n" + >+ " }\n" + >+ "}\n" >+ }; >+ reportInvalidJavadoc = CompilerOptions.WARNING; >+ reportInvalidJavadocConsiderDescription = CompilerOptions.ENABLED; >+ runConformTest(units); >+ } >+ public void testBug73352c() { >+ String[] units = new String[] { >+ "X.java", >+ "/**\n" + >+ "* @since\n" + >+ "* @author\n" + >+ "* @version\n" + >+ "*/\n" + >+ "public class X {\n" + >+ " /**\n" + >+ " * @param aParam\n" + >+ " * @return\n" + >+ " * @see\n" + >+ " * @since\n" + >+ " * @throws NullPointerException\n" + >+ " * @exception NullPointerException\n" + >+ " */\n" + >+ " public String foo(String aParam) {\n" + >+ " return new String();\n" + >+ " }\n" + >+ "}\n" >+ }; >+ reportInvalidJavadoc = CompilerOptions.WARNING; >+ runNegativeTest(units, >+ "----------\n" + >+ "1. WARNING in X.java (at line 9)\n" + >+ " * @return\n" + >+ " ^^^^^^\n" + >+ "Javadoc: Missing return type description\n" + >+ "----------\n" + >+ "2. WARNING in X.java (at line 10)\n" + >+ " * @see\n" + >+ " ^^^\n" + >+ "Javadoc: Missing reference\n" + >+ "----------\n" >+ ); >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 73352
:
77449
|
77974
|
78145
|
78851
|
79053
|
79266
|
79362