public abstract class AbstractEditorHoverPlugin extends java.lang.Object implements EditorPlugin
AbstractEditorHoverPlugin is an abstract plugin
implementation that helps in performing code hover for Java-like languages| Constructor and Description |
|---|
AbstractEditorHoverPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
deinstall(BasicEditorPane editor)
Called when the plugin is being removed from the BasicEditorPane
(for example when the editor is closed.) This is used to notify
plugins that they should unregister any listeners that were
attached.
|
protected BasicEditorPane |
getEditor() |
protected abstract oracle.ide.hover.Hover |
getHover(BasicEditorPane editor,
java.util.List<oracle.ide.hover.HoverFlavor> flavors,
int offset,
java.awt.Rectangle rect)
Get the
Hover object if the
installHoverableEditor(BasicEditorPane) is true, and
getRectangleOffsets has returned a valid value. |
protected abstract NumberRange |
getRectangleOffsets(BasicEditorPane editor,
java.util.List<oracle.ide.hover.HoverFlavor> flavors,
int offset)
Get the offsets in the code editor for which a rectangle needs to be shown,
when a Ctrl is pressed during a mouse hover.
|
void |
install(BasicEditorPane editor)
Called when this plugin is being installed into the BasicEditorPane.
|
protected abstract boolean |
installHoverableEditor(BasicEditorPane editor)
Check whether the code hover functionality should be added to the
given editor.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
protected BasicEditorPane getEditor()
public void install(BasicEditorPane editor)
EditorPlugininstall in interface EditorPlugineditor - the editor panepublic void deinstall(BasicEditorPane editor)
EditorPlugindeinstall in interface EditorPlugineditor - the editor panepublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerprotected abstract boolean installHoverableEditor(BasicEditorPane editor)
editor - The editor paneprotected abstract NumberRange getRectangleOffsets(BasicEditorPane editor, java.util.List<oracle.ide.hover.HoverFlavor> flavors, int offset)
editor - The editor paneflavors - The flavors that can be hovered at this timeoffset - The cursor positionprotected abstract oracle.ide.hover.Hover getHover(BasicEditorPane editor, java.util.List<oracle.ide.hover.HoverFlavor> flavors, int offset, java.awt.Rectangle rect)
Hover object if the
installHoverableEditor(BasicEditorPane) is true, and
getRectangleOffsets has returned a valid value.
Only return a Hover if the flavors list contains a flavor appropriate
for that hover (i.e. *don't* return a source Hover if a source hover flavor
isn't in the flavors list)editor - The editor paneflavors - The flavors that can be hovered at this timeoffset - The cursor positionrect - The rectangle representing the offset's areaHover object