mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] generate javadoc for records with @params for components (IDEA-281563)
GitOrigin-RevId: e5dc8ec3ef6dba979c32897625c48abd46efadb3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3d6b6ae2df
commit
c042ad5b78
@@ -536,6 +536,13 @@ public class JavaDocumentationProvider implements CodeDocumentationProvider, Ext
|
||||
}
|
||||
}
|
||||
else if (commentOwner instanceof PsiClass) {
|
||||
if (((PsiClass)commentOwner).isRecord()) {
|
||||
for (PsiRecordComponent component : ((PsiClass)commentOwner).getRecordComponents()) {
|
||||
builder.append(CodeDocumentationUtil.createDocCommentLine(PARAM_TAG, commentOwner.getContainingFile(), commenter));
|
||||
builder.append(component.getName());
|
||||
builder.append(LINE_SEPARATOR);
|
||||
}
|
||||
}
|
||||
final PsiTypeParameterList typeParameterList = ((PsiClass)commentOwner).getTypeParameterList();
|
||||
if (typeParameterList != null) {
|
||||
createTypeParamsListComment(builder, commenter, typeParameterList);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
|
||||
/**
|
||||
* @param u
|
||||
*/
|
||||
record Test(int u) {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
|
||||
record Te<caret>st(int u) {
|
||||
}
|
||||
Reference in New Issue
Block a user