This interface defines a visual component which may serve text viewers as an annotation presentation area. Implementers of this interface have to define the presentation modus. This can either depend on the connected viewer's view port or not. If the modus is view port dependent the ruler only shows those annotations that are attached to document regions that are visible in the view port. If independent, the presented annotations can also be attached to invisible document regions. This interfaces comprises three contracts:
- The vertical ruler retrieves the annotations it presents from an annotation model.
- The ruler is a visual component which must be integrated in a hierarchy of SWT controls.
- The ruler provides interested clients with mapping and interaction information. This covers the mapping between coordinates of the ruler's control and line numbers based on the connected text viewer's document (see {@link org.eclipse.jface.text.source.IVerticalRulerInfo}).
In order to provide backward compatibility for clients of IVerticalRuler
, extension interfaces are used as a means of evolution. The following extension interfaces exist:
- {@link org.eclipse.jface.text.source.IVerticalRulerExtension} sinceversion 2.0 introducing setters for font and mouse button activity location.
Clients may implement this interface or use the default implementation provided by {@link org.eclipse.jface.text.source.CompositeRuler} and{@link org.eclipse.jface.text.source.VerticalRuler}.
@see org.eclipse.jface.text.source.IVerticalRulerExtension
@see org.eclipse.jface.text.ITextViewer