mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
IDEA-251250 fix texts for JavaDocLocalInspection
GitOrigin-RevId: 8897fd1a878deea3a724b8632fadd2e3b9095f06
This commit is contained in:
committed by
intellij-monorepo-bot
parent
86814e0da3
commit
3af0d4d509
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {}
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'exception'" "true"
|
||||
// "Remove '@exception' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'exception'" "true"
|
||||
// "Remove '@exception' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove '@param someInt'" "true"
|
||||
// "Remove '@param someInt' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove '@return'" "true"
|
||||
// "Remove '@return' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'throws'" "true"
|
||||
// "Remove '@throws' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'throws'" "true"
|
||||
// "Remove '@throws' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'exception'" "true"
|
||||
// "Remove '@exception' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'exception'" "true"
|
||||
// "Remove '@exception' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove '@param someInt'" "true"
|
||||
// "Remove '@param someInt' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove '@return'" "true"
|
||||
// "Remove '@return' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'throws'" "true"
|
||||
// "Remove '@throws' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'throws'" "true"
|
||||
// "Remove '@throws' tag" "true"
|
||||
|
||||
class Foo {
|
||||
/**
|
||||
|
||||
@@ -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}()
|
||||
|
||||
Reference in New Issue
Block a user