} else if (updateManager != null) {
// We have to wait for the update manager to stop
// before we install the new document otherwise bad
// things can happen with the update manager.
updateManager.addUpdateManagerListener
(new UpdateManagerListener () {
UpdateManager um = updateManager;
public void managerStopped(UpdateManagerEvent e) {
// Remove ourselves from the old update manger,
// and install the new document.
um.removeUpdateManagerListener(this);