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/IOperationHistory.java
* <p>
 * Additional protocol allows direct undo and redo of a specified operation,
 * regardless of its position in the history. When a more flexible undo model is
 * supported, these methods can be implemented to undo and redo directly
 * specified operations. If an implementer of IOperationHistory does not allow
 * direct undo and redo, these methods can return a status indicating that it is
 * not allowed.
 * </p>
 * <p>
 * Listeners ({@link IOperationHistoryListener}) can listen for notifications
 * about changes in the history (operations added or removed), and for
 * notification before and after any operation is executed, undone or redone.
 * Notification of operation execution only occurs when clients direct the
 * history to execute the operation. If the operation is added after it is
 * executed, there can be no notification of its execution.
 * </p>
 * <p>
 * {@link IOperationApprover} defines an interface for approving an undo or redo
 * before it occurs. This is useful for injecting policy-decisions into the undo
 * model - whether direct undo and redo are supported, or warning the user about
 * certain kinds of operations. It can also be used when clients maintain state
 * related to an operation and need to determine whether an undo or redo will
 * cause any conflicts with their local state.
 * </p>
 * 
 * @since 3.1
 */
public interface IOperationHistory {
	/**
	 * An operation is to be opened or closed for execution. (value is 1).