mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
show autopopup after completing a package when and only when there was a dot inserted after the previous package
This commit is contained in:
@@ -60,7 +60,7 @@ public class JavaTypedHandler extends TypedHandlerDelegate {
|
||||
}
|
||||
|
||||
//do not show lookup when typing varargs ellipsis
|
||||
final PsiElement prevSibling = lastElement.getPrevSibling();
|
||||
final PsiElement prevSibling = PsiTreeUtil.prevVisibleLeaf(lastElement);
|
||||
if (prevSibling == null || ".".equals(prevSibling.getText())) return false;
|
||||
PsiElement parent = prevSibling;
|
||||
do {
|
||||
|
||||
@@ -33,6 +33,8 @@ class PackageLookupItem extends LookupItem<PsiPackage> {
|
||||
@Override
|
||||
public void handleInsert(InsertionContext context) {
|
||||
super.handleInsert(context);
|
||||
AutoPopupController.getInstance(context.getProject()).scheduleAutoPopup(context.getEditor(), null);
|
||||
if (getTailType() == TailType.DOT || context.getCompletionChar() == '.') {
|
||||
AutoPopupController.getInstance(context.getProject()).scheduleAutoPopup(context.getEditor(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user