if (customReference instanceof JavaClassReference) {
JavaClassReference javaClassReference = (JavaClassReference)customReference;
String[] names = javaClassReference.getExtendClassNames();
PsiElement context = javaClassReference.getCompletionContext();
if (names != null && context instanceof PsiPackage) {
javaClassReference.processSubclassVariants((PsiPackage)context, names, new Consumer<LookupElement>() {
@Override
public void consume(LookupElement element) {
variants.add(element);
}
});