KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > source > IAnnotationHover


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text.source;
12
13
14
15 /**
16  * Provides the information to be displayed in a hover popup window which
17  * appears over the presentation area of annotations.
18  * <p>
19  * In order to provide backward compatibility for clients of
20  * <code>IAnnotationHover</code>, extension interfaces are used as a means of
21  * evolution. The following extension interfaces exist:
22  * <ul>
23  * <li>{@link org.eclipse.jface.text.source.IAnnotationHoverExtension} since
24  * version 3.0 allowing a text hover to provide a creator for the hover control.
25  * This allows for sophisticated hovers in a way that information computed by
26  * the hover can be displayed in the best possible form.</li>
27  * <li>{@link org.eclipse.jface.text.source.IAnnotationHoverExtension2} since
28  * version 3.2 allowing a text hover to specify whether it handles mouse-wheel
29  * events itself.</li>
30  * </ul></p>
31  * <p>
32  * Clients may implement this interface.</p>
33  *
34  * @see org.eclipse.jface.text.source.IAnnotationHoverExtension
35  */

36 public interface IAnnotationHover {
37
38     /**
39      * Returns the text which should be presented in the a
40      * hover popup window. This information is requested based on
41      * the specified line number.
42      *
43      * @param sourceViewer the source viewer this hover is registered with
44      * @param lineNumber the line number for which information is requested
45      * @return the requested information or <code>null</code> if no such information exists
46      */

47     String JavaDoc getHoverInfo(ISourceViewer sourceViewer, int lineNumber);
48 }
49
Popular Tags