Bug 89031 [Undo/Redo] IWorkbench#getOperationSupport() marked experimental
IWorkbench#getOperationSupport() marked experimental
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/LinearUndoEnforcer.java
* been added to builds so that clients can start using the new features.
 * However, it may change significantly before reaching stability. It is being
 * made available at this early stage to solicit feedback with the understanding
 * that any code that uses this API may be broken as the API evolves.
 * </p>
 * 
 * @since 3.1
 * @experimental
 */
public class LinearUndoEnforcer extends LinearUndoViolationDetector {
	/*
	 * Return whether a linear redo violation is allowable.  A linear redo violation
	 * is defined as a request to redo a particular operation even if it is not the most
	 * recently added operation to the redo history.
	 */
	protected IStatus allowLinearRedoViolation(IUndoableOperation operation,
			IUndoContext context, IOperationHistory history, IAdaptable uiInfo) {
		return Status.CANCEL_STATUS;
	}
	/*
	 * Return whether a linear undo violation is allowable.  A linear undo violation
	 * is defined as a request to undo a particular operation even if it is not the most
	 * recently added operation to the undo history.
	 */
	protected IStatus allowLinearUndoViolation(IUndoableOperation operation,
			IUndoContext context, IOperationHistory history, IAdaptable uiInfo) {
		return Status.CANCEL_STATUS;
	}
}