Eclipse Platform
2.0

org.eclipse.jface.text
Interface ITextOperationTarget

All Known Implementing Classes:
TextViewer

public interface ITextOperationTarget

Defines the target for a text operation.


Field Summary
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 unshifting 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.
 
Method Summary
 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.
 

Field Detail

UNDO

public static final int UNDO
Text operation code for undoing the last edit command.

See Also:
Constant Field Values

REDO

public static final int REDO
Text operation code for redoing the last undone edit command.

See Also:
Constant Field Values

CUT

public static final int CUT
Text operation code for moving the selected text to the clipboard.

See Also:
Constant Field Values

COPY

public static final int COPY
Text operation code for copying the selected text to the clipboard.

See Also:
Constant Field Values

PASTE

public static final int PASTE
Text operation code for inserting the clipboard content at the current position.

See Also:
Constant Field Values

DELETE

public static final int DELETE
Text operation code for deleting the selected text or if selection is empty the character at the right of the current position.

See Also:
Constant Field Values

SELECT_ALL

public static final int SELECT_ALL
Text operation code for selecting the complete text.

See Also:
Constant Field Values

SHIFT_RIGHT

public static final int SHIFT_RIGHT
Text operation code for shifting the selected text block to the right.

See Also:
Constant Field Values

SHIFT_LEFT

public static final int SHIFT_LEFT
Text operation code for unshifting the selected text block to the left.

See Also:
Constant Field Values

PRINT

public static final int PRINT
Text operation code for printing the complete text.

See Also:
Constant Field Values

PREFIX

public static final int PREFIX
Text operation code for prefixing the selected text block.

See Also:
Constant Field Values

STRIP_PREFIX

public static final int STRIP_PREFIX
Text operation code for removing the prefix from the selected text block.

See Also:
Constant Field Values
Method Detail

canDoOperation

public boolean canDoOperation(int operation)
Returns whether the operation specified by the given operation code can be performed.

Parameters:
operation - the operation code
Returns:
true if the specified operation can be performed

doOperation

public void doOperation(int operation)
Performs the operation specified by the operation code on the target. doOperation must only be called if canDoOperation returns true.

Parameters:
operation - the operation code

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.