private static Field.Relation computeScalarValueRelation(@NotNull YAMLKeyValue keyValue, @NotNull YAMLScalar value) {
    // in the most normal case it is always Field.Relation.SCALAR_VALUE;
    // however it should be adjusted for bad or incomplete yaml
    // there may be following cases:
    // a) sometimes auxiliary YamlMapping inserted by the parser to recover from incomplete key
    //    a-1) see `provider/keyIncomplete`,
    //    a-2) see `provider/keyIncompleteInner2` test
    // b) sometimes it is not inserted, and scalar is a direct sibling of other YamlKeyValue's
    //    b-1) see `provider/keyIncomplete2`
    // c) sometimes the incomplete object value is interpreted as a normal key-value-pair but with key containing EOL
    //    c-1) see `provider/keyIncomplete3`
    //    c-2) see `provider/keyIncompleteInner`
    // d) finally there may be incomplete state where the key already has both object and scalar content
    //    d-1) see `stringOrObject_stringMisplaced` test

    PsiElement keySibling = value.getParent() instanceof YAMLMapping ? value.getParent() : value;
    if (hasLineBreakBetweenKeyAndValue(keyValue, keySibling)) {
      return Field.Relation.OBJECT_CONTENTS;
    }
    return Field.Relation.SCALAR_VALUE;
  }
private static Field.Relation computeScalarValueRelation(@NotNull YAMLKeyValue keyValue, @NotNull YAMLScalar value)