From 8f624db93cd6118c1f0989b42d0fc41fbc12896d Mon Sep 17 00:00:00 2001 From: Louis Vignier Date: Fri, 21 Mar 2025 10:58:12 +0300 Subject: [PATCH] [javadoc] Add documentation to JavaDocInfoGenerator#findInheritDocTag IJ-CR-158044 GitOrigin-RevId: df338cfceb1d33c5f623f35def3459717c62c9b4 --- .../codeInsight/javadoc/JavaDocInfoGenerator.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index 5d49672ea423..50d9b8741fe6 100644 --- a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -3069,7 +3069,14 @@ public class JavaDocInfoGenerator { return pair != null ? pair.first : null; } - public static @Nullable Pair> findInheritDocTag(PsiMethod method, DocTagLocator loc, PsiDocTagValue target) { + /** + * Searches supertypes for the inherited documentation element. + * @param method method for which parameter the JavaDoc tag is searched for + * @param loc locator to find the inherited documentation part in a given supertype + * @param target optional argument of the {@code @inheritDoc} tag + * @return the most specific applicable JavaDoc tag if found, {@code null} otherwise + */ + public static @Nullable Pair> findInheritDocTag(@NotNull PsiMethod method, @NotNull DocTagLocator loc, @Nullable PsiDocTagValue target) { PsiClass aClass = method.getContainingClass(); if (aClass == null) return null; final var pair = JavaSuperTypeSearchUtil.INSTANCE.automaticSupertypeSearch(aClass, method, target, loc);