mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-159057 Wrong autocompletion of class name in JavaDoc
This commit is contained in:
+3
-1
@@ -72,7 +72,9 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE
|
||||
}
|
||||
|
||||
String qname = psiClass.getQualifiedName();
|
||||
if (qname != null && PsiTreeUtil.getParentOfType(position, PsiDocComment.class, false) != null && shouldInsertFqnInJavadoc(item, file, project)) {
|
||||
if (qname != null && PsiTreeUtil.getParentOfType(position, PsiDocComment.class, false) != null &&
|
||||
(ref == null || !ref.isQualified()) &&
|
||||
shouldInsertFqnInJavadoc(item, file, project)) {
|
||||
context.getDocument().replaceString(context.getStartOffset(), context.getTailOffset(), qname);
|
||||
return;
|
||||
}
|
||||
|
||||
+8
@@ -646,4 +646,12 @@ class Foo {
|
||||
myFixture.completeBasic()
|
||||
myFixture.checkResult "/** {@code null}<caret> */"
|
||||
}
|
||||
|
||||
public void "test completing inside qualified name"() {
|
||||
myFixture.configureByText 'a.java', "/** @see java.io.<caret> */"
|
||||
myFixture.completeBasic()
|
||||
myFixture.lookup.currentItem = myFixture.lookupElements.find { it.lookupString == 'IOException' }
|
||||
myFixture.type('\n')
|
||||
myFixture.checkResult "/** @see java.io.IOException<caret> */"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user