public class MarkSelection extends Object implements IMarkSelection
IMarkSelection.| Constructor and Description |
|---|
MarkSelection(IDocument document,
int offset,
int length)
Creates a MarkSelection.
|
| Modifier and Type | Method and Description |
|---|---|
IDocument |
getDocument()
Returns the marked document.
|
int |
getLength()
Returns the length of the mark selection.
|
int |
getOffset()
Returns the mark position.
|
boolean |
isEmpty()
Returns whether this selection is empty.
|
public MarkSelection(IDocument document, int offset, int length)
document - the marked documentoffset - the offset of the marklength - the length of the mark, may be negative if caret before offsetpublic IDocument getDocument()
IMarkSelectiongetDocument in interface IMarkSelectionpublic int getOffset()
IMarkSelection-1 if there's no marked region.getOffset in interface IMarkSelection-1 if there is no marked regionpublic int getLength()
IMarkSelectiongetOffset()
returns -1.getLength in interface IMarkSelectiongetOffset == -1public boolean isEmpty()
ISelectionisEmpty in interface ISelectiontrue if this selection is empty,
and false otherwiseGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.