Bug 88352 Operation supports leaks contexts via action handler
I20050315-1100 Susan, this is a different leak from the one that I reported. Test Case: 1. open text editor 2. close text editor ==> DefaultUndoManager is leaked due to undo/redo actions handlers still holding on to the context.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
/**
     * Returns the <code>UndoContext</code> for this view.
     * The navigator considers the workspace the context for undo.
     */
    protected IUndoContext getUndoContext() { 
    	return (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
    }
    
    /**
     * Creates global action handlers for undo and redo.
     */
    
    protected void createGlobalActionHandlers() {
    	IUndoContext undoContext = getUndoContext();
    	if (undoContext != null) {
	        
	        IAction action = new UndoActionHandler(this.getSite().getWorkbenchWindow(), undoContext);
	        IActionBars actionBars = getViewSite().getActionBars();
	        actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
	                action);
	        action = new RedoActionHandler(this.getSite().getWorkbenchWindow(), undoContext);
	        actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
	                action);
    	}
    	
    }
    
}