Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Interface ITextHover

All Known Implementing Classes:
DefaultTextHover

public interface ITextHover

Computes the information to be shown in a hover popup which appears on top of the text viewer's text widget when a hover event occurs. If the text hover does not provide information no hover popup is shown. Any implementer of this interface must be capable of operating in a non-UI thread.

In order to provide backward compatibility for clients of ITextHover, extension interfaces are used as a means of evolution. The following extension interfaces exist:

  • ITextHoverExtension 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.
  • ITextHoverExtension2 since version 3.4 allowing a text hover to return hover-specific information objects.

Clients may implement this interface.

See Also:
ITextHoverExtension, ITextHoverExtension2, ITextViewer

Method Summary
  String getHoverInfo ( ITextViewer textViewer, IRegion hoverRegion)
          Deprecated. As of 3.4, replaced by ITextHoverExtension2.getHoverInfo2(ITextViewer, IRegion)
  IRegion getHoverRegion ( ITextViewer textViewer, int offset)
          Returns the text region which should serve as the source of information to compute the hover popup display information.
 

Method Detail

getHoverInfo


String getHoverInfo(
ITextViewer textViewer,
                    
IRegion hoverRegion)
Deprecated. As of 3.4, replaced by ITextHoverExtension2.getHoverInfo2(ITextViewer, IRegion)

Returns the information which should be presented when a hover popup is shown for the specified hover region. The hover region has the same semantics as the region returned by getHoverRegion. If the returned information is null or empty no hover popup will be shown.

Parameters:
textViewer - the viewer on which the hover popup should be shown
hoverRegion - the text range in the viewer which is used to determine the hover display information
Returns:
the hover popup display information, or null if none available

getHoverRegion


IRegion getHoverRegion(
ITextViewer textViewer,
                       int offset)
Returns the text region which should serve as the source of information to compute the hover popup display information. The popup has been requested for the given offset.

For example, if hover information can be provided on a per method basis in a source viewer, the offset should be used to find the enclosing method and the source range of the method should be returned.

Parameters:
textViewer - the viewer on which the hover popup should be shown
offset - the offset for which the hover request has been issued
Returns:
the hover region used to compute the hover display information

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire