use of org.eclipse.che.ide.api.editor.text.BadLocationException in project che by eclipse.
the class AbstractDocument method replace.
/*
* @see org.eclipse.jface.text.IDocument#replace(int, int, java.lang.String)
*/
public void replace(int pos, int length, String text, long modificationStamp) throws BadLocationException {
if ((0 > pos) || (0 > length) || (pos + length > getLength()))
throw new BadLocationException();
DocumentEvent e = new DocumentEvent(this, pos, length, text);
fireDocumentAboutToBeChanged(e);
getStore().replace(pos, length, text);
getTracker().replace(pos, length, text);
fModificationStamp = modificationStamp;
fNextModificationStamp = Math.max(fModificationStamp, fNextModificationStamp);
e.fModificationStamp = fModificationStamp;
fireDocumentChanged(e);
}
Aggregations