use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.
the class ActionBuilder method buildToolBar.
/**
* Build CUBRID Manager toolBar
*
* @param parent the coolbar manager
* @return the toolbar manager
*/
public IToolBarManager[] buildToolBar(ICoolBarManager parent) {
IToolBarManager newToolbarManager = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
newToolbarManager.add(ActionManager.getInstance().getAction(AddHostAction.ID));
newToolbarManager.add(ActionManager.getInstance().getAction(CreateDatabaseAction.ID));
newToolbarManager.add(ActionManager.getInstance().getAction(QueryNewAction.ID));
parent.add(newToolbarManager);
IToolBarManager statusToolbarManager = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
statusToolbarManager.add(ActionManager.getInstance().getAction(StartRetargetAction.ID));
statusToolbarManager.add(ActionManager.getInstance().getAction(StopRetargetAction.ID));
parent.add(statusToolbarManager);
return new IToolBarManager[] { newToolbarManager, statusToolbarManager };
}
use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.
the class AbsActionAdvisor method getToolbarManaeger.
protected IToolBarManager getToolbarManaeger(ICoolBarManager coolBarManager) {
IToolBarManager newToolbarManager = null;
for (IContributionItem item : coolBarManager.getItems()) {
if (item instanceof ToolBarContributionItem && "new1".equals(item.getId())) {
ToolBarContributionItem toolBarContributionItem = (ToolBarContributionItem) item;
newToolbarManager = toolBarContributionItem.getToolBarManager();
break;
// }
}
}
return newToolbarManager;
}
use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.
the class HostSystemMonitorViewPart method makeActions.
/**
* This method is to create actions at tool bar
*
*/
private void makeActions() {
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"));
final IActionBars bars = getViewSite().getActionBars();
IToolBarManager manager = bars.getToolBarManager();
manager.add(settingAction);
RecordAction recordAction = new RecordAction();
recordAction.setRecorder(this);
recordAction.setPrepareTooltip(Messages.hostSysMonStartRecordTooltip);
recordAction.setRecordTooltip(Messages.hostSysMonRecordingTooltip);
recordAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/monitor/prepare_record.png"));
recordAction.setToolTipText(Messages.hostSysMonStartRecordTooltip);
manager.add(recordAction);
}
use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.
the class DbStatusHistoryViewPart 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(dbCombo);
manager.add(new Separator());
manager.add(settingAction);
}
use of org.eclipse.jface.action.IToolBarManager in project cubrid-manager by CUBRID.
the class DbSystemMonitorHistoryViewPart 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(dbCombo);
manager.add(new Separator());
manager.add(settingAction);
}
Aggregations