void (PsiMethod method, List<? super FixableUsageInfo> usages) { final PsiManager psiManager = method.getManager(); final Project project = psiManager.getProject(); final GlobalSearchScope scope = GlobalSearchScope.allScope(project); final Iterable<PsiReference> calls = ReferencesSearch.search(method, scope); final String fullyQualifiedName = getQualifiedName(); for (PsiReference reference : calls) { final PsiElement referenceElement = reference.getElement(); final PsiElement parent = referenceElement.getParent(); if (parent instanceof PsiMethodCallExpression call) { if (!isInMovedElement(call)) { usages.add(new RetargetStaticMethodCall(call, fullyQualifiedName)); } } else if (parent instanceof PsiImportStaticStatement importStaticStatement) { final PsiJavaCodeReferenceElement importReference = importStaticStatement.getImportReference(); if (importReference != null && importReference.getQualifier() instanceof PsiJavaCodeReferenceElement qualifier) { usages.add(new ReplaceClassReference(qualifier, fullyQualifiedName)); } } } usages.add(new RemoveMethod(method)); }