Bug 123972 [Undo] Support approval of undoable operation execution
In GMF we do some common validation on our commands before we proceed to execute, undo or redo them. This validation is external to the command's ability to execute, undo or redo itself. Registering an IOperationApprover with the operation history for this of validation would give us an elegant solution. However, the IOperationApprover only supports approval of undo and redo. We also require support for approval of operation execution. Would you consider adding a proceedExecuting() method to the IOperationApprover interface, or to an extension of the IOperationApprover interface?
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
}
		notifyListeners(new OperationHistoryEvent(OperationHistoryEvent.DONE,
				this, operation));
	}
	/*
	 * Notify listeners that an operation did not succeed after an attempt to
	 * execute, undo, or redo was made.
	 */
	private void notifyNotOK(IUndoableOperation operation) {
		notifyNotOK(operation, null);
	}
	/*
	 * Notify listeners that an operation did not succeed after an attempt to
	 * execute, undo, or redo was made. Include the status associated with the
	 * attempt.
	 * 
	 * @since 3.2
	 */
	private void notifyNotOK(IUndoableOperation operation, IStatus status) {
		if (DEBUG_OPERATION_HISTORY_NOTIFICATION) {
			Tracing.printTrace("OPERATIONHISTORY", "OPERATION_NOT_OK " 
					+ operation);
		}
		notifyListeners(new OperationHistoryEvent(
				OperationHistoryEvent.OPERATION_NOT_OK, this, operation, status));
	}
	/*
	 * Notify listeners that an operation was redone.
	 */
	private void notifyRedone(IUndoableOperation operation) {