public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (oldInput != null) {
IDocument document= fDocumentProvider.getDocument(oldInput);
if (document != null) {
try {
document.removePositionCategory(SEGMENTS);
} catch (BadPositionCategoryException x) {}
document.removePositionUpdater(fPositionUpdater);
}
}