Package org.eclipse.jface.text
Class MarkSelection
java.lang.Object
org.eclipse.jface.text.MarkSelection
- All Implemented Interfaces:
- IMarkSelection,- ISelection
Default implementation of 
IMarkSelection.- Since:
- 2.0
- 
Constructor SummaryConstructorsConstructorDescriptionMarkSelection(IDocument document, int offset, int length) Creates a MarkSelection.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the marked document.intReturns the length of the mark selection.intReturns the mark position.booleanisEmpty()Returns whether this selection is empty.
- 
Constructor Details- 
MarkSelectionCreates a MarkSelection.- Parameters:
- document- the marked document
- offset- the offset of the mark
- length- the length of the mark, may be negative if caret before offset
 
 
- 
- 
Method Details- 
getDocumentDescription copied from interface:IMarkSelectionReturns the marked document.- Specified by:
- getDocumentin interface- IMarkSelection
- Returns:
- the marked document
 
- 
getOffsetpublic int getOffset()Description copied from interface:IMarkSelectionReturns the mark position. The offset may be-1if there's no marked region.- Specified by:
- getOffsetin interface- IMarkSelection
- Returns:
- the mark position or -1if there is no marked region
 
- 
getLengthpublic int getLength()Description copied from interface:IMarkSelectionReturns 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.- Specified by:
- getLengthin interface- IMarkSelection
- Returns:
- the length of the mark selection. Result is undefined for getOffset == -1
 
- 
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
 
 
-