use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.
the class CubridHostNavigatorView method hookRetragetActions.
/**
* Hook the global actions in bars
*/
protected void hookRetragetActions() {
ActionManager manager = ActionManager.getInstance();
IActionBars bar = this.getViewSite().getActionBars();
bar.setGlobalActionHandler(ActionFactory.COPY.getId(), manager.getAction(CopyHostAction.ID));
bar.setGlobalActionHandler(ActionFactory.PASTE.getId(), manager.getAction(PasteHostAction.ID));
bar.updateActionBars();
}
use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.
the class BrokerStatusView 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.getServer().getServerInfo();
settingDlg.setServerInfo(serverInfo);
if (settingDlg.open() == Dialog.OK) {
refreshLayout();
}
}
/**
* refresh table layout
*/
private void refreshLayout() {
//refresh basic info table
if (isSupportNewBrokerParamPropery) {
TableLayout basicLayout = new TableLayout();
setBasicLayout(basicLayout);
basicTableViewer.getTable().setLayout(basicLayout);
basicTableViewer.getTable().layout();
}
//refresh apply server table
TableLayout asLayout = new TableLayout();
setAsLayout(asLayout);
asTableViewer.getTable().setLayout(asLayout);
asTableViewer.getTable().layout();
//refresh job queue table
TableLayout jqLayout = new TableLayout();
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);
}
use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.
the class BrokerEnvStatusView method makeActions.
/**
* This method is to create actions at tool bar
*
*/
private void makeActions() {
Action columnAction = new Action() {
public void run() {
BrokerEnvStatusSettingDlg settingDlg = new BrokerEnvStatusSettingDlg(null);
if (settingDlg.open() == Dialog.OK) {
TableLayout tlayout = new TableLayout();
for (BrokerEnvStatusColumn column : BrokerEnvStatusColumn.values()) {
if (column.getValue() == -1) {
tlayout.addColumnData(new ColumnWeightData(0, 0, false));
} else {
tlayout.addColumnData(new ColumnWeightData(10, 40, true));
}
}
tableViewer.getTable().setLayout(tlayout);
tableViewer.getTable().layout();
}
}
};
columnAction.setText(Messages.envColumnSettingTxt);
columnAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(columnAction);
}
use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.
the class DbSystemMonitorViewPart method makeActions.
/**
* This method is to create actions at tool bar
*
*/
private void makeActions() {
final IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(dbCombo);
Action settingAction = new Action() {
public void run() {
compositePart.fireChartSetting();
}
};
settingAction.setText(Messages.chartSettingTxt);
settingAction.setToolTipText(Messages.chartSettingTxt);
settingAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/action/setting-small.png"));
manager.add(settingAction);
RecordAction recordAction = new RecordAction();
recordAction.setRecorder(this);
recordAction.setPrepareTooltip(Messages.dbSysMonStartRecordTooltip);
recordAction.setRecordTooltip(Messages.dbSysMonRecordingTooltip);
recordAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/monitor/prepare_record.png"));
recordAction.setToolTipText(Messages.dbSysMonStartRecordTooltip);
manager.add(recordAction);
}
use of org.eclipse.ui.IActionBars in project cubrid-manager by CUBRID.
the class HostSystemMonitorHistoryViewPart 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"));
IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(settingAction);
}
Aggregations