Context (@Nullable PsiElement element) { if (!(element instanceof PsiLambdaExpression lambda)) return null; PsiElement body = lambda.getBody(); if (body == null) return null; PsiMethodCallExpression call = PsiTreeUtil.getParentOfType(lambda, PsiMethodCallExpression.class); if (call == null) return null; return new Context(call, lambda, body); }