void (PsiTypeParameter typeParameter, List<? super UsageInfo> usages) { PsiTypeParameterListOwner owner = typeParameter.getOwner(); if (owner != null) { PsiTypeParameterList parameterList = owner.getTypeParameterList(); if (parameterList != null) { int paramsCount = parameterList.getTypeParameters().length; int index = parameterList.getTypeParameterIndex(typeParameter); ReferencesSearch.search(owner).forEach(reference -> { JavaSafeDeleteDelegate safeDeleteDelegate = JavaSafeDeleteDelegate.EP.forLanguage(reference.getElement().getLanguage()); if (safeDeleteDelegate != null) { safeDeleteDelegate.createJavaTypeParameterUsageInfo(reference, usages, typeParameter, paramsCount, index); } return true; }); } } }