mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
autopopup after dot: class names
This commit is contained in:
@@ -71,6 +71,8 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE
|
||||
new CodeCompletionHandlerBase(CompletionType.BASIC).invoke(project, editor, file);
|
||||
}
|
||||
});
|
||||
} else if (c == '.' && PsiTreeUtil.getParentOfType(position, PsiParameterList.class) == null) {
|
||||
AutoPopupController.getInstance(context.getProject()).autoPopupMemberLookup(context.getEditor(), null);
|
||||
}
|
||||
|
||||
if (position != null) {
|
||||
|
||||
@@ -366,4 +366,26 @@ class JavaAutoPopupTest extends CompletionAutoPopupTestCase {
|
||||
assert lookup
|
||||
}
|
||||
|
||||
public void testDotAfterClassName() {
|
||||
myFixture.configureByText("a.java", """
|
||||
class A {
|
||||
{ <caret> }
|
||||
}
|
||||
""")
|
||||
type 'FilInpStr.'
|
||||
assert myFixture.file.text.contains("FileInputStream.")
|
||||
assert lookup
|
||||
}
|
||||
|
||||
public void testDotAfterClassNameInParameter() {
|
||||
myFixture.configureByText("a.java", """
|
||||
class A {
|
||||
void foo(<caret>) {}
|
||||
}
|
||||
""")
|
||||
type 'FilInpStr...'
|
||||
assert myFixture.editor.document.text.contains("FileInputStream...")
|
||||
assert !lookup
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user