LookupElement (@NotNull List<? extends PsiMethod> overloads, @NotNull PsiClass containingClass, boolean shouldImport) { shouldImport |= myOriginalPosition != null && PsiTreeUtil.isAncestor(containingClass, myOriginalPosition, false); final JavaMethodCallElement element = getMethodCallElement(shouldImport, overloads); JavaCompletionUtil.putAllMethods(element, overloads); return element; }