public interface ITextOperationTarget
canDoOperation
informs
the clients about the ability of the target to perform the specified
operation at the current point in time. doOperation
executes
the specified operation.
In order to provide backward compatibility for clients of
ITextOperationTarget
, extension interfaces are used as a
means of evolution. The following extension interfaces exist:
ITextOperationTargetExtension
since
version 2.0 introducing text operation enabling/disabling.ITextOperationTargetExtension
Modifier and Type | Field and Description |
---|---|
static int |
COPY
Text operation code for copying the selected text to the clipboard.
|
static int |
CUT
Text operation code for moving the selected text to the clipboard.
|
static int |
DELETE
Text operation code for deleting the selected text or if selection
is empty the character at the right of the current position.
|
static int |
PASTE
Text operation code for inserting the clipboard content at the
current position.
|
static int |
PREFIX
Text operation code for prefixing the selected text block.
|
static int |
PRINT
Text operation code for printing the complete text.
|
static int |
REDO
Text operation code for redoing the last undone edit command.
|
static int |
SELECT_ALL
Text operation code for selecting the complete text.
|
static int |
SHIFT_LEFT
Text operation code for shifting the selected text block to the left.
|
static int |
SHIFT_RIGHT
Text operation code for shifting the selected text block to the right.
|
static int |
STRIP_PREFIX
Text operation code for removing the prefix from the selected text block.
|
static int |
UNDO
Text operation code for undoing the last edit command.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDoOperation(int operation)
Returns whether the operation specified by the given operation code
can be performed.
|
void |
doOperation(int operation)
Performs the operation specified by the operation code on the target.
|
static final int UNDO
static final int REDO
static final int CUT
static final int COPY
static final int PASTE
static final int DELETE
static final int SELECT_ALL
static final int SHIFT_RIGHT
static final int SHIFT_LEFT
static final int PRINT
static final int PREFIX
static final int STRIP_PREFIX
boolean canDoOperation(int operation)
operation
- the operation codetrue
if the specified operation can be performedvoid doOperation(int operation)
doOperation
must only be called if canDoOperation
returns true
.operation
- the operation code
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.