PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new JsonPathVisitor() { @Override public void visitBinaryConditionalOperator(@NotNull JsonPathBinaryConditionalOperator operator) { super.visitBinaryConditionalOperator(operator); ASTNode namedOp = operator.getNode().findChildByType(JsonPathTypes.NAMED_OP); if (namedOp == null) return; String operatorName = namedOp.getText(); if (!JsonPathConstants.STANDARD_NAMED_OPERATORS.contains(operatorName)) { boolean isEvaluateExpr = Boolean.TRUE.equals(holder.getFile().getUserData(JSON_PATH_EVALUATE_EXPRESSION_KEY)); if (isEvaluateExpr) { holder.registerProblem(operator, JsonPathBundle.message("inspection.message.jsonpath.unsupported.jayway.operator", operatorName), ProblemHighlightType.ERROR); } else { holder.registerProblem(operator, null, JsonPathBundle.message("inspection.message.jsonpath.unknown.operator.name", operatorName)); } } } }; }