Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.ceditor
Class AbstractEditorHoverPlugin

java.lang.Object
  extended by oracle.ide.ceditor.AbstractEditorHoverPlugin
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, EditorPlugin

public abstract class AbstractEditorHoverPlugin
extends java.lang.Object
implements EditorPlugin

The AbstractEditorHoverPlugin is an abstract plugin implementation that helps in performing code hover for Java-like languages


Constructor Summary
AbstractEditorHoverPlugin()
           
 
Method Summary
 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 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, 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEditorHoverPlugin

public AbstractEditorHoverPlugin()
Method Detail

install

public void install(BasicEditorPane editor)
Description copied from interface: EditorPlugin
Called when this plugin is being installed into the BasicEditorPane.

Specified by:
install in interface EditorPlugin
Parameters:
editor - the editor pane

deinstall

public void deinstall(BasicEditorPane editor)
Description copied from interface: EditorPlugin
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.

Specified by:
deinstall in interface EditorPlugin
Parameters:
editor - the editor pane

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

installHoverableEditor

protected abstract boolean installHoverableEditor(BasicEditorPane editor)
Check whether the code hover functionality should be added to the given editor.

Parameters:
editor - The editor pane
Returns:
boolean True if a code hover functionality should be added to the given editor, false otherwise

getRectangleOffsets

protected abstract NumberRange getRectangleOffsets(BasicEditorPane editor,
                                                   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.

Parameters:
editor - The editor pane
offset - The cursor position
Returns:
NumberRange The offsets for which a rectangle needs to be shown. Null if offsets cannot be computed, or if rectangle and hover should not be shown

getHover

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. 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)

Parameters:
editor - The editor pane
flavors - The flavors that can be hovered at this time
offset - The cursor position
rect - The rectangle representing the offset's area
Returns:
Hover The Hover object

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.