org.eclipse.datatools.sqltools.sqlbuilder.actions
Class SQLBuilderActionBarContributor

java.lang.Object
  extended by org.eclipse.ui.part.EditorActionBarContributor
      extended by org.eclipse.ui.texteditor.BasicTextEditorActionContributor
          extended by org.eclipse.ui.editors.text.TextEditorActionContributor
              extended by org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor
All Implemented Interfaces:
org.eclipse.ui.IEditorActionBarContributor

public class SQLBuilderActionBarContributor
extends org.eclipse.ui.editors.text.TextEditorActionContributor

This class provides actions for the SQL Builder editor.


Field Summary
static java.lang.String CHANGE_STATEMENT_TYPE_ACTION_ID
           
static java.lang.String CONTENT_ASSIST_ACTION_ID
           
static java.lang.String CONTENT_ASSIST_ACTION_PREFIX
           
static java.lang.String CONTENT_TIP_ACTION_ID
           
static java.lang.String CONTENT_TIP_ACTION_PREFIX
           
static java.lang.String OMIT_CURRENT_SCHEMA_ACTION_ID
           
static java.lang.String REVERT_TO_DEFAULT_ACTION_ID
           
static java.lang.String REVERT_TO_PREVIOUS_ACTION_ID
           
static java.lang.String RUN_SQL_ACTION_ID
           
 
Constructor Summary
SQLBuilderActionBarContributor()
          Constructs an instance of this class.
 
Method Summary
 void contributeToMenu(org.eclipse.jface.action.IMenuManager menuManager)
          Contributes items to the given menu.
 void contributeToToolBar(org.eclipse.jface.action.IToolBarManager tbm)
          Contributes items to the given toolbar.
 void dispose()
          Disposes of this object.
 org.eclipse.jface.action.IAction getAction(java.lang.String actionID)
          Returns the action installed under the given action id.
 void init(org.eclipse.ui.IActionBars bars)
          Initializes the contributor.
 void init(org.eclipse.ui.IActionBars bars, org.eclipse.ui.IWorkbenchPage page)
          Initializes the contributor with the given set of action bars and the given workbench page.
 void setAction(java.lang.String actionID, org.eclipse.jface.action.IAction action)
          Installs the given action under the given action id.
 void setActiveEditor(org.eclipse.ui.IEditorPart activeEditor)
          Sets the active editor for the contributor to the given editor.
 void setActiveSQLBuilder(SQLBuilder sqlBuilder)
           
 
Methods inherited from class org.eclipse.ui.texteditor.BasicTextEditorActionContributor
contributeToStatusLine
 
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor
contributeToCoolBar, getActionBars, getPage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_ASSIST_ACTION_ID

public static final java.lang.String CONTENT_ASSIST_ACTION_ID
See Also:
Constant Field Values

CONTENT_ASSIST_ACTION_PREFIX

public static final java.lang.String CONTENT_ASSIST_ACTION_PREFIX
See Also:
Constant Field Values

CONTENT_TIP_ACTION_ID

public static final java.lang.String CONTENT_TIP_ACTION_ID
See Also:
Constant Field Values

CONTENT_TIP_ACTION_PREFIX

public static final java.lang.String CONTENT_TIP_ACTION_PREFIX
See Also:
Constant Field Values

RUN_SQL_ACTION_ID

public static final java.lang.String RUN_SQL_ACTION_ID
See Also:
Constant Field Values

REVERT_TO_PREVIOUS_ACTION_ID

public static final java.lang.String REVERT_TO_PREVIOUS_ACTION_ID
See Also:
Constant Field Values

REVERT_TO_DEFAULT_ACTION_ID

public static final java.lang.String REVERT_TO_DEFAULT_ACTION_ID
See Also:
Constant Field Values

CHANGE_STATEMENT_TYPE_ACTION_ID

public static final java.lang.String CHANGE_STATEMENT_TYPE_ACTION_ID
See Also:
Constant Field Values

OMIT_CURRENT_SCHEMA_ACTION_ID

public static final java.lang.String OMIT_CURRENT_SCHEMA_ACTION_ID
See Also:
Constant Field Values
Constructor Detail

SQLBuilderActionBarContributor

public SQLBuilderActionBarContributor()
Constructs an instance of this class. This is the default constructor.

Method Detail

contributeToMenu

public void contributeToMenu(org.eclipse.jface.action.IMenuManager menuManager)
Contributes items to the given menu.

Overrides:
contributeToMenu in class org.eclipse.ui.editors.text.TextEditorActionContributor
Parameters:
menuManager - the menu to which to contribute
See Also:
EditorActionBarContributor.contributeToMenu(org.eclipse.jface.action.IMenuManager)

contributeToToolBar

public void contributeToToolBar(org.eclipse.jface.action.IToolBarManager tbm)
Contributes items to the given toolbar.

Overrides:
contributeToToolBar in class org.eclipse.ui.part.EditorActionBarContributor
Parameters:
tbm - the toolbar to which to contribute
See Also:
EditorActionBarContributor.contributeToToolBar(org.eclipse.jface.action.IToolBarManager)

dispose

public void dispose()
Disposes of this object.

Specified by:
dispose in interface org.eclipse.ui.IEditorActionBarContributor
Overrides:
dispose in class org.eclipse.ui.editors.text.TextEditorActionContributor

getAction

public org.eclipse.jface.action.IAction getAction(java.lang.String actionID)
Returns the action installed under the given action id.

Parameters:
actionID - the ID of the action wanted
Returns:
the action, or null if none
See Also:
setAction(String, IAction)

init

public void init(org.eclipse.ui.IActionBars bars)
Initializes the contributor. The contributor is expected to add contributions as required to the action bars and global action handlers.

Overrides:
init in class org.eclipse.ui.editors.text.TextEditorActionContributor
See Also:
EditorActionBarContributor.init(org.eclipse.ui.IActionBars)

init

public void init(org.eclipse.ui.IActionBars bars,
                 org.eclipse.ui.IWorkbenchPage page)
Initializes the contributor with the given set of action bars and the given workbench page.

Specified by:
init in interface org.eclipse.ui.IEditorActionBarContributor
Overrides:
init in class org.eclipse.ui.part.EditorActionBarContributor
See Also:
IEditorActionBarContributor.init(org.eclipse.ui.IActionBars, org.eclipse.ui.IWorkbenchPage)

setAction

public void setAction(java.lang.String actionID,
                      org.eclipse.jface.action.IAction action)
Installs the given action under the given action id.

Parameters:
actionID - the action ID to set
action - the action associated with the action ID
See Also:
getAction(String)

setActiveEditor

public void setActiveEditor(org.eclipse.ui.IEditorPart activeEditor)
Sets the active editor for the contributor to the given editor.

Specified by:
setActiveEditor in interface org.eclipse.ui.IEditorActionBarContributor
Overrides:
setActiveEditor in class org.eclipse.ui.editors.text.TextEditorActionContributor
Parameters:
activeEditor - the new target editor
See Also:
EditorActionBarContributor.setActiveEditor(org.eclipse.ui.IEditorPart)

setActiveSQLBuilder

public void setActiveSQLBuilder(SQLBuilder sqlBuilder)