Package org.eclipse.ui.texteditor
Class MarkRegionTarget
java.lang.Object
org.eclipse.ui.texteditor.MarkRegionTarget
- All Implemented Interfaces:
IMarkRegionTarget
Default implementation of
IMarkRegionTarget
using ITextViewer
and IStatusLineManager
.- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionMarkRegionTarget
(ITextViewer viewer, IStatusLineManager manager) Creates a MarkRegionTaret. -
Method Summary
Modifier and TypeMethodDescriptionprotected static final 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
Swaps the mark and cursor position if the mark is in the visible region.
-
Constructor Details
-
MarkRegionTarget
Creates a MarkRegionTaret.- Parameters:
viewer
- the text viewermanager
- the status line manager
-
-
Method Details
-
setMarkAtCursor
public void setMarkAtCursor(boolean set) Description copied from interface:IMarkRegionTarget
Sets or clears a mark at the current cursor position.- Specified by:
setMarkAtCursor
in interfaceIMarkRegionTarget
- Parameters:
set
- sets the mark iftrue
, clears otherwise.
-
swapMarkAndCursor
public void swapMarkAndCursor()Description copied from interface:IMarkRegionTarget
Swaps the mark and cursor position if the mark is in the visible region.- Specified by:
swapMarkAndCursor
in interfaceIMarkRegionTarget
-
isVisible
Tells whether the given offset is visible in the given text viewer.- Parameters:
viewer
- the text vieweroffset
- the offset to check- Returns:
true
if the given offset is visible in the given text viewer- Since:
- 2.1
-