Eclipse Platform
2.0

org.eclipse.jface.text
Interface IMarkSelection

All Superinterfaces:
ISelection
All Known Implementing Classes:
MarkSelection

public interface IMarkSelection
extends ISelection

A mark selection. Can be returned by text viewers implementing the IMarkRegionTarget interface.

Since:
2.0

Method Summary
 IDocument getDocument()
          Returns the marked document.
 int getLength()
          Returns the length of the mark selection.
 int getOffset()
          Returns the mark position.
 
Methods inherited from interface org.eclipse.jface.viewers.ISelection
isEmpty
 

Method Detail

getDocument

public IDocument getDocument()
Returns the marked document.

Returns:
the marked document

getOffset

public int getOffset()
Returns the mark position. The offset may be -1 if there's no marked region.

Returns:
the mark position or -1 if there is no marked region

getLength

public int 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 if getOffset() returns -1.

Returns:
the length of the mark selection. Result is undefined for getOffset == -1

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.