void (@NotNull Consumer<? super LookupElement> consumer, PsiMember member, Set<PsiClass> classesToSkip) { if (isStaticallyImportable(member)) { PsiClass containingClass = member.getContainingClass(); assert containingClass != null : member.getName() + "; " + member + "; " + member.getClass(); if (JavaCompletionUtil.isSourceLevelAccessible(myPosition, containingClass, myPackagedContext)) { if (member instanceof PsiMethod && !classesToSkip.add(containingClass)) return; if(!additionalFilter(member)) return; boolean shouldImport = myStaticImportedClasses.contains(containingClass); showHint(shouldImport); LookupElement item = member instanceof PsiMethod ? createItemWithOverloads((PsiMethod)member, containingClass, shouldImport) : member instanceof PsiField ? createLookupElement(member, containingClass, shouldImport) : null; if (item != null) { consumer.consume(item); } } } }