LookupElement (@NotNull PsiField field, @NotNull PsiClass origClass) { if (!myExpectedType.isAssignableFrom(field.getType())) { return null; } return new VariableLookupItem(field, false) .qualifyIfNeeded(ObjectUtils.tryCast(myParameters.getPosition().getParent(), PsiJavaCodeReferenceElement.class), origClass); }