IRegion current= fLineTracker.getLineInformation(i); buffer.replace(previous.getOffset() + previous.getLength(), current.getOffset(), getLineDelimiter()); previous= current;
int lastLineEnd= previous.getOffset() + previous.getLength(); int lineStart= fLineTracker.getLineInformation(i).getOffset(); fLineTracker.replace(lastLineEnd,  lineStart - lastLineEnd, getLineDelimiter()); buffer.replace(lastLineEnd, lineStart, getLineDelimiter()); previous= fLineTracker.getLineInformation(i);
	protected String normalize(String text) {		fLineTracker.set(text);				int lines= fLineTracker.getNumberOfLines();		if (lines <= 1)			return text;					StringBuffer buffer= new StringBuffer(text);				try {			IRegion previous= fLineTracker.getLineInformation(0);			for (int i= 1; i < lines; i++) {				IRegion current= fLineTracker.getLineInformation(i);				buffer.replace(previous.getOffset() + previous.getLength(), current.getOffset(), getLineDelimiter());				previous= current;			}						// last line			String delimiter= fLineTracker.getLineDelimiter(lines -1);			if (delimiter != null && delimiter.length() > 0)				buffer.replace(previous.getOffset() + previous.getLength(), buffer.length(), getLineDelimiter());							return buffer.toString();		} catch (BadLocationException x) {		}				return text;	}