Search in sources :

Example 41 with IToolBarManager

use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.

the class BrokerStatusHistoryViewPart method makeActions.

/**
	 * This method is to create actions at tool bar
	 * 
	 */
private void makeActions() {
    Action settingAction = new Action() {

        public void run() {
            chartPart.fireChartSetting();
        }
    };
    settingAction.setText(Messages.chartSettingTxt);
    settingAction.setToolTipText(Messages.chartSettingTxt);
    settingAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
    IActionBars bars = getViewSite().getActionBars();
    IToolBarManager manager = bars.getToolBarManager();
    manager.add(settingAction);
}
Also used : Action(org.eclipse.jface.action.Action) IToolBarManager(org.eclipse.jface.action.IToolBarManager) IActionBars(org.eclipse.ui.IActionBars)

Example 42 with IToolBarManager

use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.

the class BrokerStatusMonitorViewPart method makeActions.

/**
	 * This method is to create actions at tool bar
	 *
	 */
private void makeActions() {
    Action settingAction = new Action() {

        public void run() {
            chartPart.fireChartSetting();
        }
    };
    settingAction.setText(Messages.chartSettingTxt);
    settingAction.setToolTipText(Messages.chartSettingTxt);
    settingAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
    final IActionBars bars = getViewSite().getActionBars();
    IToolBarManager manager = bars.getToolBarManager();
    manager.add(settingAction);
    RecordAction recordAction = new RecordAction();
    recordAction.setRecorder(this);
    recordAction.setPrepareTooltip(Messages.brokerMonitorStartRecordTooltip);
    recordAction.setRecordTooltip(Messages.brokerMonitorRecordingTooltip);
    recordAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/monitor/prepare_record.png"));
    recordAction.setToolTipText(Messages.brokerMonitorStartRecordTooltip);
    manager.add(recordAction);
}
Also used : RecordAction(com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction) Action(org.eclipse.jface.action.Action) IToolBarManager(org.eclipse.jface.action.IToolBarManager) RecordAction(com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction) IActionBars(org.eclipse.ui.IActionBars)

Example 43 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)

Example 44 with IToolBarManager

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

the class HeapHistogramPage method updateLocalToolBar.

/**
     * Updates the local tool bar.
     * 
     * @param activated <tt>true</tt> if this tab item is activated
     */
void updateLocalToolBar(boolean activated) {
    IToolBarManager manager = section.getActionBars().getToolBarManager();
    if (activated) {
        addToolBarActions(manager);
    } else {
        removeToolBarActions(manager);
    }
    manager.update(false);
    section.getActionBars().updateActionBars();
}
Also used : IToolBarManager(org.eclipse.jface.action.IToolBarManager)

Example 45 with IToolBarManager

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

the class AbstractJvmPropertySection method addToolBarActions.

/**
     * Adds the tool bar actions.
     */
private void addToolBarActions() {
    IToolBarManager toolBarManager = getToolBarManager();
    if (toolBarManager != null) {
        addToolBarActions(toolBarManager);
        toolBarManager.update(false);
        updateActionBars();
    }
}
Also used : IToolBarManager(org.eclipse.jface.action.IToolBarManager)

Aggregations

IToolBarManager (org.eclipse.jface.action.IToolBarManager)58 IActionBars (org.eclipse.ui.IActionBars)20 Action (org.eclipse.jface.action.Action)18 Separator (org.eclipse.jface.action.Separator)10 IMenuManager (org.eclipse.jface.action.IMenuManager)9 ActionContributionItem (org.eclipse.jface.action.ActionContributionItem)8 IAction (org.eclipse.jface.action.IAction)7 RecordAction (com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction)6 ToolBarManager (org.eclipse.jface.action.ToolBarManager)6 IContributionItem (org.eclipse.jface.action.IContributionItem)5 ToolBarContributionItem (org.eclipse.jface.action.ToolBarContributionItem)5 GridData (org.eclipse.swt.layout.GridData)5 MenuManager (org.eclipse.jface.action.MenuManager)4 ISelection (org.eclipse.jface.viewers.ISelection)4 DropDownAction (com.cubrid.common.ui.common.action.DropDownAction)3 ActionManager (com.cubrid.common.ui.spi.action.ActionManager)3 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)3 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)3 TableLayout (org.eclipse.jface.viewers.TableLayout)3 Composite (org.eclipse.swt.widgets.Composite)3