private static PsiElementPattern.Capture<JsonStringLiteral> createRequiredPropPattern() {
    return PlatformPatterns.psiElement(JsonStringLiteral.class).and(new FilterPattern(new ElementFilter() {
      @Override
      public boolean isAcceptable(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());
      }

      @Override
      public boolean isClassAcceptable(Class hintClass) {
        return true;
      }
    }));
  }
private static PsiElementPattern.Capture<JsonStringLiteral> createRequiredPropPattern()