boolean (@NotNull PsiCallExpression call) { PsiFile containingFile = call.getContainingFile(); final MethodCandidatesProcessor processor = new MethodCandidatesProcessor(call, containingFile, new PsiConflictResolver[0], new SmartList<>()) { @Override protected boolean acceptVarargs() { return true; } }; if (call instanceof PsiMethodCallExpression) { PsiReferenceExpression methodExpression = ((PsiMethodCallExpression)call).getMethodExpression(); processor.setIsConstructor(false); processor.setName(methodExpression.getReferenceName()); PsiScopesUtil.resolveAndWalk(processor, methodExpression, null); } else if (call instanceof PsiNewExpression) { PsiJavaCodeReferenceElement classReference = ((PsiNewExpression)call).getClassOrAnonymousClassReference(); if (classReference != null) { processor.setIsConstructor(true); processor.setName(classReference.getReferenceName()); PsiScopesUtil.resolveAndWalk(processor, classReference, null); } } return processor.getCandidates().length > 1; }