Package org.eclipse.jface.text
Interface ITextOperationTarget
- All Known Implementing Classes:
- ProjectionViewer,- SourceViewer,- TextConsoleViewer,- TextViewer
public interface ITextOperationTarget
Defines the target for text operations. 
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:
 
- ITextOperationTargetExtensionsince version 2.0 introducing text operation enabling/disabling.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intText operation code for copying the selected text to the clipboard.static final intText operation code for moving the selected text to the clipboard.static final intText operation code for deleting the selected text or if selection is empty the character at the right of the current position.static final intText operation code for inserting the clipboard content at the current position.static final intText operation code for prefixing the selected text block.static final intText operation code for printing the complete text.static final intText operation code for redoing the last undone edit command.static final intText operation code for selecting the complete text.static final intText operation code for shifting the selected text block to the left.static final intText operation code for shifting the selected text block to the right.static final intText operation code for removing the prefix from the selected text block.static final intText operation code for undoing the last edit command.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanDoOperation(int operation) Returns whether the operation specified by the given operation code can be performed.voiddoOperation(int operation) Performs the operation specified by the operation code on the target.
- 
Field Details- 
UNDOstatic final int UNDOText operation code for undoing the last edit command.- See Also:
 
- 
REDOstatic final int REDOText operation code for redoing the last undone edit command.- See Also:
 
- 
CUTstatic final int CUTText operation code for moving the selected text to the clipboard.- See Also:
 
- 
COPYstatic final int COPYText operation code for copying the selected text to the clipboard.- See Also:
 
- 
PASTEstatic final int PASTEText operation code for inserting the clipboard content at the current position.- See Also:
 
- 
DELETEstatic final int DELETEText operation code for deleting the selected text or if selection is empty the character at the right of the current position.- See Also:
 
- 
SELECT_ALLstatic final int SELECT_ALLText operation code for selecting the complete text.- See Also:
 
- 
SHIFT_RIGHTstatic final int SHIFT_RIGHTText operation code for shifting the selected text block to the right.- See Also:
 
- 
SHIFT_LEFTstatic final int SHIFT_LEFTText operation code for shifting the selected text block to the left.- See Also:
 
- 
PRINTstatic final int PRINTText operation code for printing the complete text.- See Also:
 
- 
PREFIXstatic final int PREFIXText operation code for prefixing the selected text block.- See Also:
 
- 
STRIP_PREFIXstatic final int STRIP_PREFIXText operation code for removing the prefix from the selected text block.- See Also:
 
 
- 
- 
Method Details- 
canDoOperationboolean canDoOperation(int operation) Returns whether the operation specified by the given operation code can be performed.- Parameters:
- operation- the operation code
- Returns:
- trueif the specified operation can be performed
 
- 
doOperationvoid doOperation(int operation) Performs the operation specified by the operation code on the target.doOperationmust only be called ifcanDoOperationreturnstrue.- Parameters:
- operation- the operation code
 
 
-