IDEA-251250 fix texts for JavaDocLocalInspection

GitOrigin-RevId: 8897fd1a878deea3a724b8632fadd2e3b9095f06
This commit is contained in:
Andrey.Cherkasov
2020-10-23 11:32:35 +03:00
committed by intellij-monorepo-bot
parent 86814e0da3
commit 3af0d4d509
17 changed files with 19 additions and 18 deletions

View File

@@ -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

View File

@@ -447,13 +447,13 @@ public final class JavadocHighlightUtil {
if ("return".equals(tag.getName())) {
if (emptyTag(tag)) {
String tagText = "<code>@return</code>";
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 = "<code>" + tag.getName() + "</code>";
String tagText = "<code>@" + tag.getName() + "</code>";
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 = "<code>@param " + valueElement.getText() + "</code>";
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);
}
}

View File

@@ -1,6 +1,6 @@
class Test {
/**
* <warning descr="'throws' tag description is missing"><warning descr="Class reference expected">@throws</warning></warning>
* <warning descr="'@throws' tag description is missing"><warning descr="Class reference expected">@throws</warning></warning>
*/
public void foo() {}
}

View File

@@ -8,7 +8,7 @@ interface Base {
class Test implements Base {
/**
* @throws java.lang.RuntimeException {@inheritDoc}
* <warning descr="'throws' tag description is missing">@throws</warning> java.lang.Error
* <warning descr="'@throws' tag description is missing">@throws</warning> java.lang.Error
*/
public void test() {

View File

@@ -1,4 +1,4 @@
// "Remove 'exception'" "true"
// "Remove '@exception' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'exception'" "true"
// "Remove '@exception' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove '@param someInt'" "true"
// "Remove '@param someInt' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove '@return'" "true"
// "Remove '@return' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'throws'" "true"
// "Remove '@throws' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'throws'" "true"
// "Remove '@throws' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'exception'" "true"
// "Remove '@exception' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'exception'" "true"
// "Remove '@exception' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove '@param someInt'" "true"
// "Remove '@param someInt' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove '@return'" "true"
// "Remove '@return' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'throws'" "true"
// "Remove '@throws' tag" "true"
class Foo {
/**

View File

@@ -1,4 +1,4 @@
// "Remove 'throws'" "true"
// "Remove '@throws' tag" "true"
class Foo {
/**

View File

@@ -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}()