Class MarkRegionTarget

  • All Implemented Interfaces:
    IMarkRegionTarget

    public class MarkRegionTarget
    extends Object
    implements IMarkRegionTarget
    Default implementation of IMarkRegionTarget using ITextViewer and IStatusLineManager.
    Since:
    2.0
    • Constructor Detail

      • MarkRegionTarget

        public MarkRegionTarget​(ITextViewer viewer,
                                IStatusLineManager manager)
        Creates a MarkRegionTaret.
        Parameters:
        viewer - the text viewer
        manager - the status line manager
    • Method Detail

      • 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 interface IMarkRegionTarget
        Parameters:
        set - sets the mark if true, clears otherwise.
      • isVisible

        protected static final boolean isVisible​(ITextViewer viewer,
                                                 int offset)
        Tells whether the given offset is visible in the given text viewer.
        Parameters:
        viewer - the text viewer
        offset - the offset to check
        Returns:
        true if the given offset is visible in the given text viewer
        Since:
        2.1