private LineFragment addFragment(TextDiffTypeEnum type, String text1, String text2) {
int lines1 = countLines(text1);
int lines2 = countLines(text2);
int endOffset1 = myOffset1 + getLength(text1);
int endOffset2 = myOffset2 + getLength(text2);
LineFragment lineFragment = new LineFragment(myLine1, lines1, myLine2, lines2, type,
new TextRange(myOffset1, endOffset1),
new TextRange(myOffset2, endOffset2));
myLine1 += lines1;
myLine2 += lines2;
myOffset1 = endOffset1;