void (boolean includeEndChange) { int prevChangeEnd = -1; for (int i = myChangeGroupStartIndex; i <= myChangeGroupEndIndex; i++) { TextChangeImpl change = myChanges.get(i); if (prevChangeEnd >= 0) { int length = change.getStart() - prevChangeEnd; System.arraycopy(myData, prevChangeEnd, myData, myDataStartOffset, length); myDataStartOffset += length; } prevChangeEnd = change.getEnd(); if (i == myChangeGroupEndIndex && !includeEndChange) { return; } int length = change.getText().length(); if (length > 0) { CharArrayUtil.getChars(change.getText(), myData, myDataStartOffset); myDataStartOffset += length; } } }