boolean (PsiExpression ref) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(ref.getParent()); if (!(parent instanceof PsiExpressionList) || !(parent.getParent() instanceof PsiMethodCallExpression)) return false; int argIndex = IntStreamEx.ofIndices(((PsiExpressionList)parent).getExpressions(), arg -> PsiTreeUtil.isAncestor(arg, ref, false)) .findFirst().orElse(-1); if (argIndex < 0) return false; PsiMethod method = ((PsiMethodCallExpression)parent.getParent()).resolveMethod(); if (method == null) return false; PsiParameter[] parameters = method.getParameterList().getParameters(); return parameters.length > argIndex && NullableNotNullManager.isNotNull(parameters[argIndex]); }