boolean (final PsiMethod searchedConstructor, final Processor<? super PsiReference> consumer, final PsiClass clazz, final boolean processThisRefs) { final PsiMethod[] constructors = clazz.getConstructors(); if (constructors.length == 0) { processImplicitConstructorCall(clazz, consumer, searchedConstructor); } for (PsiMethod constructor : constructors) { if (!(constructor instanceof GrMethod)) continue; final GrOpenBlock block = ((GrMethod)constructor).getBlock(); if (block != null) { final GrStatement[] statements = block.getStatements(); if (statements.length > 0 && statements[0] instanceof GrConstructorInvocation invocation) { if (invocation.isThisCall() == processThisRefs && invocation.getManager().areElementsEquivalent(invocation.resolveMethod(), searchedConstructor) && !consumer.process(invocation.getInvokedExpression())) { return false; } } else { processImplicitConstructorCall(constructor, consumer, searchedConstructor); } } } return true; }