mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-87040 JavaDoc @link autocompletion is inconsistent with JavaDoc rendering when used on static fields
This commit is contained in:
+3
-2
@@ -253,10 +253,11 @@ public class PsiDocMethodOrFieldRef extends CompositePsiElement implements PsiDo
|
||||
@NotNull
|
||||
public PsiElement[] getVariants(){
|
||||
final List<PsiModifierListOwner> vars = new ArrayList<PsiModifierListOwner>();
|
||||
final PsiElement scope = getScope();
|
||||
if (scope != null) {
|
||||
PsiClass scope = getScope();
|
||||
while (scope != null) {
|
||||
ContainerUtil.addAll(vars, getAllMethods(scope, PsiDocMethodOrFieldRef.this));
|
||||
ContainerUtil.addAll(vars, getAllVariables(scope, PsiDocMethodOrFieldRef.this));
|
||||
scope = scope.getContainingClass();
|
||||
}
|
||||
return vars.toArray(new PsiModifierListOwner[vars.size()]);
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class TestClass {
|
||||
|
||||
public static final int MY_CONSTANT = 0;
|
||||
|
||||
/**
|
||||
* {@link #MY<caret>
|
||||
*/
|
||||
public class Inner {}
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class TestClass {
|
||||
|
||||
public static final int MY_CONSTANT = 0;
|
||||
|
||||
/**
|
||||
* {@link #MY_CONSTANT<caret>
|
||||
*/
|
||||
public class Inner {}
|
||||
|
||||
}
|
||||
@@ -176,6 +176,10 @@ public class JavadocCompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testFieldReferenceInInnerClassJavadoc() throws Throwable {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testShortenClassReference() throws Throwable { doTest(); }
|
||||
public void testQualifiedClassReference() throws Throwable {
|
||||
configureByFile(getTestName(false) + ".java");
|
||||
|
||||
Reference in New Issue
Block a user