Class ChangeRulerColumn

    • Constructor Detail

      • ChangeRulerColumn

        public ChangeRulerColumn​(ISharedTextColors sharedColors)
        Creates a new revision ruler column.
        Parameters:
        sharedColors - the colors to look up RGBs
        Since:
        3.2
    • Method Detail

      • handleDispose

        protected void handleDispose()
        Disposes the column's resources.
      • getVisibleLinesInViewport

        @Deprecated
        protected int getVisibleLinesInViewport()
        Deprecated.
        as of 3.2 the number of lines in the viewport cannot be computed because StyledText supports variable line heights
        Returns the view port height in lines.
        Returns:
        the view port height in lines
      • isViewerCompletelyShown

        protected final boolean isViewerCompletelyShown()
        Returns true if the viewport displays the entire viewer contents, i.e. the viewer is not vertically scrollable.
        Returns:
        true if the viewport displays the entire contents, false otherwise
        Since:
        3.2
      • getLineOfLastMouseButtonActivity

        public int getLineOfLastMouseButtonActivity()
        Description copied from interface: IVerticalRulerInfo
        Returns the line number of the last mouse button activity. Based on the input document of the connected text viewer.
        Specified by:
        getLineOfLastMouseButtonActivity in interface IVerticalRulerInfo
        Returns:
        the line number of the last mouse button activity or -1 if the last mouse activity does not correspond to a valid document line
      • toDocumentLineNumber

        public int toDocumentLineNumber​(int y_coordinate)
        Description copied from interface: IVerticalRulerInfo
        Translates a y-coordinate of the ruler's SWT control into the according line number of the document of the connected text viewer.
        Specified by:
        toDocumentLineNumber in interface IVerticalRulerInfo
        Parameters:
        y_coordinate - a y-coordinate of the ruler's SWT control
        Returns:
        the line number of that coordinate or -1 if that coordinate does not correspond to a valid document line
      • setHover

        public void setHover​(IAnnotationHover hover)
        Description copied from interface: IChangeRulerColumn
        Sets the hover of this ruler column.
        Specified by:
        setHover in interface IChangeRulerColumn
        Parameters:
        hover - the hover that will produce hover information text for this ruler column
      • setModel

        public void setModel​(IAnnotationModel model)
        Description copied from interface: IVerticalRulerColumn
        Associates an annotation model with this ruler column. A value null is acceptable and clears the ruler.
        Specified by:
        setModel in interface IVerticalRulerColumn
        Parameters:
        model - the new annotation model, may be null
      • setBackground

        public void setBackground​(Color background)
        Description copied from interface: IChangeRulerColumn
        Sets the background color for normal lines. The color has to be disposed of by the caller when the receiver is no longer used.
        Specified by:
        setBackground in interface IChangeRulerColumn
        Parameters:
        background - the new color to be used as standard line background
      • setAddedColor

        public void setAddedColor​(Color addedColor)
        Description copied from interface: IChangeRulerColumn
        Sets the background color for added lines. The color has to be disposed of by the caller when the receiver is no longer used.
        Specified by:
        setAddedColor in interface IChangeRulerColumn
        Parameters:
        addedColor - the new color to be used for the added lines background
      • setChangedColor

        public void setChangedColor​(Color changedColor)
        Description copied from interface: IChangeRulerColumn
        Sets the background color for changed lines. The color has to be disposed of by the caller when the receiver is no longer used.
        Specified by:
        setChangedColor in interface IChangeRulerColumn
        Parameters:
        changedColor - the new color to be used for the changed lines background
      • setDeletedColor

        public void setDeletedColor​(Color deletedColor)
        Description copied from interface: IChangeRulerColumn
        Sets the color for the deleted lines indicator. The color has to be disposed of by the caller when the receiver is no longer used.
        Specified by:
        setDeletedColor in interface IChangeRulerColumn
        Parameters:
        deletedColor - the new color to be used for the deleted lines indicator.
      • postRedraw

        protected final void postRedraw()
        Triggers a redraw in the display thread.
      • getRevisionSelectionProvider

        public ISelectionProvider getRevisionSelectionProvider()
        Returns the revision selection provider.
        Returns:
        the revision selection provider
        Since:
        3.2