Class CustomSQLBuilderActionBarContributor

  • All Implemented Interfaces:
    org.eclipse.ui.IEditorActionBarContributor

    public class CustomSQLBuilderActionBarContributor
    extends org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor
    Custom action bar contributor, copied from SQLBuilderActionBarContributor, hooking all run methods in the actions.
    Author:
    Christopher Mindus
    • Field Summary

      • Fields inherited from class org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor

        CHANGE_STATEMENT_TYPE_ACTION_ID, CONTENT_ASSIST_ACTION_ID, CONTENT_ASSIST_ACTION_PREFIX, CONTENT_TIP_ACTION_ID, CONTENT_TIP_ACTION_PREFIX, fEditMenuContentAssistAction, fEditMenuContentTipAction, fRunMenuRunSQLAction, fSQLMenuChangeStatementTypeAction, fSQLMenuOmitCurrentSchemaAction, fSQLMenuRevertToDefaultAction, fSQLMenuRevertToPreviousAction, fSQLMenuRunSQLAction, fToolBarRunSQLAction, OMIT_CURRENT_SCHEMA_ACTION_ID, REVERT_TO_DEFAULT_ACTION_ID, REVERT_TO_PREVIOUS_ACTION_ID, RUN_MENU_EXTERNAL_TOOLS_GROUP_ID, RUN_MENU_ID, RUN_MENU_RUN_SQL_ACTION_ID, RUN_SQL_ACTION_ICON_PATH, RUN_SQL_ACTION_ID, SQL_MENU_CHANGE_STATEMENT_TYPE_ACTION_ID, SQL_MENU_ID, SQL_MENU_OMIT_CURRENT_SCHEMA_ACTION_ID, SQL_MENU_REVERT_TO_DEFAULT_ACTION_ID, SQL_MENU_REVERT_TO_PREVIOUS_ACTION_ID, SQL_MENU_RUN_SQL_ACTION_ID, TOOLBAR_RUN_SQL_ACTION_ID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contributeToMenu​(org.eclipse.jface.action.IMenuManager menuManager)
      Contributes items to the given menu.
      void setActiveEditor​(org.eclipse.ui.IEditorPart activeEditor)
      Sets the active editor for the contributor to the given editor.
      void setActiveSQLBuilder​(org.eclipse.datatools.sqltools.sqlbuilder.SQLBuilder sqlBuilder)
      Changes the active builder.
      • Methods inherited from class org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor

        contributeToToolBar, dispose, getAction, init, init, setAction
      • Methods inherited from class org.eclipse.ui.texteditor.BasicTextEditorActionContributor

        contributeToStatusLine, getAction, getActiveEditorPart
      • Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor

        contributeToCoolBar, getActionBars, getPage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor
        Parameters:
        activeEditor - The new target editor.
        See Also:
        EditorActionBarContributor.setActiveEditor(org.eclipse.ui.IEditorPart)
      • setActiveSQLBuilder

        public void setActiveSQLBuilder​(org.eclipse.datatools.sqltools.sqlbuilder.SQLBuilder sqlBuilder)
        Changes the active builder.
        Overrides:
        setActiveSQLBuilder in class org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor
      • contributeToMenu

        public void contributeToMenu​(org.eclipse.jface.action.IMenuManager menuManager)
        Contributes items to the given menu. Overridden to avoid duplicate SQL menus.
        Overrides:
        contributeToMenu in class org.eclipse.datatools.sqltools.sqlbuilder.actions.SQLBuilderActionBarContributor
        Parameters:
        menuManager - the menu to which to contribute.
        See Also:
        EditorActionBarContributor.contributeToMenu(org.eclipse.jface.action.IMenuManager)