public class TextViewerDeleteLineTarget extends Object
Constructor and Description |
---|
TextViewerDeleteLineTarget(ITextViewer viewer)
Creates a new target.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteLine(IDocument document,
int offset,
int length,
int type,
boolean copyToClipboard)
Deletes the specified fraction of the line of the given offset.
|
void |
deleteLine(IDocument document,
ITextSelection selection,
int type,
boolean copyToClipboard)
Deletes the lines that intersect with the given
selection . |
public TextViewerDeleteLineTarget(ITextViewer viewer)
viewer
- the viewer that the new target operates onpublic void deleteLine(IDocument document, int offset, int length, int type, boolean copyToClipboard) throws BadLocationException
document
- the documentoffset
- the offsetlength
- the lengthtype
- the line deletion type, must be one of
WHOLE_LINE
, TO_BEGINNING
or TO_END
copyToClipboard
- true
if the deleted line should be copied to the clipboardBadLocationException
- if position is not valid in the given documentpublic void deleteLine(IDocument document, ITextSelection selection, int type, boolean copyToClipboard) throws BadLocationException
selection
.document
- the documentselection
- the selection to use to determine the document range to deletetype
- the line deletion type, must be one of
WHOLE_LINE
, TO_BEGINNING
or TO_END
copyToClipboard
- true
if the deleted line should be copied to the clipboardBadLocationException
- if position is not valid in the given document
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.