void (PsiMethod psiMethod, List<? super FixableUsageInfo> usages) { for (PsiReference reference : ReferencesSearch.search(psiMethod, psiMethod.getUseScope())) { final PsiElement referenceElement = reference.getElement(); final PsiElement parent = referenceElement.getParent(); if (parent instanceof PsiCallExpression) { usages.add(new UnwrapCall((PsiCallExpression)parent, myUnwrapMethodName)); } else if (referenceElement instanceof PsiMethodReferenceExpression) { usages.add(new UnwrapCall((PsiMethodReferenceExpression)referenceElement, myUnwrapMethodName)); } } final String returnType = calculateReturnTypeString(); usages.add(new ChangeReturnType(psiMethod, returnType)); psiMethod.accept(new ReturnSearchVisitor(usages, returnType)); }