void (boolean isScalar) { assert getKey() != null; PsiElement key = getKey(); if (key.getNextSibling() != null && key.getNextSibling().getNode().getElementType() == YAMLTokenTypes.COLON) { key = key.getNextSibling(); } while (key.getNextSibling() != null && !(key.getNextSibling() instanceof YAMLValue)) { key.getNextSibling().delete(); } final YAMLElementGenerator generator = YAMLElementGenerator.getInstance(getProject()); if (isScalar) { addAfter(generator.createSpace(), key); } else { final int indent = YAMLUtil.getIndentToThisElement(this); addAfter(generator.createIndent(indent + 2), key); addAfter(generator.createEol(), key); } }