mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
records: support javadoc parameters pointing record components (IDEA-238925)
GitOrigin-RevId: fb76f16282ee0b18eb7b0512fcc9b2e812adb19b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fc75a00a48
commit
580a5c69f5
@@ -85,6 +85,9 @@ public class PsiDocParamRef extends CompositePsiElement implements PsiDocTagValu
|
||||
Collections.addAll(allParams, tpl.getTypeParameters());
|
||||
}
|
||||
}
|
||||
if (owner instanceof PsiClass && ((PsiClass)owner).isRecord()) {
|
||||
Collections.addAll(allParams, ((PsiClass)owner).getRecordComponents());
|
||||
}
|
||||
return allParams;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @param <error descr="Cannot resolve symbol 'i'">i</error> here description goes
|
||||
* @param test here test description goes
|
||||
*/
|
||||
|
||||
record Test(int test) {
|
||||
}
|
||||
@@ -53,6 +53,7 @@ public class JavadocHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testParam2() { doTest(); }
|
||||
public void testParam3() { doTest(); }
|
||||
public void testParam4() { doTest(); }
|
||||
public void testRecordParamJava14Preview() { doTest(); }
|
||||
public void testTypeParam() {
|
||||
myInspection.METHOD_OPTIONS.ACCESS_JAVADOC_REQUIRED_FOR = "private";
|
||||
myInspection.METHOD_OPTIONS.REQUIRED_TAGS = "@param";
|
||||
|
||||
@@ -108,6 +108,9 @@ public abstract class JavaStatisticsManager {
|
||||
return "field#" + member.getName();
|
||||
}
|
||||
|
||||
if (member instanceof PsiRecordComponent) {
|
||||
return "record#" + member.getName();
|
||||
}
|
||||
return CLASS_PREFIX + ((PsiClass)member).getQualifiedName();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user