void (int index, @NotNull List<? extends CharSequence> newContent) { LOG.assertTrue(isInsideCommand()); int outputStartLine = getLineStart(index); int outputEndLine = getLineEnd(index); DiffUtil.applyModification(myDocument, outputStartLine, outputEndLine, newContent); if (outputStartLine == outputEndLine) { // onBeforeDocumentChange() should process other cases correctly int newOutputEndLine = outputStartLine + newContent.size(); moveChangesAfterInsertion(index, outputStartLine, newOutputEndLine); } }