PsiElementVisitor (@NotNull ProblemsHolder holder, @NotNull LocalInspectionToolSession session, Collection<PsiElement> roots, JsonSchemaObject object) { JsonComplianceCheckerOptions options = new JsonComplianceCheckerOptions(myCaseInsensitiveEnum); return new YamlPsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { if (!roots.contains(element)) return; final JsonLikePsiWalker walker = JsonLikePsiWalker.getWalker(element, object); if (walker == null) return; String prefix = YAMLBundle.message("inspections.schema.validation.prefix") + " "; new JsonSchemaComplianceChecker(object, holder, walker, session, options,prefix).annotate(element); } }; }