Package org.eclipse.jface.text
Class MultiTextSelection
java.lang.Object
org.eclipse.jface.text.MultiTextSelection
- All Implemented Interfaces:
- IMultiTextSelection,- ITextSelection,- ISelection
- Since:
- 3.19
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the number of the line containing the last character of the selected text.intReturns the length of the selected text.intReturns the offset of the selected text.IRegion[]Returns a non-empty array containing the selected text range for each line covered by the selection.intReturns number of the line containing the offset of the selected text.getText()Returns the selected text.booleanisEmpty()Returns whether this selection is empty.
- 
Constructor Details- 
MultiTextSelection
 
- 
- 
Method Details- 
getOffsetpublic int getOffset()Description copied from interface:ITextSelectionReturns the offset of the selected text.- Specified by:
- getOffsetin interface- ITextSelection
- Returns:
- the offset of the selected text or -1 if there is no valid text information
 
- 
getLengthpublic int getLength()Description copied from interface:ITextSelectionReturns the length of the selected text.- Specified by:
- getLengthin interface- ITextSelection
- Returns:
- the length of the selected text or -1 if there is no valid text information
 
- 
getStartLinepublic int getStartLine()Description copied from interface:ITextSelectionReturns number of the line containing the offset of the selected text. If the underlying text has been changed between the creation of this selection object and the call of this method, the value returned might differ from what it would have been at the point of creation.- Specified by:
- getStartLinein interface- ITextSelection
- Returns:
- the start line of this selection or -1 if there is no valid line information
 
- 
getEndLinepublic int getEndLine()Description copied from interface:ITextSelectionReturns the number of the line containing the last character of the selected text. If the underlying text has been changed between the creation of this selection object and the call of this method, the value returned might differ from what it would have been at the point of creation.- Specified by:
- getEndLinein interface- ITextSelection
- Returns:
- the end line of this selection or -1 if there is no valid line information
 
- 
getTextDescription copied from interface:ITextSelectionReturns the selected text. If the underlying text has been changed between the creation of this selection object and the call of this method, the value returned might differ from what it would have been at the point of creation.- Specified by:
- getTextin interface- ITextSelection
- Returns:
- the selected text or nullif there is no valid text information
 
- 
isEmptypublic boolean isEmpty()Description copied from interface:ISelectionReturns whether this selection is empty.- Specified by:
- isEmptyin interface- ISelection
- Returns:
- trueif this selection is empty, and- falseotherwise
 
- 
getRegionsDescription copied from interface:IMultiTextSelectionReturns a non-empty array containing the selected text range for each line covered by the selection.- Specified by:
- getRegionsin interface- IMultiTextSelection
- Returns:
- an array containing a the covered text range for each line covered by the receiver
 
 
-