Mercurial > projects > dwt-addons
diff dwtx/jface/text/source/IAnnotationHover.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/text/source/IAnnotationHover.d Sat Aug 23 19:10:48 2008 +0200 @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module dwtx.jface.text.source.IAnnotationHover; + +import dwt.dwthelper.utils; + + + +/** + * Provides the information to be displayed in a hover popup window which + * appears over the presentation area of annotations. + * <p> + * In order to provide backward compatibility for clients of + * <code>IAnnotationHover</code>, extension interfaces are used as a means of + * evolution. The following extension interfaces exist: + * <ul> + * <li>{@link dwtx.jface.text.source.IAnnotationHoverExtension} since + * version 3.0 allowing a text hover to provide a creator for the hover control. + * This allows for sophisticated hovers in a way that information computed by + * the hover can be displayed in the best possible form.</li> + * <li>{@link dwtx.jface.text.source.IAnnotationHoverExtension2} since + * version 3.2 allowing a text hover to specify whether it handles mouse-wheel + * events itself.</li> + * </ul></p> + * <p> + * Clients may implement this interface.</p> + * + * @see dwtx.jface.text.source.IAnnotationHoverExtension + * @see dwtx.jface.text.source.IAnnotationHoverExtension2 + */ +public interface IAnnotationHover { + + /** + * Returns the text which should be presented in the a + * hover popup window. This information is requested based on + * the specified line number. + * + * @param sourceViewer the source viewer this hover is registered with + * @param lineNumber the line number for which information is requested + * @return the requested information or <code>null</code> if no such information exists + */ + String getHoverInfo(ISourceViewer sourceViewer, int lineNumber); +}