Search in sources :

Example 31 with IActionBars

use of org.eclipse.ui.IActionBars in project GT by Tencent.

the class StubAnalysisView method createLocalToolBar.

private void createLocalToolBar() {
    IActionBars bars = getViewSite().getActionBars();
    IToolBarManager manager = bars.getToolBarManager();
    manager.add(openLogOnPCAction);
    manager.add(openLogOnPhoneAction);
}
Also used : IToolBarManager(org.eclipse.jface.action.IToolBarManager) IActionBars(org.eclipse.ui.IActionBars)

Example 32 with IActionBars

use of org.eclipse.ui.IActionBars in project dbeaver by serge-rider.

the class DatabaseDataEditor method refreshActions.

private void refreshActions() {
    IActionBars actionBars = getEditorSite().getActionBars();
    actionBars.updateActionBars();
}
Also used : IActionBars(org.eclipse.ui.IActionBars)

Example 33 with IActionBars

use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.

the class BrokerDashboardViewPart method makeActions.

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

        public void run() {
            BrokerStatusSettingDlg settingDlg = new BrokerStatusSettingDlg(null);
            ServerInfo serverInfo = brokerNode.getParent().getServerInfo();
            settingDlg.setServerInfo(serverInfo);
            settingDlg.setAppendDiag(true);
            if (settingDlg.open() == Dialog.OK) {
                refreshLayout();
            }
        }

        /**
			 * refresh table layout
			 */
        private void refreshLayout() {
            //refresh basic info table
            TableLayout basicLayout = new TableLayout();
            brokerTablePart.setBasicLayout(basicLayout);
            basicTableViewer.getTable().setLayout(basicLayout);
            basicTableViewer.getTable().layout();
            //refresh apply server table
            TableLayout asLayout = new TableLayout();
            brokerTablePart.setAsLayout(asLayout);
            asTableViewer.getTable().setLayout(asLayout);
            asTableViewer.getTable().layout();
            //refresh job queue table
            TableLayout jqLayout = new TableLayout();
            brokerTablePart.setJqLayout(jqLayout);
            jqTableViewer.getTable().setLayout(jqLayout);
            jqTableViewer.getTable().layout();
        }
    };
    columnAction.setText(Messages.columnSettingTxt);
    columnAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
    IActionBars bars = getViewSite().getActionBars();
    IToolBarManager manager = bars.getToolBarManager();
    manager.add(columnAction);
}
Also used : Action(org.eclipse.jface.action.Action) BrokerStatusSettingDlg(com.cubrid.cubridmanager.ui.broker.editor.internal.BrokerStatusSettingDlg) IToolBarManager(org.eclipse.jface.action.IToolBarManager) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) ApplyServerInfo(com.cubrid.cubridmanager.core.broker.model.ApplyServerInfo) TableLayout(org.eclipse.jface.viewers.TableLayout) IActionBars(org.eclipse.ui.IActionBars)

Example 34 with IActionBars

use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.

the class DbDashboardHistoryViewPart method makeActions.

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

        public void run() {
            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);
}
Also used : Action(org.eclipse.jface.action.Action) IToolBarManager(org.eclipse.jface.action.IToolBarManager) IActionBars(org.eclipse.ui.IActionBars)

Example 35 with IActionBars

use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.

the class HostDashboardViewPart method makeActions.

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

        public void run() {
            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.hostDashboardMonitorStartRecordTooltip);
    recordAction.setRecordTooltip(Messages.hostDashboardRecordingTooltip);
    recordAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/monitor/prepare_record.png"));
    recordAction.setToolTipText(Messages.hostDashboardMonitorStartRecordTooltip);
    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)

Aggregations

IActionBars (org.eclipse.ui.IActionBars)65 IToolBarManager (org.eclipse.jface.action.IToolBarManager)21 Action (org.eclipse.jface.action.Action)19 IMenuManager (org.eclipse.jface.action.IMenuManager)8 RecordAction (com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction)6 IAction (org.eclipse.jface.action.IAction)6 Separator (org.eclipse.jface.action.Separator)6 TableLayout (org.eclipse.jface.viewers.TableLayout)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 ActionManager (com.cubrid.common.ui.spi.action.ActionManager)2 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 ArrayList (java.util.ArrayList)2 MenuManager (org.eclipse.jface.action.MenuManager)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 Menu (org.eclipse.swt.widgets.Menu)2 Tree (org.eclipse.swt.widgets.Tree)2 CopyAction (org.talend.designer.runtime.visualization.internal.actions.CopyAction)2 HttpClient (aQute.bnd.http.HttpClient)1