List<LookupElement> (@NotNull CompletionVariantsProcessor processor) { final List<LookupElement> ret = new ArrayList<>(); for (LookupElement item : processor.getResultList()) { final PsiElement e = item.getPsiElement(); if (e != null) { final PsiElement original = CompletionUtilCoreImpl.getOriginalElement(e); if (original == null) { continue; } } ret.add(item); } return ret; }