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.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
if (!operation.canExecute()) {
			return OPERATION_INVALID_STATUS;
		}
		
		/*
		 * If we are in the middle of an open batch, then we will add this operation's contexts
		 * to the open operation rather than add the operation to the history.  We will still
		 * execute it, but will dispose of it afterward.  Operations triggered during an operation
		 * are assumed to be model-related and we assume the undo of this related operation will be
		 * triggered automatically by the undo of the batching operation.
		 */
		boolean merging = false;
		if (batchingOperation != null) {
			
			if (batchingOperation == operation) {
				return OPERATION_INVALID_STATUS;
			}
			IUndoContext[] contexts = operation.getContexts();
			for (int i = 0; i < contexts.length; i++) {
				batchingOperation.addContext(contexts[i]);
			}
			merging = true;
		}
		/*
		 * Execute the operation
		 */
		if (!merging) notifyAboutToExecute(operation);
		IStatus status;