void (@NotNull final ReferencesSearch.SearchParameters p, @NotNull Processor<? super PsiReference> consumer) { final PsiElement element = p.getElementToSearch(); if (!(element instanceof PsiMethod method)) { return; } final PsiManager[] manager = new PsiManager[1]; PsiClass aClass = ReadAction.compute(() -> { if (!method.isConstructor()) return null; PsiClass aClass1 = method.getContainingClass(); manager[0] = aClass1 == null ? null : aClass1.getManager(); return aClass1; }); if (manager[0] == null) { return; } SearchScope scope = ReadAction.compute(() -> p.getEffectiveSearchScope()); new ConstructorReferencesSearchHelper(manager[0]) .processConstructorReferences(consumer, method, aClass, scope, p.getProject(), p.isIgnoreAccessScope(), true, p.getOptimizer()); }