Mercurial > projects > dwt-addons
comparison dwtx/jface/text/ITextHoverExtension2.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 |
comparison
equal
deleted
inserted
replaced
128:8df1d4193877 | 129:eb30df5ca28b |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2008 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.jface.text.ITextHoverExtension2; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 | |
18 /** | |
19 * Extension interface for {@link dwtx.jface.text.ITextHover}. | |
20 * <p> | |
21 * Provides a way for hovers to return hover-specific information objects. | |
22 * </p> | |
23 * | |
24 * @see dwtx.jface.text.ITextHover | |
25 * @since 3.4 | |
26 */ | |
27 public interface ITextHoverExtension2 { | |
28 | |
29 /** | |
30 * Returns the information which should be presented when a hover popup is shown | |
31 * for the specified hover region. The hover region has the same semantics | |
32 * as the region returned by {@link ITextHover#getHoverRegion(ITextViewer, int)}. | |
33 * If the returned information is <code>null</code>, no hover popup will be shown. | |
34 * <p> | |
35 * <strong>Note:</strong> Implementers have to ensure that {@link ITextHoverExtension#getHoverControlCreator()} | |
36 * returns {@link IInformationControl}s that implement | |
37 * {@link IInformationControlExtension2} and whose | |
38 * {@link IInformationControlExtension2#setInput(Object)} can handle the | |
39 * information objects returned by this method.</p> | |
40 * <p> | |
41 * Callers should ignore the text returned by {@link ITextHover#getHoverInfo(ITextViewer, IRegion)}.</p> | |
42 * | |
43 * @param textViewer the viewer on which the hover popup should be shown | |
44 * @param hoverRegion the text range in the viewer which is used to determine | |
45 * the hover display information | |
46 * @return the hover popup display information, or <code>null</code> if none available | |
47 */ | |
48 Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion); | |
49 | |
50 } |