public boolean matchesNameFromSchema() {
    final VirtualFile file = PsiUtilCore.getVirtualFile(getElement());
    if (file == null) return false;

    Project project = getElement().getProject();
    final JsonSchemaService service = JsonSchemaService.Impl.get(project);
    if (!service.isApplicableToFile(file)) return false;
    final JsonSchemaObject rootSchema = service.getSchemaObject(getElement().getContainingFile());
    if (rootSchema == null) return false;
    if (isXIntellijInjection(service, rootSchema)) return true;

    String value = getValue();
    if (StringUtil.isEmpty(value)) return false;

    JsonLikePsiWalker walker = JsonLikePsiWalker.getWalker(getElement(), rootSchema);
    if (walker == null) return false;
    final PsiElement checkable = walker.findElementToCheck(getElement());
    if (checkable == null) return false;
    final ThreeState isName = walker.isName(checkable);
    final JsonPointerPosition position = walker.findPosition(checkable, isName == ThreeState.NO);
    if (position == null || position.isEmpty() && isName == ThreeState.NO) return false;

    final Collection<JsonSchemaObject> schemas = new JsonSchemaResolver(project, rootSchema, position, walker.createValueAdapter(checkable)).resolve();
    if (schemas.isEmpty()) return false;

    return schemas.stream().anyMatch(s -> {
      if (s.getPropertyByName(value) != null || s.getMatchingPatternPropertySchema(value) != null) {
        return true;
      }
      return ContainerUtil.notNullize(s.getEnum()).stream().anyMatch(e -> e instanceof String && StringUtil.unquoteString((String)e).equals(value));
    });
  }
public boolean matchesNameFromSchema()