LookupElement[] (Expression @NotNull [] params, ExpressionContext context) { final List<PsiClass> classes = findDescendants(context, params); if (classes == null || classes.size() == 0) return null; Set<LookupElement> set = new LinkedHashSet<>(); boolean isShortName = params.length > 1 && !Boolean.parseBoolean(params[1].calculateResult(context).toString()); for (PsiClass object : classes) { final String name = isShortName ? object.getName() : object.getQualifiedName(); if (name != null && name.length() > 0) { set.add(LookupElementBuilder.create(name)); } } return set.toArray(LookupElement.EMPTY_ARRAY); }