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
private ICompositeOperation openComposite = null;
	/**
	 * a lock that is used to synchronize access to the open composite.
	 */
	final Object openCompositeLock = new Object();
	/**
	 * Create an instance of DefaultOperationHistory.
	 */
	public DefaultOperationHistory() {
		super();
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.core.commands.operations.IOperationHistory#add(org.eclipse.core.commands.operations.IUndoableOperation)
	 */
	public void add(IUndoableOperation operation) {
		Assert.isNotNull(operation);
		/*
		 * If we are in the middle of executing an open batching operation, and
		 * this is not that operation, then we need only add the context of the
		 * new operation to the batch. The operation itself is disposed since we
		 * will never undo or redo it. We consider it to be triggered by the
		 * batching operation and assume that its undo will be triggered by the
		 * batching operation undo.
		 */
		synchronized (openCompositeLock) {
			if (openComposite != null && openComposite != operation) {
				openComposite.add(operation);
				return;