public final class LinearUndoViolationUserApprover extends LinearUndoViolationDetector
An operation approver that prompts the user to see if linear undo violations are permitted. A linear undo violation is detected when an operation being undone or redone shares an undo context with another operation appearing more recently in the history.
This class may be instantiated by clients.
Constructor and Description |
---|
LinearUndoViolationUserApprover(IUndoContext context,
IWorkbenchPart part)
Create a LinearUndoViolationUserApprover associated with the specified
workbench part.
|
Modifier and Type | Method and Description |
---|---|
protected IStatus |
allowLinearRedoViolation(IUndoableOperation operation,
IUndoContext context,
IOperationHistory history,
IAdaptable uiInfo)
Return a status indicating whether a linear redo violation is allowable.
|
protected IStatus |
allowLinearUndoViolation(IUndoableOperation operation,
IUndoContext context,
IOperationHistory history,
IAdaptable uiInfo)
Return a status indicating whether a linear undo violation is allowable.
|
proceedRedoing, proceedUndoing
public LinearUndoViolationUserApprover(IUndoContext context, IWorkbenchPart part)
context
- the undo context with the linear undo violationpart
- the part that should be used for prompting the userprotected IStatus allowLinearRedoViolation(IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable uiInfo)
LinearUndoViolationDetector
allowLinearRedoViolation
in class LinearUndoViolationDetector
operation
- the operation for which a linear redo violation has been
detected.context
- the undo context in which the linear redo violation existshistory
- the operation history containing the operationuiInfo
- the IAdaptable (or null
) provided by the
caller in order to supply UI information for prompting the
user if necessary. When this parameter is not
null
, it should minimally contain an adapter
for the org.eclipse.swt.widgets.Shell.class.OK
, and the caller requesting the redo will be
returned the status that caused the rejection. Specific status
severities will not be interpreted by the history.protected IStatus allowLinearUndoViolation(IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable uiInfo)
LinearUndoViolationDetector
allowLinearUndoViolation
in class LinearUndoViolationDetector
operation
- the operation for which a linear undo violation has been
detected.context
- the undo context in which the linear undo violation existshistory
- the operation history containing the operationuiInfo
- the IAdaptable (or null
) provided by the
caller in order to supply UI information for prompting the
user if necessary. When this parameter is not
null
, it should minimally contain an adapter
for the org.eclipse.swt.widgets.Shell.class.OK
, and the caller requesting the undo will be
returned the status that caused the rejection. Specific status
severities will not be interpreted by the history.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.