## org.eclipse.datatools.sqltools.sqleditor.plan
Class ExplainSQLActionDelegate

    java.lang.Object
      org.eclipse.core.commands.common.EventManager
          org.eclipse.jface.action.AbstractAction
              org.eclipse.jface.action.Action
                  org.eclipse.datatools.sqltools.sqleditor.plan.BaseExplainAction
                      org.eclipse.datatools.sqltools.sqleditor.plan.ExplainSQLActionDelegate

All Implemented Interfaces:
  org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.texteditor.IUpdate

Direct Known Subclasses:
  ExplainRoutineActionDelegate

    public class ExplainSQLActionDelegate

extends BaseExplainAction
implements org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.texteditor.IUpdate

Action class to explain the selected SQL statements in SQL Editor or Routine Editor

Author:
  Hui Cao, Dafan Yang

Field Summary

Fields inherited from interface org.eclipse.jface.action.IAction
`AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT`

Constructor Summary
`ExplainSQLActionDelegate(SQLEditor targetEditor)` Constructor

Method Summary
`org.eclipse.datatools.sqltools.core.DatabaseIdentifier` `getDatabaseIdentifier()` Subclass should implement this method to returns the database identifier
`java.lang.Runnable` `getPostRun()` Sets the focus to the editor after the execution plan is shown
`java.lang.String` `getSQLStatements()` Subclass should implement this method to returns the SQL statement
`void` `selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)` Updates the action when selection changes
`void` `setActiveEditor(SQLEditor targetEditor)`
`void` `update()`

Methods inherited from class org.eclipse.datatools.sqltools.sqleditor.plan.BaseExplainAction
`getPlanRequest, run`

Methods inherited from class org.eclipse.jface.action.Action

`convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText`

Methods inherited from class org.eclipse.jface.action.AbstractAction
`addPropertyChangeListener, removePropertyChangeListener`

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

Methods inherited from interface org.eclipse.jface.action.IAction
`addPropertyChangeListener, removePropertyChangeListener`

Constructor Detail

### ExplainSQLActionDelegate

    public ExplainSQLActionDelegate(SQLEditor targetEditor)

  Constructor

  Parameters:
    `targetEditor` - the editor in which this action will be applied

Method Detail

### setActiveEditor

    public void setActiveEditor(SQLEditor targetEditor)

### update

    public void update()

  Specified by:
    `update` in interface `org.eclipse.ui.texteditor.IUpdate`

### getDatabaseIdentifier

    public org.eclipse.datatools.sqltools.core.DatabaseIdentifier getDatabaseIdentifier()

  Description copied from class: `BaseExplainAction`
  Subclass should implement this method to returns the database identifier

  Specified by:
    `getDatabaseIdentifier` in class `BaseExplainAction`
  Returns:
    the database identifier

### getSQLStatements

    public java.lang.String getSQLStatements()

  Description copied from class: `BaseExplainAction`
  Subclass should implement this method to returns the SQL statement

  Specified by:
    `getSQLStatements` in class `BaseExplainAction`
  Returns:
    the SQL statement

### getPostRun

    public java.lang.Runnable getPostRun()

  Sets the focus to the editor after the execution plan is shown

  Specified by:
    `getPostRun` in class `BaseExplainAction`
  Returns:
    the post runnable

### selectionChanged

    public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)

  Updates the action when selection changes

  Specified by:
    `selectionChanged` in interface `org.eclipse.jface.viewers.ISelectionChangedListener`
  Parameters:
    `event` -