boolean (ProcessingContext context, PsiExpressionList psiExpressionList, ElementPattern<? extends PsiMethod> methodPattern, @Nullable PsiNamePatternCondition nameCondition) { final PsiElement element = psiExpressionList.getParent(); if (element instanceof PsiMethodCallExpression) { PsiReferenceExpression methodExpression = ((PsiMethodCallExpression)element).getMethodExpression(); if (nameCondition != null && !nameCondition.getNamePattern().accepts(methodExpression.getReferenceName())) { return false; } for (JavaResolveResult result : methodExpression.multiResolve(false)) { if (methodPattern.accepts(result.getElement(), context)) { return true; } } } return false; }