LookupElement[] (ExpressionContext context) { final LookupElement[] elements = expression.calculateLookupItems(context); if (elements != null) { LookupElement toBeSelected = null; for (LookupElement element : elements) { if (element instanceof PsiTypeLookupItem && ((PsiTypeLookupItem)element).getType().getPresentableText().equals(defaultType)) { toBeSelected = element; break; } } if (toBeSelected != null) { final int idx = ArrayUtil.find(elements, toBeSelected); if (idx > 0) { return ArrayUtil.prepend(toBeSelected, ArrayUtil.remove(elements, idx)); } } } return elements; }