Package org.eclipse.ui.texteditor
Class TextViewerDeleteLineTarget
- java.lang.Object
-
- org.eclipse.ui.texteditor.TextViewerDeleteLineTarget
-
public class TextViewerDeleteLineTarget extends Object
A delete line target.- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description TextViewerDeleteLineTarget(ITextViewer viewer)
Creates a new target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteLine(IDocument document, int offset, int length, int type, boolean copyToClipboard)
void
deleteLine(IDocument document, ITextSelection selection, int type, boolean copyToClipboard)
Deletes the lines that intersect with the givenselection
.
-
-
-
Constructor Detail
-
TextViewerDeleteLineTarget
public TextViewerDeleteLineTarget(ITextViewer viewer)
Creates a new target.- Parameters:
viewer
- the viewer that the new target operates on
-
-
Method Detail
-
deleteLine
public void deleteLine(IDocument document, int offset, int length, int type, boolean copyToClipboard) throws BadLocationException
- Throws:
BadLocationException
-
deleteLine
public void deleteLine(IDocument document, ITextSelection selection, int type, boolean copyToClipboard) throws BadLocationException
Deletes the lines that intersect with the givenselection
.- Parameters:
document
- the documentselection
- the selection to use to determine the document range to deletetype
- the line deletion type, must be one ofWHOLE_LINE
,TO_BEGINNING
orTO_END
copyToClipboard
-true
if the deleted line should be copied to the clipboard- Throws:
BadLocationException
- if position is not valid in the given document- Since:
- 3.5
-
-