diff --git a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java index 8b098f28dae3..45d6cc6c9230 100644 --- a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java @@ -807,7 +807,7 @@ public class JavaDocLocalInspection extends LocalInspectionTool { @NotNull @Override public String getName() { - return CommonQuickFixBundle.message("fix.remove", myTagName); + return JavaBundle.message("quickfix.text.remove.javadoc.0", myTagName); } @NotNull diff --git a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java index 95b06909fc98..d41f372b703b 100644 --- a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java +++ b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java @@ -447,13 +447,13 @@ public final class JavadocHighlightUtil { if ("return".equals(tag.getName())) { if (emptyTag(tag)) { String tagText = "@return"; - LocalQuickFix fix = holder.removeTagWithoutDescriptionFix("@return"); + LocalQuickFix fix = holder.removeTagWithoutDescriptionFix("return"); holder.problem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.method.problem.missing.tag.description", tagText), fix); } } else if ("throws".equals(tag.getName()) || "exception".equals(tag.getName())) { if (emptyThrowsTag(tag)) { - String tagText = "" + tag.getName() + ""; + String tagText = "@" + tag.getName() + ""; LocalQuickFix fix = holder.removeTagWithoutDescriptionFix(tag.getName()); holder.problem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.method.problem.missing.tag.description", tagText), fix); } @@ -462,7 +462,7 @@ public final class JavadocHighlightUtil { PsiDocTagValue valueElement = tag.getValueElement(); if (valueElement != null && emptyParamTag(tag, valueElement)) { String tagText = "@param " + valueElement.getText() + ""; - LocalQuickFix fix = holder.removeTagWithoutDescriptionFix("@param " + valueElement.getText()); + LocalQuickFix fix = holder.removeTagWithoutDescriptionFix("param " + valueElement.getText()); holder.problem(valueElement, JavaBundle.message("inspection.javadoc.method.problem.missing.tag.description", tagText), fix); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/Exception1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/Exception1.java index 0890dca8f4a5..78074ae31c6f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/Exception1.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/Exception1.java @@ -1,6 +1,6 @@ class Test { /** - * @throws + * @throws */ public void foo() {} } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/ThrowsInheritDoc.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/ThrowsInheritDoc.java index 5ccebf099c17..2799fb157d2f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/ThrowsInheritDoc.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/javaDoc/ThrowsInheritDoc.java @@ -8,7 +8,7 @@ interface Base { class Test implements Base { /** * @throws java.lang.RuntimeException {@inheritDoc} - * @throws java.lang.Error + * @throws java.lang.Error */ public void test() { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java index 8cfe033eb1c5..8ba437ef160d 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java @@ -1,4 +1,4 @@ -// "Remove 'exception'" "true" +// "Remove '@exception' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java index 8cfe033eb1c5..8ba437ef160d 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove 'exception'" "true" +// "Remove '@exception' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterParam.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterParam.java index 565b729f14d3..afaecb31d528 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterParam.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterParam.java @@ -1,4 +1,4 @@ -// "Remove '@param someInt'" "true" +// "Remove '@param someInt' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterReturn.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterReturn.java index f95a91844f05..41b0e21e1bcd 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterReturn.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterReturn.java @@ -1,4 +1,4 @@ -// "Remove '@return'" "true" +// "Remove '@return' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java index 9fd043e82b37..dff50105cf50 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java @@ -1,4 +1,4 @@ -// "Remove 'throws'" "true" +// "Remove '@throws' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java index 9fd043e82b37..dff50105cf50 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove 'throws'" "true" +// "Remove '@throws' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java index 3621f158c814..5ebebfaf53b9 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java @@ -1,4 +1,4 @@ -// "Remove 'exception'" "true" +// "Remove '@exception' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java index 1890f9de64e2..d03b6cd73e03 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove 'exception'" "true" +// "Remove '@exception' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeParam.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeParam.java index 458afaa271e9..bce588485397 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeParam.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeParam.java @@ -1,4 +1,4 @@ -// "Remove '@param someInt'" "true" +// "Remove '@param someInt' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeReturn.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeReturn.java index 06d3451f9ec0..9bac14dd18bc 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeReturn.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeReturn.java @@ -1,4 +1,4 @@ -// "Remove '@return'" "true" +// "Remove '@return' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java index 1237e9d76a88..846b7eb13c9a 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java @@ -1,4 +1,4 @@ -// "Remove 'throws'" "true" +// "Remove '@throws' tag" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java index 02de90515572..20fef941a0a5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove 'throws'" "true" +// "Remove '@throws' tag" "true" class Foo { /** diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties index 4991ebc757c5..ed6e46eb7ef6 100644 --- a/java/openapi/resources/messages/JavaBundle.properties +++ b/java/openapi/resources/messages/JavaBundle.properties @@ -1079,6 +1079,7 @@ quickfix.family.wrap.with.mutable.collection=Wrap with mutable collection quickfix.name.find.jar.on.web=Find JAR on web quickfix.text.0.may.not.work.before.jdk.11.0.2={0} (may not work before JDK 11.0.2) quickfix.text.avoid.mutation.using.stream.api.0.operation=Avoid mutation using Stream API ''{0}'' operation +quickfix.text.remove.javadoc.0=Remove ''@{0}'' tag quickfix.text.remove.javadoc.0.1=Remove @{0} {1} quickfix.text.remove.not.null.annotation=Remove not-null annotation quickfix.text.replace.0.stream.with.1.2=Replace {0}.stream() with {1}.{2}()