|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.operations.LinearUndoViolationDetector
An abstract class for detecting violations in a strict linear undo/redo model. Once a violation is detected, subclasses implement the specific behavior for indicating whether or not the undo/redo should proceed.
Constructor Summary | |
---|---|
LinearUndoViolationDetector()
Create an instance of LinearUndoViolationDetector. |
Method Summary | |
---|---|
protected abstract IStatus |
allowLinearRedoViolation(IUndoableOperation operation,
IUndoContext context,
IOperationHistory history,
IAdaptable info)
Return a status indicating whether a linear redo violation is allowable. |
protected abstract IStatus |
allowLinearUndoViolation(IUndoableOperation operation,
IUndoContext context,
IOperationHistory history,
IAdaptable info)
Return a status indicating whether a linear undo violation is allowable. |
IStatus |
proceedRedoing(IUndoableOperation operation,
IOperationHistory history,
IAdaptable info)
Return a status indicating whether the specified operation should be redone. |
IStatus |
proceedUndoing(IUndoableOperation operation,
IOperationHistory history,
IAdaptable info)
Return a status indicating whether the specified operation should be undone. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LinearUndoViolationDetector()
Method Detail |
protected abstract IStatus allowLinearRedoViolation(IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable info)
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 operationinfo
- 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 abstract IStatus allowLinearUndoViolation(IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable info)
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 operationinfo
- 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.public final IStatus proceedRedoing(IUndoableOperation operation, IOperationHistory history, IAdaptable info)
IOperationApprover
IStatus.OK
will not be approved. Implementers should not assume that the redo will
be performed when the status is OK
, since other operation
approvers may veto the redo.
proceedRedoing
in interface IOperationApprover
operation
- the operation to be redonehistory
- the history redoing the operationinfo
- 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. Even if UI
information is provided, the implementation of this method
must be prepared for being called from a background thread.
Any UI access must be properly synchronized using the
techniques specified by the client's widget library.
OK
, and the caller requesting the redo will be
returned the status that caused the rejection. Any other status
severities will not be interpreted by the history.public final IStatus proceedUndoing(IUndoableOperation operation, IOperationHistory history, IAdaptable info)
IOperationApprover
IStatus.OK
will not be approved. Implementers should not assume that the undo will
be performed when the status is OK
, since other operation
approvers can veto the undo.
proceedUndoing
in interface IOperationApprover
operation
- the operation to be undonehistory
- the history undoing the operationinfo
- 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. Even if UI
information is provided, the implementation of this method
must be prepared for being called from a background thread.
Any UI access must be properly synchronized using the
techniques specified by the client's widget library.
OK
, and the caller requesting the undo will be
returned the status that caused the rejection. Any other status
severities will not be interpreted by the history.
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.