List<JavaPsiClassReferenceElement> (final PsiClass psiClass, boolean withInners, InsertHandler<JavaPsiClassReferenceElement> insertHandler, Condition<? super PsiClass> condition) { String name = psiClass.getName(); if (name == null) return Collections.emptyList(); List<JavaPsiClassReferenceElement> result = new SmartList<>(); if (condition.value(psiClass)) { result.add(AllClassesGetter.createLookupItem(psiClass, insertHandler)); } if (withInners) { for (PsiClass inner : psiClass.getInnerClasses()) { if (inner.hasModifierProperty(PsiModifier.STATIC)) { for (JavaPsiClassReferenceElement lookupInner : createClassLookupItems(inner, true, insertHandler, condition)) { String forced = lookupInner.getForcedPresentableName(); String qualifiedName = name + "." + (forced != null ? forced : inner.getName()); lookupInner.setForcedPresentableName(qualifiedName); lookupInner.setLookupString(qualifiedName); result.add(lookupInner); } } } } return result; }