Bug 89020 [Undo] Operation throws assertion failure if undo limit is set to 0
I20050324-0800 Unfortunately existing clients of text's undo manager were allowed to set any number without failing. This is no longer possible: an assertion failure occurrs if the limit is smaller than 1. I will add code on my side that will handle the negative numbers but the operation history must allow 0.
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
/*
		 * The limit checking methods interpret a null context as a global limit to be
		 * enforced.  We do not wish to support a global limit in this implementation,
		 * so we throw an exception for a null context.  The rest of the implementation
		 * can handle a null context, so subclasses can override this if a global limit
		 * is desired.
		 */	
		Assert.isNotNull(context);
		limits.put(context, new Integer(limit));
		forceUndoLimit(context, limit);
		forceRedoLimit(context, limit);
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.core.commands.operations.IOperationHistory#undo(org.eclipse.core.commands.operations.IUndoContext, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
	 */
	public IStatus undo(IUndoContext context, IProgressMonitor monitor, IAdaptable info) throws ExecutionException{
		Assert.isNotNull(context);
		IUndoableOperation operation = getUndoOperation(context);
		
		if (operation == null)
			return NOTHING_TO_UNDO_STATUS;
		
		if (!operation.canUndo()) {
			if (DEBUG_OPERATION_HISTORY_UNEXPECTED) {
				System.out.print("OPERATIONHISTORY >>> Undo operation not valid - ");  
				System.out.print(operation);
				System.out.println();