/** * Calculates the indexes of each line in the text store. Assumes no gap exists. * Optimized to do less checking. */ void indexLines(){ int start = 0; lineCount = 0; int textLength = textStore.length; int i; for (i = start; i < textLength; i++) { char ch = textStore[i]; if (ch == SWT.CR) { // see if the next character is a LF if (i + 1 < textLength) { ch = textStore[i+1]; if (ch == SWT.LF) { i++; } } addLineIndex(start, i - start + 1); start = i + 1; } else if (ch == SWT.LF) { addLineIndex(start, i - start + 1); start = i + 1; } } addLineIndex(start, i - start); } /**
/** * Calculates the indexes of each line in the text store. Assumes no gap exists. * Optimized to do less checking. */ void indexLines(){ int start = 0; lineCount = 0; int textLength = textStore.length; int i; for (i = start; i < textLength; i++) { char ch = textStore[i]; if (ch == SWT.CR) { // see if the next character is a LF if (i + 1 < textLength) { ch = textStore[i+1]; if (ch == SWT.LF) { i++; } } addLineIndex(start, i - start + 1); start = i + 1; } else if (ch == SWT.LF) { addLineIndex(start, i - start + 1); start = i + 1; } } addLineIndex(start, i - start); } /**
/** * Calculates the indexes of each line in the text store. Assumes no gap exists. * Optimized to do less checking. */ void indexLines(){ int start = 0; lineCount = 0; int textLength = textStore.length; int i; for (i = start; i < textLength; i++) { char ch = textStore[i]; if (ch == SWT.CR) { // see if the next character is a LF if (i + 1 < textLength) { ch = textStore[i+1]; if (ch == SWT.LF) { i++; } } addLineIndex(start, i - start + 1); start = i + 1; } else if (ch == SWT.LF) { addLineIndex(start, i - start + 1); start = i + 1; } } addLineIndex(start, i - start); } /**
/** * Calculates the indexes of each line in the text store. Assumes no gap exists. * Optimized to do less checking. */ void indexLines(){ int start = 0; lineCount = 0; int textLength = textStore.length; int i; for (i = start; i < textLength; i++) { char ch = textStore[i]; if (ch == SWT.CR) { // see if the next character is a LF if (i + 1 < textLength) { ch = textStore[i+1]; if (ch == SWT.LF) { i++; } } addLineIndex(start, i - start + 1); start = i + 1; } else if (ch == SWT.LF) { addLineIndex(start, i - start + 1); start = i + 1; } } addLineIndex(start, i - start); } /**
/** * Calculates the indexes of each line in the text store. Assumes no gap exists. * Optimized to do less checking. */ void indexLines(){ int start = 0; lineCount = 0; int textLength = textStore.length; int i; for (i = start; i < textLength; i++) { char ch = textStore[i]; if (ch == SWT.CR) { // see if the next character is a LF if (i + 1 < textLength) { ch = textStore[i+1]; if (ch == SWT.LF) { i++; } } addLineIndex(start, i - start + 1); start = i + 1; } else if (ch == SWT.LF) { addLineIndex(start, i - start + 1); start = i + 1; } } addLineIndex(start, i - start); } /**
indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1; } else if (ch == SWT.LF) { indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1;
indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1; } else if (ch == SWT.LF) { indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1;
indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1; } else if (ch == SWT.LF) { indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1;
indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1; } else if (ch == SWT.LF) { indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1;
indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1; } else if (ch == SWT.LF) { indexedLines = addLineIndex(start, i - start + 1, indexedLines, lineCount); lineCount++; start = i + 1;