ExpressionLookupItem (PsiElement element, LookupElement item) { if (item.getObject() instanceof PsiLocalVariable variable) { final PsiType type = variable.getType(); final PsiExpression expression = variable.getInitializer(); if (type instanceof PsiArrayType && expression instanceof PsiNewExpression newExpression) { final PsiExpression[] dimensions = newExpression.getArrayDimensions(); if (dimensions.length == 1 && "1".equals(dimensions[0].getText()) && newExpression.getArrayInitializer() == null) { final String text = variable.getName() + "[0]"; return new ExpressionLookupItem(createExpression(text, element), variable.getIcon(Iconable.ICON_FLAG_VISIBILITY), text, text); } } } return null; }