1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.jface.text.source;
15 
16 /**
17  * Extension interface for
18  * {@link org.eclipse.jface.text.source.IVerticalRulerInfo}.
19  * <p>
20  * Introduces the ability to define a custom hover to be used when hovering over
21  * the vertical ruler described by this info instance, and to specify the
22  * annotation model used by it.
23  * <p>
24  * It also allows client to register as listeners on the represented vertical
25  * ruler and sends out notifications similar to selection events such as that a
26  * particular annotation presented in the vertical ruler has been selected.
27  *
28  * @see org.eclipse.jface.text.source.IVerticalRuler
29  * @see org.eclipse.jface.text.source.IAnnotationModel
30  * @since 3.0
31  */
32 public interface IVerticalRulerInfoExtension {
33 	/**
34 	 * Returns the hover for this vertical ruler (column).
35 	 *
36 	 * @return the hover for this column
37 	 */
getHover()38 	IAnnotationHover getHover();
39 
40 	/**
41 	 * Returns the model currently used by the receiver.
42 	 *
43 	 * @return the model of the receiver, or <code>null</code> if no model is
44 	 *         installed.
45 	 */
getModel()46 	IAnnotationModel getModel();
47 
48 	/**
49 	 * Registers a vertical ruler listener to be informed if an annotation gets
50 	 * selected on the vertical ruler.
51 	 *
52 	 * @param listener the listener to be informed
53 	 */
addVerticalRulerListener(IVerticalRulerListener listener)54 	void addVerticalRulerListener(IVerticalRulerListener listener);
55 
56 	/**
57 	 * Removes a previously registered listener. If <code>listener</code> is not registered
58 	 * with the receiver, calling this method has no effect.
59 	 *
60 	 * @param listener the listener to be removed
61 	 */
removeVerticalRulerListener(IVerticalRulerListener listener)62 	void removeVerticalRulerListener(IVerticalRulerListener listener);
63 }
64