org.eclipse.datatools.enablement.ingres.internal.ui.plan
Class IngresExplainSQLActionDelegate

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by org.eclipse.datatools.sqltools.sqleditor.plan.BaseExplainAction
                  extended by org.eclipse.datatools.enablement.ingres.internal.ui.plan.IngresExplainSQLActionDelegate
All Implemented Interfaces:
org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.IActionDelegate, org.eclipse.ui.IEditorActionDelegate, org.eclipse.ui.texteditor.IUpdate

public class IngresExplainSQLActionDelegate
extends BaseExplainAction
implements org.eclipse.ui.IEditorActionDelegate, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.texteditor.IUpdate

Action class to explain the selected SQL statements in SQL Editor or Routine Editor Basically a copy of org.eclipse.datatools.sqltools.sqleditor.plan.ExplainSQLActionDelegate with extension to be used as additional action in the SQLEditorService. XXX This class is for provisional usage only. It's obsolete when a menu entry for QEP generation is available.

Author:
enrico.schenk@ingres.com

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
IngresExplainSQLActionDelegate()
           
 
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 run(org.eclipse.jface.action.IAction action)
           
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
           
 void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          Updates the action when selection changes
 void setActiveEditor(org.eclipse.jface.action.IAction action, org.eclipse.ui.IEditorPart targetEditor)
           
 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

IngresExplainSQLActionDelegate

public IngresExplainSQLActionDelegate()
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 -

setActiveEditor

public void setActiveEditor(org.eclipse.jface.action.IAction action,
                            org.eclipse.ui.IEditorPart targetEditor)
Specified by:
setActiveEditor in interface org.eclipse.ui.IEditorActionDelegate

run

public void run(org.eclipse.jface.action.IAction action)
Specified by:
run in interface org.eclipse.ui.IActionDelegate

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate