oracle.jdeveloper.ceditor
Interface CEToolTipProvider
- public interface CEToolTipProvider
The CEToolTipProvider
is an interface for the
code editor to ask an editor client for an appropriate tooltip to
display based on the given location of the mouse event. This could
be useful for example, for a debugger that wants to display the
value of a variable when the mouse is moved over a variable, or for
code editing to display a class hierarchy when the mouse is moved
over a class name.
In order to register for tooltips, implement this interface, and
register it with a specific code editor to be asked for tooltips.
When your getToolTipText()
method is called, provide
the tool tip text that should be displayed to the user. Note that
this text String can be html content for formatting purposes
(for example, "<html><body>Show<i>
tooltip</i>info</body></html>"
.)
- See Also:
CodeEditor
Method Summary |
java.lang.String |
getToolTipText(CodeEditor codeEditor,
java.awt.event.MouseEvent mouseEvent,
int offset)
Requests from the listening client an appropriate tooltip to
display for the given editor. |
getToolTipText
public java.lang.String getToolTipText(CodeEditor codeEditor,
java.awt.event.MouseEvent mouseEvent,
int offset)
- Requests from the listening client an appropriate tooltip to
display for the given editor. The mouseEvent describes where the
cursor is an what the mouse event was (i.e., mouse moved), and
the offset is the location in the editor (document) corresponding
to the current mouse cursor.
- Parameters:
codeEditor
- the code editor where the tooltip will be displayedmouseEvent
- the mouse event that generated the tooltipoffset
- the document offset where the mouse cursor is located- Returns:
- the tooltip text to display