Package org.eclipse.jface.text
Interface IMarkSelection
- All Superinterfaces:
- ISelection
- All Known Implementing Classes:
- MarkSelection
A mark selection can be sent out by text viewers. By checking the
 type of the selection selection listeners can determine whether a selection
 event is about a mark or a normal text selection.
 
 This interface is not intended to be implemented by clients other than
 ITextViewer implementers.
 
- Since:
- 2.0
- 
Method SummaryModifier and TypeMethodDescriptionReturns the marked document.intReturns the length of the mark selection.intReturns the mark position.Methods inherited from interface org.eclipse.jface.viewers.ISelectionisEmpty
- 
Method Details- 
getDocumentIDocument getDocument()Returns the marked document.- Returns:
- the marked document
 
- 
getOffsetint getOffset()Returns the mark position. The offset may be-1if there's no marked region.- Returns:
- the mark position or -1if there is no marked region
 
- 
getLengthint getLength()Returns the length of the mark selection. The length may be negative, if the caret is before the mark position. The length has no meaning ifgetOffset()returns-1.- Returns:
- the length of the mark selection. Result is undefined for getOffset == -1
 
 
-