void (@NotNull PsiElement element, List<? super UsageInfo> usages, PsiElement[] allElementsToDelete, SearchScope scope) { ReferencesSearch.search(element, scope).forEach(reference -> { PsiElement refElement = reference.getElement(); if (!isInside(refElement, allElementsToDelete)) { usages.add(new SafeDeleteReferenceSimpleDeleteUsageInfo(refElement, element, false)); } return true; }); }