public class BlockTextSelection extends TextSelection implements IBlockTextSelection
IBlockTextSelection
.Constructor and Description |
---|
BlockTextSelection(IDocument document,
int startLine,
int startColumn,
int endLine,
int endColumn,
int tabWidth)
Creates a column selection for the given lines and columns.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getEndColumn()
Returns the exclusive column on the end line at which the
selection ends.
|
int |
getEndLine()
Returns the number of the line containing the last character of the selected text.
|
IRegion[] |
getRegions()
Returns a non-empty array containing the selected text range for each line covered by the
selection.
|
int |
getStartColumn()
Returns the column on the start line at which the
selection starts.
|
int |
getStartLine()
Returns number of the line containing the offset of the selected text.
|
String |
getText()
Returns the selected text.
|
int |
hashCode() |
emptySelection, getDocument, getLength, getOffset, isEmpty
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getLength, getOffset
isEmpty
public BlockTextSelection(IDocument document, int startLine, int startColumn, int endLine, int endColumn, int tabWidth)
document
- the document that this selection refers tostartLine
- the start linestartColumn
- the possibly virtual start column, measured in characters from the start
of startLine
endLine
- the inclusive end lineendColumn
- the exclusive and possibly virtual end column, measured in characters from
the start of endLine
tabWidth
- the tabulator width used to compute the visual offsets from character offsetspublic int getStartLine()
ITextSelection
getStartLine
in interface ITextSelection
getStartLine
in class TextSelection
public int getStartColumn()
IBlockTextSelection
getStartColumn
in interface IBlockTextSelection
public int getEndLine()
ITextSelection
getEndLine
in interface ITextSelection
getEndLine
in class TextSelection
public int getEndColumn()
IBlockTextSelection
getEndColumn
in interface IBlockTextSelection
public String getText()
ITextSelection
getText
in interface IBlockTextSelection
getText
in interface ITextSelection
getText
in class TextSelection
null
if there is no valid text informationITextSelection.getText()
public int hashCode()
hashCode
in class TextSelection
public boolean equals(Object obj)
equals
in class TextSelection
public IRegion[] getRegions()
IBlockTextSelection
getRegions
in interface IBlockTextSelection
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.