void (boolean searchInheritors, final Consumer<? super LookupElement> results) { if (MagicCompletionContributor.getAllowedValues(myParameters.getPosition()) != null) { return; } addKnownConstants(results); addConstantsFromTargetClass(results, searchInheritors); if (myExpectedType instanceof PsiPrimitiveType && PsiTypes.doubleType().isAssignableFrom(myExpectedType)) { addConstantsFromReferencedClassesInSwitch(results); } if (JavaCompletionContributor.IN_SWITCH_LABEL.accepts(myPlace)) { return; //non-enum values are processed above, enum values will be suggested by reference completion } final PsiClass psiClass = PsiUtil.resolveClassInType(myExpectedType); processMembers(results, psiClass, PsiTreeUtil.getParentOfType(myPlace, PsiAnnotation.class) == null, searchInheritors); if (psiClass != null && myExpectedType instanceof PsiClassType) { new BuilderCompletion((PsiClassType)myExpectedType, psiClass, myPlace).suggestBuilderVariants().forEach(results::consume); } }