Search in sources :

Example 36 with IToolBarManager

use of org.eclipse.jface.action.IToolBarManager in project tdi-studio-se by Talend.

the class AbstractJvmPropertySection method deactivateSection.

/**
     * Deactivates the section.
     */
protected void deactivateSection() {
    isSectionActivated = false;
    if (pageBook.isDisposed() || messagePage.isDisposed() || messageLabel.isDisposed()) {
        return;
    }
    // remove tool bar actions
    IToolBarManager toolBarManager = getToolBarManager();
    if (toolBarManager != null) {
        removeToolBarActions(toolBarManager);
        toolBarManager.update(false);
        updateActionBars();
    }
    // remove local menus
    IMenuManager menuManager = getMenuManager();
    if (menuManager != null) {
        menuManager.remove(preferencesAction.getId());
        removeLocalMenus(menuManager);
        menuManager.update(false);
        updateActionBars();
    }
    // clear status line
    clearStatusLine();
}
Also used : IToolBarManager(org.eclipse.jface.action.IToolBarManager) IMenuManager(org.eclipse.jface.action.IMenuManager)

Example 37 with IToolBarManager

use of org.eclipse.jface.action.IToolBarManager in project tdi-studio-se by Talend.

the class TalendPaletteHelper method updatePaletteActions.

private static void updatePaletteActions(IActionBars actionBars, IAction action, boolean isTalendEditor) {
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    IContributionItem cItem = toolBarManager.find(action.getClass().getCanonicalName());
    if (cItem == null) {
        if (isTalendEditor) {
            toolBarManager.add(action);
        }
    } else {
        if (!isTalendEditor) {
            toolBarManager.remove(new ActionContributionItem(action));
        }
    }
}
Also used : ActionContributionItem(org.eclipse.jface.action.ActionContributionItem) IToolBarManager(org.eclipse.jface.action.IToolBarManager) IContributionItem(org.eclipse.jface.action.IContributionItem)

Aggregations

IToolBarManager (org.eclipse.jface.action.IToolBarManager)37 IActionBars (org.eclipse.ui.IActionBars)19 Action (org.eclipse.jface.action.Action)18 RecordAction (com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction)6 Separator (org.eclipse.jface.action.Separator)6 ActionContributionItem (org.eclipse.jface.action.ActionContributionItem)4 IMenuManager (org.eclipse.jface.action.IMenuManager)4 DropDownAction (com.cubrid.common.ui.common.action.DropDownAction)3 ActionManager (com.cubrid.common.ui.spi.action.ActionManager)3 IAction (org.eclipse.jface.action.IAction)3 MenuManager (org.eclipse.jface.action.MenuManager)3 ToolBarContributionItem (org.eclipse.jface.action.ToolBarContributionItem)3 ToolBarManager (org.eclipse.jface.action.ToolBarManager)3 TableLayout (org.eclipse.jface.viewers.TableLayout)3 ApplyServerInfo (com.cubrid.cubridmanager.core.broker.model.ApplyServerInfo)2 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)2 BrokerStatusSettingDlg (com.cubrid.cubridmanager.ui.broker.editor.internal.BrokerStatusSettingDlg)2 IContributionItem (org.eclipse.jface.action.IContributionItem)2 SearchContributionComposite (com.cubrid.common.ui.common.control.SearchContributionComposite)1 BrokerEnvStatusColumn (com.cubrid.cubridmanager.ui.broker.editor.internal.BrokerEnvStatusColumn)1