boolean (@NotNull ASTNode node) { Predicate<YAMLValue> possiblyIncompleteValue = value -> value == null || YAMLElementTypes.INCOMPLETE_BLOCKS.contains(PsiUtilCore.getElementType(value)); if (PsiUtilCore.getElementType(node) == YAMLElementTypes.KEY_VALUE_PAIR) { YAMLValue value = ((YAMLKeyValue)node.getPsi()).getValue(); if (possiblyIncompleteValue.test(value)) { return true; } } else if (PsiUtilCore.getElementType(node) == YAMLElementTypes.SEQUENCE_ITEM) { YAMLValue value = ((YAMLSequenceItem)node.getPsi()).getValue(); if (possiblyIncompleteValue.test(value)) { return true; } } return FormatterUtil.isIncomplete(node); }