protected boolean annotateEdit(TextEdit edit, String startTag, String endTag) { unchangedUntil(edit.getOffset()); fBuf.append(startTag); appendContent(fPreviewDocument, edit.getOffset(), edit.getExclusiveEnd(), false); fBuf.append(endTag); fWrittenToPos= edit.getExclusiveEnd(); return false; }
protected boolean annotateEdit(TextEdit edit, String startTag, String endTag) { unchangedUntil(edit.getOffset()); fBuf.append(startTag); appendContent(fPreviewDocument, edit.getOffset(), edit.getExclusiveEnd(), false); fBuf.append(endTag); fWrittenToPos= edit.getExclusiveEnd(); return false; }
protected boolean annotateEdit(TextEdit edit, String startTag, String endTag) { unchangedUntil(edit.getOffset()); fBuf.append(startTag); appendContent(fPreviewDocument, edit.getOffset(), edit.getExclusiveEnd(), false); fBuf.append(endTag); fWrittenToPos= edit.getExclusiveEnd(); return false; }
protected static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset = thisEdit.getOffset(); int thisEnd = thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset = otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } int otherOffset = otherEdit.getOffset(); int otherEnd = otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; }
protected static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset = thisEdit.getOffset(); int thisEnd = thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset = otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } int otherOffset = otherEdit.getOffset(); int otherEnd = otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; }
protected static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) // an insertion point can't cover anything return false; int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset < otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } }
void checkIntegrityUndo() { if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
void checkIntegrityDo() throws MalformedTreeException { fSourceEdits= new ArrayList<>(); fRoot.traverseConsistencyCheck(this, fDocument, fSourceEdits); if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
void checkIntegrityDo() throws MalformedTreeException { fSourceEdits= new ArrayList<>(); fRoot.traverseConsistencyCheck(this, fDocument, fSourceEdits); if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
private static boolean covers(TextEdit thisEdit, TextEdit otherEdit) { if (thisEdit.getLength() == 0) { return false; } int thisOffset= thisEdit.getOffset(); int thisEnd= thisEdit.getExclusiveEnd(); if (otherEdit.getLength() == 0) { int otherOffset= otherEdit.getOffset(); return thisOffset <= otherOffset && otherOffset < thisEnd; } else { int otherOffset= otherEdit.getOffset(); int otherEnd= otherEdit.getExclusiveEnd(); return thisOffset <= otherOffset && otherEnd <= thisEnd; } } }
void checkIntegrityUndo() { if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }