@Override
public Object[] getVariants() {
final List<InterceptorRef> allInterceptorRefs = interceptorStack.getInterceptorRefs();
List<LookupElement> names = new ArrayList<LookupElement>(allInterceptorRefs.size());
for (InterceptorRef interceptorRef : allInterceptorRefs) {
final InterceptorOrStackBase resolvedInterceptor = interceptorRef.getName().getValue();
if (resolvedInterceptor == null) {
continue;
}
final String interceptorName = StringUtil.notNullize(resolvedInterceptor.getName().getStringValue());
names.add(LookupElementBuilder.create(resolvedInterceptor, interceptorName)
.withIcon(ElementPresentationManager.getIcon(resolvedInterceptor)));
}
return ArrayUtil.toObjectArray(names, LookupElement.class);
}