void () { Document document = getEditor().getDocument(); int offset = myRandom.nextInt(document.getTextLength() + 1); runWriteCommand(() -> document.insertString(offset, StringUtil.repeat(" ", myRandom.nextInt(MAX_CHARS_PER_OPERATION) + 1))); }