## org.eclipse.datatools.sqltools.sqleditor
Class SQLEditorActionContributorExtension

    java.lang.Object
      org.eclipse.datatools.sqltools.sqleditor.SQLEditorActionContributorExtension

All Implemented Interfaces:
  ISQLEditorActionContributorExtension

public class SQLEditorActionContributorExtension
extends java.lang.Object
implements ISQLEditorActionContributorExtension

This class is for tooling vendor who wish to extend the sql dev tools to contribute workbench menu, toolbar item and context menus.

Author:
  Hui Cao
See Also:
  `point: org.eclipse.datatools.sqltools.sqleditor.actionextension`

Field Summary

Fields inherited from interface org.eclipse.datatools.sqltools.sqleditor.ISQLEditorActionContributorExtension
`EDITOR_ID_ALL`

Constructor Summary
`SQLEditorActionContributorExtension()`

Method Summary
`void` `contributeToContextMenu(IMenuManager mm)` Contributes to the given SQLEditor context menu.
`void` `contributeToCoolBar(ICoolBarManager coolBarManager)` Contributes to the given cool bar.
`void` `contributeToMenu(IMenuManager menuManager)` Contributes to the given menu.
`void` `contributeToStatusLine(IStatusLineManager statusLineManager)` Contributes to the given status line.
`void` `contributeToToolBar(IToolBarManager toolBarManager)` Contributes to the given tool bar.
`void` `dispose()` Disposes this contributor.
`java.lang.String` `getEditorId()` Returns the editor id that this contributor is interested in
`TextEditorActionContributor` `getParent()`
`void` `init(IActionBars bars, IWorkbenchPage page)` Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.
`void` `menuAboutToShow(IMenuManager manager)` Receives notification that the workbench menu is about to show.
`void` `setActiveEditor(SQLEditor targetEditor)` Sets the active editor for the contributor.
`void` `setInitializationData(IConfigurationElement config, java.lang.String propertyName, java.lang.Object data)`
`void` `setParent(TextEditorActionContributor parent)`
`void` `updateAction()`

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

Constructor Detail

### SQLEditorActionContributorExtension

    public SQLEditorActionContributorExtension()

Method Detail

### getParent

    public TextEditorActionContributor getParent()

### setParent

    public void setParent(TextEditorActionContributor parent)

  Specified by:
    `setParent` in interface `ISQLEditorActionContributorExtension`

### getEditorId

    public java.lang.String getEditorId()

  Returns the editor id that this contributor is interested in

  Returns:

### setInitializationData

    public void setInitializationData(IConfigurationElement config,
                                      java.lang.String propertyName,
                                      java.lang.Object data)
                               throws CoreException

  Throws:
    `CoreException`

### setActiveEditor

    public void setActiveEditor(SQLEditor targetEditor)

  Description copied from interface: `ISQLEditorActionContributorExtension`
  Sets the active editor for the contributor. Implementors should disconnect from the old editor, connect to the new editor, and update the actions to reflect the new editor.

  Specified by:
    `setActiveEditor` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `targetEditor` - the new editor target

### init

    public void init(IActionBars bars,
                     IWorkbenchPage page)

  Description copied from interface: `ISQLEditorActionContributorExtension`
  Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.

  The page is passed to support the use of `RetargetAction` by the contributor. In this case the init method implementors should:

  - 1) set retarget actions as global action handlers
  - 2) add the retarget actions as part listeners
  - 3) get the active part and if not `null` call partActivated on the retarget actions

  And in the dispose method the retarget actions should be removed as part listeners.

  Specified by:
    `init` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `bars` - the action bars
    `page` - the workbench page for this contributor

### contributeToMenu

    public void contributeToMenu(IMenuManager menuManager)

  Contributes to the given menu.

  The `SQLEditorActionContributorExtension` implementation of this method does nothing. Subclasses may reimplement to add to the menu portion of this contribution.

  Specified by:
    `contributeToMenu` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `menuManager` - the manager that controls the menu

### menuAboutToShow

    public void menuAboutToShow(IMenuManager manager)

  Receives notification that the workbench menu is about to show.

  Specified by:
    `menuAboutToShow` in interface `ISQLEditorActionContributorExtension`

### contributeToStatusLine

    public void contributeToStatusLine(IStatusLineManager statusLineManager)

  Contributes to the given status line.

  The `SQLEditorActionContributorExtension` implementation of this method does nothing. Subclasses may reimplement to add to the status line portion of this contribution.

  Specified by:
    `contributeToStatusLine` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `statusLineManager` - the manager of the status line

### contributeToToolBar

    public void contributeToToolBar(IToolBarManager toolBarManager)

  Contributes to the given tool bar.

  The `SQLEditorActionContributorExtension` implementation of this method does nothing. Subclasses may reimplement to add to the tool bar portion of this contribution.

  Specified by:
    `contributeToToolBar` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `toolBarManager` - the manager that controls the workbench tool bar

### contributeToCoolBar

    public void contributeToCoolBar(ICoolBarManager coolBarManager)

  Contributes to the given cool bar.

  The `SQLEditorActionContributorExtension` implementation of this method does nothing. Subclasses may reimplement to add to the cool bar portion of this contribution. There can only be conributions from a cool bar or a tool bar.

  Specified by:
    `contributeToCoolBar` in interface `ISQLEditorActionContributorExtension`
  Parameters:
    `coolBarManager` - the manager that controls the workbench cool bar.

### contributeToContextMenu

    public void contributeToContextMenu(IMenuManager mm)

  Description copied from interface: `ISQLEditorActionContributorExtension`
  Contributes to the given SQLEditor context menu.

  Specified by:
    `contributeToContextMenu` in interface `ISQLEditorActionContributorExtension`

### dispose

    public void dispose()

  Description copied from interface: `ISQLEditorActionContributorExtension`
  Disposes this contributor.

  Specified by:
    `dispose` in interface `ISQLEditorActionContributorExtension`

### updateAction

    public void updateAction()

  Specified by:
    `updateAction` in interface `ISQLEditorActionContributorExtension`

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.