mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
add javadoc intention: fix for multiple field declaration IDEA-177456
This commit is contained in:
@@ -409,7 +409,12 @@ public class JavaDocumentationProvider extends DocumentationProviderEx implement
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return docCommentOwner == null ? null : Pair.create(docCommentOwner, ((PsiDocCommentOwner)docCommentOwner).getDocComment());
|
||||
if (docCommentOwner == null) return null;
|
||||
PsiDocComment comment = ((PsiDocCommentOwner)docCommentOwner).getDocComment();
|
||||
if (docCommentOwner instanceof PsiField) {
|
||||
docCommentOwner = ((PsiField)docCommentOwner).getModifierList();
|
||||
}
|
||||
return Pair.create(docCommentOwner, comment);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
class Test {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@XXX
|
||||
int xxx = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
class Test {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private @XXX int xxx = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add Javadoc" "true"
|
||||
class Foo {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
int x = 2, y = 1;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add Javadoc" "true"
|
||||
class Foo {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
int x = 2, y = 1;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
class Test {
|
||||
|
||||
@XXX
|
||||
int x<caret>xx = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Add Javadoc" "true"
|
||||
|
||||
class Test {
|
||||
|
||||
private @XXX int x<caret>xx = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add Javadoc" "true"
|
||||
class Foo {
|
||||
int x = 2, <caret>y = 1;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add Javadoc" "true"
|
||||
class Foo {
|
||||
int <caret>x = 2, y = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user