Class AnnotationBarHoverManager


  • public class AnnotationBarHoverManager
    extends AbstractHoverInformationControlManager
    This manager controls the layout, content, and visibility of an information control in reaction to mouse hover events issued by the vertical ruler of a source viewer.
    Since:
    2.0
    • Field Detail

      • fAllowMouseExit

        protected boolean fAllowMouseExit
        Indicates whether the mouse cursor is allowed to leave the subject area without closing the hover.
        Since:
        3.0
    • Constructor Detail

      • AnnotationBarHoverManager

        public AnnotationBarHoverManager​(IVerticalRulerInfo rulerInfo,
                                         ISourceViewer sourceViewer,
                                         IAnnotationHover annotationHover,
                                         IInformationControlCreator creator)
        Creates an annotation hover manager with the given parameters. In addition, the hovers anchor is RIGHT and the margin is 5 points to the right.
        Parameters:
        rulerInfo - the vertical ruler this manager connects to
        sourceViewer - the source viewer this manager connects to
        annotationHover - the annotation hover providing the information to be displayed or null if none
        creator - the information control creator
        Since:
        2.1
    • Method Detail

      • getAnnotationHover

        protected IAnnotationHover getAnnotationHover()
        Returns the annotation hover for this hover manager.
        Returns:
        the annotation hover for this hover manager or null if none
        Since:
        2.1
      • getSourceViewer

        protected ISourceViewer getSourceViewer()
        Returns the source viewer for this hover manager.
        Returns:
        the source viewer for this hover manager
        Since:
        2.1
      • getVerticalRulerInfo

        protected IVerticalRulerInfo getVerticalRulerInfo()
        Returns the vertical ruler info for this hover manager
        Returns:
        the vertical ruler info for this hover manager
        Since:
        2.1
      • computeInformationControlLocation

        protected Point computeInformationControlLocation​(Rectangle subjectArea,
                                                          Point controlSize)
        Description copied from class: AbstractInformationControlManager
        Computes the location of the information control depending on the subject area and the size of the information control. This method attempts to find a location at which the information control lies completely in the display's client area while honoring the manager's default anchor. If this isn't possible using the default anchor, the fallback anchors are tried out.
        Overrides:
        computeInformationControlLocation in class AbstractInformationControlManager
        Parameters:
        subjectArea - the information area
        controlSize - the size of the information control
        Returns:
        the computed location of the information control
      • computeLocation

        protected Point computeLocation​(Rectangle subjectArea,
                                        Point controlSize,
                                        AbstractInformationControlManager.Anchor anchor)
        Description copied from class: AbstractInformationControlManager
        Computes the display location of the information control. The location is computed considering the given subject area, the anchor at the subject area, and the size of the information control. This method does not care about whether the information control would be completely visible when placed at the result location.
        Overrides:
        computeLocation in class AbstractInformationControlManager
        Parameters:
        subjectArea - the subject area
        controlSize - the size of the information control
        anchor - the anchor at the subject area
        Returns:
        the display location of the information control
      • getCurrentAnnotationHover

        public IAnnotationHover getCurrentAnnotationHover()
        Returns the currently shown annotation hover or null if none hover is shown.
        Returns:
        the currently shown annotation hover or null
        Since:
        3.2
      • getInternalAccessor

        public org.eclipse.jface.internal.text.InternalAccessor getInternalAccessor()
        Returns an adapter that gives access to internal methods.

        Note: This method is not intended to be referenced or overridden by clients.

        Overrides:
        getInternalAccessor in class AbstractHoverInformationControlManager
        Returns:
        the replaceable information control accessor
        Since:
        3.4
        Restriction:
        This method is not intended to be referenced by clients.
        Restriction:
        This method is not intended to be re-implemented or extended by clients.