public final class OperationHistoryEvent extends Object
OperationHistoryEvent is used to communicate changes that occur in a DefaultOperationHistory, including the addition or removal of operations, and the execution, undo, and redo of operations.
Operation history listeners must be prepared to receive notifications from a background thread. Any UI access occurring inside the implementation must be properly synchronized using the techniques specified by the client's widget library.
Modifier and Type | Field and Description |
---|---|
static int |
ABOUT_TO_EXECUTE
ABOUT_TO_EXECUTE indicates that an operation is about to execute.
|
static int |
ABOUT_TO_REDO
ABOUT_TO_REDO indicates that an operation is about to be redone.
|
static int |
ABOUT_TO_UNDO
ABOUT_TO_UNDO indicates that an operation is about to be undone.
|
static int |
DONE
DONE indicates that an operation has been executed.
|
static int |
OPERATION_ADDED
OPERATION_ADDED indicates that an operation was added to the history.
|
static int |
OPERATION_CHANGED
OPERATION_CHANGED indicates that an operation has changed in some way
since it was added to the operations history.
|
static int |
OPERATION_NOT_OK
OPERATION_NOT_OK indicates that an operation was attempted and not
successful.
|
static int |
OPERATION_REMOVED
OPERATION_REMOVED indicates an operation was removed from the history.
|
static int |
REDONE
REDONE indicates that an operation was redone.
|
static int |
UNDONE
UNDONE indicates that an operation was undone.
|
Constructor and Description |
---|
OperationHistoryEvent(int code,
IOperationHistory history,
IUndoableOperation operation)
Construct an event for the specified operation history.
|
OperationHistoryEvent(int code,
IOperationHistory history,
IUndoableOperation operation,
IStatus status)
Construct an event for the specified operation history.
|
Modifier and Type | Method and Description |
---|---|
int |
getEventType()
Return the type of event that is occurring.
|
IOperationHistory |
getHistory()
Return the operation history that triggered this event.
|
IUndoableOperation |
getOperation()
Return the operation associated with this event.
|
IStatus |
getStatus()
Return the status associated with this event.
|
public static final int ABOUT_TO_EXECUTE
public static final int ABOUT_TO_REDO
public static final int ABOUT_TO_UNDO
public static final int DONE
public static final int OPERATION_ADDED
public static final int OPERATION_CHANGED
public static final int OPERATION_NOT_OK
public static final int OPERATION_REMOVED
public static final int REDONE
public static final int UNDONE
public OperationHistoryEvent(int code, IOperationHistory history, IUndoableOperation operation)
code
- the event code to be used.history
- the history triggering the event.operation
- the operation involved in the event.public OperationHistoryEvent(int code, IOperationHistory history, IUndoableOperation operation, IStatus status)
code
- the event code to be used.history
- the history triggering the event.operation
- the operation involved in the event.status
- the status associated with the event, or null if no status is
available.public int getEventType()
public IOperationHistory getHistory()
public IUndoableOperation getOperation()
public IStatus getStatus()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.