public class MarkRegionTarget extends Object implements IMarkRegionTarget
IMarkRegionTarget
using ITextViewer
and IStatusLineManager
.Constructor and Description |
---|
MarkRegionTarget(ITextViewer viewer,
IStatusLineManager manager)
Creates a MarkRegionTaret.
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
isVisible(ITextViewer viewer,
int offset)
Tells whether the given offset is visible in the given text viewer.
|
void |
setMarkAtCursor(boolean set)
Sets or clears a mark at the current cursor position.
|
void |
swapMarkAndCursor()
Swaps the mark and cursor position if the mark is in the visible region.
|
public MarkRegionTarget(ITextViewer viewer, IStatusLineManager manager)
viewer
- the text viewermanager
- the status line managerpublic void setMarkAtCursor(boolean set)
IMarkRegionTarget
setMarkAtCursor
in interface IMarkRegionTarget
set
- sets the mark if true
, clears otherwise.public void swapMarkAndCursor()
IMarkRegionTarget
swapMarkAndCursor
in interface IMarkRegionTarget
protected static final boolean isVisible(ITextViewer viewer, int offset)
viewer
- the text vieweroffset
- the offset to checktrue
if the given offset is visible in the given text viewer
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.