Bug 105697 [Undo] - OperationHistoryEvent - cannot distinguish between canceled event or failed event
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
while (size > max) {
				IUndoableOperation removed = (IUndoableOperation) filtered[index];
				if (context == GLOBAL_UNDO_CONTEXT
						|| removed.getContexts().length == 1) {
					/*
					 * remove the operation if we are enforcing a global limit
					 * or if the operation only has the specified context
					 */
					redoList.remove(removed);
					internalRemove(removed);
				} else {
					/*
					 * if the operation has multiple contexts and we've reached
					 * the limit for only one of them, then just remove the
					 * context, not the operation.
					 */
					removed.removeContext(context);
				}
				size--;
				index++;
			}
		}
	}
	/*
	 * Force the undo history for the given context to contain max or less
	 * items.
	 */
	private void forceUndoLimit(IUndoContext context, int max) {
		Object[] filtered = filter(undoList, context);
		int size = filtered.length;