void (@NotNull PsiClassType type, @NotNull Collection<? super String> suggestions) { final PsiClass resolved = type.resolve(); if (resolved == null || resolved.getContainingClass() == null) return; InheritanceUtil.processSupers(resolved, false, superClass -> { if (PsiTreeUtil.isAncestor(superClass, resolved, true)) { suggestions.add(superClass.getName()); } return false; }); }