boolean (Object element, @Nullable PsiElement context) { if (!(element instanceof JsonStringLiteral)) return false; final PsiElement parent = ((JsonStringLiteral)element).getParent(); if (!(parent instanceof JsonArray)) return false; PsiElement property = parent.getParent(); if (!(property instanceof JsonProperty)) return false; return "required".equals(((JsonProperty)property).getName()) && JsonSchemaService.isSchemaFile(((JsonStringLiteral)element).getContainingFile()); }