Bug 84446 OperationHistory should protect itself better against runtime exceptions
Since clients of the history might rely on getting certain events even if a operation causes runtime exceptions (for example listeners) the history should protect itself better agains runtime exceptions. This envloves: - listeners causing runtime exceptions in the call back - Operation execution causing runtime exceptions. In this case listeners must be informed as well.
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
* over time.
	 */
	private void checkRedoLimit(IUndoableOperation operation) {
		IUndoContext [] contexts = operation.getContexts();
		for (int i=0; i<contexts.length; i++) {
			int limit = getLimit(contexts[i]);
			if (limit > 0) forceRedoLimit(contexts[i], limit - 1);
		}
	}
	/**
	 * Check the undo limit before adding an operation.
	 */
	private void checkUndoLimit(IUndoableOperation operation) {
		IUndoContext [] contexts = operation.getContexts();
		for (int i=0; i<contexts.length; i++) {
			int limit = getLimit(contexts[i]);
			if (limit > 0) forceUndoLimit(contexts[i], limit - 1);
		}
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.core.commands.operations.IOperationHistory#dispose(org.eclipse.core.commands.operations.IUndoContext, boolean, boolean)
	 */
	public void dispose(IUndoContext context, boolean flushUndo,
			boolean flushRedo) {
		if (flushUndo)
			flushUndo(context);
		if (flushRedo)
			flushRedo(context);