PsiReferenceParameterList (@NotNull final CreateParameterInfoContext context) { final PsiReferenceParameterList referenceParameterList = ParameterInfoUtils.findParentOfType(context.getFile(), context.getOffset(), PsiReferenceParameterList.class); if (referenceParameterList != null) { if (!(referenceParameterList.getParent() instanceof PsiJavaCodeReferenceElement ref)) return null; final PsiElement psiElement = ref.resolve(); if (!(psiElement instanceof PsiTypeParameterListOwner)) return null; final PsiTypeParameter[] typeParams = ((PsiTypeParameterListOwner)psiElement).getTypeParameters(); if (typeParams.length == 0) return null; context.setItemsToShow(typeParams); return referenceParameterList; } return null; }