* @since 2.1
* @deprecated use <code>updateSlaveDocument</code> instead
*/
protected boolean updateVisibleDocument(IDocument visibleDocument, int visibleRegionOffset, int visibleRegionLength) throws BadLocationException {
if (visibleDocument instanceof ChildDocument) {
ChildDocument childDocument= (ChildDocument) visibleDocument;
IDocument document= childDocument.getParentDocument();
int line= document.getLineOfOffset(visibleRegionOffset);
int offset= document.getLineOffset(line);
int length= (visibleRegionOffset - offset) + visibleRegionLength;
Position parentRange= childDocument.getParentDocumentRange();
if (offset != parentRange.getOffset() || length != parentRange.getLength()) {
childDocument.setParentDocumentRange(offset, length);
return true;
}
}
return false;
}