Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.ide.ceditor
Class AbstractBrowseClickPlugin

java.lang.Object
  extended by oracle.javatools.editor.plugins.AbstractClickPlugin
      extended by oracle.ide.ceditor.AbstractBrowseClickPlugin

All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, EditorPlugin

public abstract class AbstractBrowseClickPlugin
extends AbstractClickPlugin

The AbstractBrowseClickPlugin is an assistance plugin that listens for Ctrl-Click's to perform "Go to declaration" functionality


Field Summary
protected  java.lang.String _lastStatusText
          The last status text this plugin set into the IDE status bar.
protected static int ACTION_DECLARATION
          The action constant for "Go to declaration".

 

Fields inherited from class oracle.javatools.editor.plugins.AbstractClickPlugin
ACTION_NONE, ALL_MODIFIER_MASK, DEFAULT_DELAY_TIME

 

Constructor Summary
AbstractBrowseClickPlugin()
           

 

Method Summary
protected  int getActionTypeFor(java.awt.event.MouseEvent event)
          Fetch the subclass-specific action type that corresponds to the given event (which may be a mouse moved, or mouse clicked event).
protected  HighlightStyle getHighlightStyleFor(int actionType)
          Fetch the HighlightStyle which should be used for highlighting the a given region for the specified action type.
protected  java.lang.String getHintTextFor(int actionType)
          Fetch the hint text that should be displayed in the editor status bar for the given action type.
protected abstract  NumberRange getIdentifierAtOffset(int offset)
          Utility routine to determine the identifier at the given offset, or null if there is none.
protected  NumberRange getRegionFor(int offset, int actionType)
          Fetch the NumberRange instance for the underlinable region that includes the given offset.
protected  void handleClickAction(java.awt.Point clickPoint, int actionType)
          Perform the subclass-specific click action at the given click point, and action type.
protected abstract  void performDeclarationClick(java.awt.Point point)
          Utility routine to handle the control/meta click on the given click location.
static void registerHighlights()
           
protected  void updateHint(int actionType)
          Update the current hint text that is displayed in the editor.

 

Methods inherited from class oracle.javatools.editor.plugins.AbstractClickPlugin
actionPerformed, caretUpdate, deinstall, getDocument, getEditorPane, getTextBuffer, getUpdateDelayTime, hasModifierEx, install, isActionTrigger, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, propertyChange, updateHighlight

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ACTION_DECLARATION

protected static final int ACTION_DECLARATION
The action constant for "Go to declaration".
See Also:
Constant Field Values

_lastStatusText

protected java.lang.String _lastStatusText
The last status text this plugin set into the IDE status bar. We do not clear the IDE status bar unless it matches what we set.

Constructor Detail

AbstractBrowseClickPlugin

public AbstractBrowseClickPlugin()

Method Detail

getActionTypeFor

protected int getActionTypeFor(java.awt.event.MouseEvent event)
Fetch the subclass-specific action type that corresponds to the given event (which may be a mouse moved, or mouse clicked event).
Specified by:
getActionTypeFor in class AbstractClickPlugin
Parameters:
event - the mouse event that occurred
Returns:
the action type for the given modifiers of the event, or ACTION_NONE if the event should be ignored

handleClickAction

protected void handleClickAction(java.awt.Point clickPoint,
                                 int actionType)
Perform the subclass-specific click action at the given click point, and action type. The action type was returned by getActionTypeFor() for the mouse click event.
Specified by:
handleClickAction in class AbstractClickPlugin
Parameters:
clickPoint - the click point where the mouse click event occurred
actionType - the action type the modifiers on the event mapped to

getHighlightStyleFor

protected HighlightStyle getHighlightStyleFor(int actionType)
Fetch the HighlightStyle which should be used for highlighting the a given region for the specified action type.
Specified by:
getHighlightStyleFor in class AbstractClickPlugin
Parameters:
actionType - the action type the modifiers map to
Returns:
the highlhight style that should be used

getHintTextFor

protected java.lang.String getHintTextFor(int actionType)
Fetch the hint text that should be displayed in the editor status bar for the given action type.
Specified by:
getHintTextFor in class AbstractClickPlugin
Parameters:
actionType - the action type the modifiers map to
Returns:
the hint text (if any) that should be displayed

getRegionFor

protected NumberRange getRegionFor(int offset,
                                   int actionType)
Fetch the NumberRange instance for the underlinable region that includes the given offset.
Specified by:
getRegionFor in class AbstractClickPlugin
Parameters:
offset - the offset the mouse hovered over
actionType - the action type based on the modifiers of the event
Returns:
the NumberRange for any underlinable region, or null for none

updateHint

protected void updateHint(int actionType)
Update the current hint text that is displayed in the editor.
Overrides:
updateHint in class AbstractClickPlugin
Parameters:
actionType - the subclass-specific action type

performDeclarationClick

protected abstract void performDeclarationClick(java.awt.Point point)
Utility routine to handle the control/meta click on the given click location.

getIdentifierAtOffset

protected abstract NumberRange getIdentifierAtOffset(int offset)
Utility routine to determine the identifier at the given offset, or null if there is none.
Parameters:
offset - the offset to check
Returns:
the start/end offset range for the identifier at the offset, or null if there is none

registerHighlights

public static void registerHighlights()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


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