use of org.eclipse.jface.action.Separator 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.Separator 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);
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridMenuProvider method buildReplicationMenu.
/**
* Add replication related actions to menu manager
*
* @param parent the parent menu manager
*/
private void buildReplicationMenu(IMenuManager parent) {
IMenuManager manager = new MenuManager(Messages.menuReplication);
parent.add(manager);
addActionToManager(manager, getAction(ViewReplicationAction.ID));
manager.add(new Separator());
MenuManager masterMenu = new MenuManager(Messages.masterDbActionGroupName);
manager.add(masterMenu);
addActionToManager(masterMenu, getAction(StartReplicationServerAction.ID));
addActionToManager(masterMenu, getAction(StopReplicationServerAction.ID));
manager.add(new Separator());
if (StartReplicationAgentAction.isSupportedNode(parent)) {
addActionToManager(manager, getAction(StartReplicationAgentAction.ID));
}
if (StopReplicationAgentAction.isSupportedNode(parent)) {
addActionToManager(manager, getAction(StopReplicationAgentAction.ID));
}
manager.add(new Separator());
MenuManager slaveMenu = new MenuManager(Messages.slaveDbActionGroupName);
manager.add(slaveMenu);
if (StartSlaveDbAction.isSupportedNode(parent)) {
addActionToManager(slaveMenu, getAction(StartSlaveDbAction.ID));
}
if (StopSlaveDbAction.isSupportedNode(parent)) {
addActionToManager(slaveMenu, getAction(StopSlaveDbAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(ConfigureReplicationParamAction.ID));
addActionToManager(manager, getAction(ChangeSlaveDbAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(MonitorReplicationPerfAction.ID));
addActionToManager(manager, getAction(ViewReplicationErrorLogAction.ID));
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridMenuProvider method buildMenu.
/**
* Build the context menu and menubar menu according to the selected cubrid
* node
*
* @param manager the parent menu manager
* @param node the ICubridNode object
*/
public void buildMenu(IMenuManager manager, ICubridNode node) {
// fill Action Menu according to node type
if (node == null) {
LOGGER.error("ICubridNode is a null.");
return;
}
String type = node.getType();
if (CubridNodeType.SERVER.equals(type)) {
addActionToManager(manager, getAction(HostDashboardAction.ID));
addActionToManager(manager, getAction(ViewServerVersionAction.ID));
// #1 Disable the HA/Shard wizard
// if (CompatibleUtil.isSupportNewHAConfFile(node.getServer().getServerInfo())) {
// manager.add(new Separator());
// addActionToManager(manager, getAction(EasyHAAction.ID));
// }
// #1 Disable the HA/Shard wizard
// if (node.getServer() != null
// && node.getServer().getServerInfo() != null
// && CompatibleUtil.isSupportShard(node.getServer().getServerInfo())) {
// manager.add(new Separator());
// addActionToManager(manager, getAction(AddShardAction.ID));
// }
manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
addActionToManager(manager, getAction(UnifyHostConfigAction.ID));
IMenuManager configMenu = new MenuManager(Messages.confActionGroupName);
manager.add(configMenu);
addActionToManager(configMenu, getAction(EditCubridConfigAction.ID));
addActionToManager(configMenu, getAction(ImportCubridConfigAction.ID));
addActionToManager(configMenu, getAction(ExportCubridConfigAction.ID));
configMenu.add(new Separator());
addActionToManager(configMenu, getAction(EditBrokerConfigAction.ID));
addActionToManager(configMenu, getAction(ImportBrokerConfigAction.ID));
addActionToManager(configMenu, getAction(ExportBrokerConfigAction.ID));
configMenu.add(new Separator());
addActionToManager(configMenu, getAction(EditCmConfigAction.ID));
addActionToManager(configMenu, getAction(ImportCmConfigAction.ID));
addActionToManager(configMenu, getAction(ExportCmConfigAction.ID));
if (CompatibleUtil.isSupportNewHAConfFile(node.getServer().getServerInfo())) {
configMenu.add(new Separator());
addActionToManager(configMenu, getAction(EditHAConfigAction.ID));
addActionToManager(configMenu, getAction(ImportHAConfigAction.ID));
addActionToManager(configMenu, getAction(ExportHAConfigAction.ID));
}
manager.add(new Separator());
} else if (CubridNodeType.DATABASE_FOLDER.equals(type)) {
addActionToManager(manager, getAction(CreateDatabaseAction.ID));
manager.add(new Separator());
// addActionToManager(manager, getAction(OpenSchemaEditorAction.ID));
// manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
manager.add(new Separator());
} else if (CubridNodeType.DATABASE.equals(type)) {
buildDatabaseMenu(manager, node);
} else if (CubridNodeType.USER_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddUserAction.ID));
} else if (CubridNodeType.USER.equals(type)) {
addActionToManager(manager, getAction(EditUserAction.ID));
addActionToManager(manager, getAction(DeleteUserAction.ID));
} else if (CubridNodeType.BACKUP_PLAN_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddBackupPlanAction.ID));
addActionToManager(manager, getAction(BackupErrLogAction.ID));
} else if (CubridNodeType.BACKUP_PLAN.equals(type)) {
addActionToManager(manager, getAction(EditBackupPlanAction.ID));
addActionToManager(manager, getAction(DeleteBackupPlanAction.ID));
} else if (CubridNodeType.QUERY_PLAN_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddQueryPlanAction.ID));
addActionToManager(manager, getAction(QueryLogAction.ID));
} else if (CubridNodeType.QUERY_PLAN.equals(type)) {
addActionToManager(manager, getAction(EditQueryPlanAction.ID));
addActionToManager(manager, getAction(DeleteQueryPlanAction.ID));
} else if (CubridNodeType.DBSPACE_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddVolumeAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(SetAutoAddVolumeAction.ID));
addActionToManager(manager, getAction(AutoAddVolumeLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(DatabaseStatusViewAction.ID));
} else if (CubridNodeType.GENERIC_VOLUME_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddVolumeAction.ID));
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.DATA_VOLUME_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddVolumeAction.ID));
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.INDEX_VOLUME_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddVolumeAction.ID));
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.TEMP_VOLUME_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddVolumeAction.ID));
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.ACTIVE_LOG_FOLDER.equals(type)) {
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.ARCHIVE_LOG_FOLDER.equals(type)) {
addActionToManager(manager, getAction(SpaceFolderViewAction.ID));
} else if (CubridNodeType.GENERIC_VOLUME.equals(type)) {
addActionToManager(manager, getAction(SpaceInfoViewAction.ID));
} else if (CubridNodeType.DATA_VOLUME.equals(type)) {
addActionToManager(manager, getAction(SpaceInfoViewAction.ID));
} else if (CubridNodeType.INDEX_VOLUME.equals(type)) {
addActionToManager(manager, getAction(SpaceInfoViewAction.ID));
} else if (CubridNodeType.TEMP_VOLUME.equals(type)) {
addActionToManager(manager, getAction(SpaceInfoViewAction.ID));
} else if (CubridNodeType.BROKER_FOLDER.equals(type)) {
if (StartBrokerEnvAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StartBrokerEnvAction.ID));
}
if (StopBrokerEnvAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StopBrokerEnvAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(ShowBrokerEnvStatusAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(EditBrokerConfigAction.ID));
addActionToManager(manager, getAction(PropertyAction.ID));
manager.add(new Separator());
} else if (CubridNodeType.BROKER.equals(type)) {
if (StartBrokerAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StartBrokerAction.ID));
}
if (StopBrokerAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StopBrokerAction.ID));
}
if (RestartBrokerAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(RestartBrokerAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(ShowBrokerStatusAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
manager.add(new Separator());
} else if (CubridNodeType.SHARD_FOLDER.equals(type)) {
if (StartShardEnvAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StartShardEnvAction.ID));
}
if (StopShardEnvAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StopShardEnvAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(ShowShardStatusAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
manager.add(new Separator());
} else if (CubridNodeType.SHARD.equals(type)) {
if (StartShardAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StartShardAction.ID));
}
if (StopShardAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StopShardAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
} else if (CubridNodeType.MONITOR_FOLDER.equals(type)) {
//status monitor action
if (CompatibleUtil.isSupportBrokerOrDBStatusMonitor(node.getServer().getServerInfo())) {
addActionToManager(manager, getAction(AddMonitorInstanceAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(ShowBrokerMonitorHistoryAction.ID));
addActionToManager(manager, getAction(ShowDatabaseMonitorHistoryAction.ID));
} else {
addActionToManager(manager, getAction(AddStatusMonitorTemplateAction.ID));
}
//system monitor action
if (CompatibleUtil.isSupportSystemMonitor(node.getServer().getServerInfo())) {
manager.add(new Separator());
addActionToManager(manager, getAction(ShowHostSystemMonitorHistoryAction.ID));
addActionToManager(manager, getAction(ShowDbSystemMonitorHistoryAction.ID));
}
//monitor statistic action
if (CompatibleUtil.isSupportMonitorStatistic(node.getServer().getServerInfo())) {
manager.add(new Separator());
addActionToManager(manager, getAction(AddMonitorStatisticPageAction.ID));
addActionToManager(manager, getAction(CheckMonitorIntervalAction.ID));
}
/*} else if (CubridNodeType.STATUS_MONITOR_FOLDER.equals(type)) {
if (CompatibleUtil.isSupportBrokerOrDBStatusMonitor(node.getServer().getServerInfo())) {
addActionToManager(manager, getAction(AddMonitorInstanceAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(ShowBrokerMonitorHistoryAction.ID));
addActionToManager(manager, getAction(ShowDatabaseMonitorHistoryAction.ID));
} else {
addActionToManager(manager, getAction(AddStatusMonitorTemplateAction.ID));
}
} else if (CubridNodeType.MONITOR_STATISTIC_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddMonitorStatisticPageAction.ID));
addActionToManager(manager, getAction(CheckMonitorIntervalAction.ID));*/
} else if (CubridNodeType.MONITOR_STATISTIC_PAGE.equals(type)) {
addActionToManager(manager, getAction(OpenMonitorStatisticPageAction.ID));
addActionToManager(manager, getAction(DeleteMonitorStatisticPageAction.ID));
if (node.getParent() == null) {
manager.add(new Separator());
addActionToManager(manager, getAction(AddMonitorDashboardAction.ID));
addActionToManager(manager, getAction(AddMonitorStatisticPageAction.ID));
}
} else if (CubridNodeType.STATUS_MONITOR_TEMPLATE.equals(type)) {
addActionToManager(manager, getAction(ShowStatusMonitorAction.ID));
if (CompatibleUtil.isSupportBrokerOrDBStatusMonitor(node.getServer().getServerInfo())) {
if (!Messages.msgDbStatusMonitorName.equals(node.getLabel()) && !Messages.msgBrokerStatusMonitorName.equals(node.getLabel())) {
addActionToManager(manager, getAction(EditMonitorInstanceAction.ID));
addActionToManager(manager, getAction(DelMonitorInstanceAction.ID));
}
} else {
manager.add(new Separator());
addActionToManager(manager, getAction(EditStatusMonitorTemplateAction.ID));
addActionToManager(manager, getAction(DeleteStatusMonitorTemplateAction.ID));
}
/*} else if (CubridNodeType.SYSTEM_MONITOR_FOLDER.equals(type)) {
if (CompatibleUtil.isSupportSystemMonitor(node.getServer().getServerInfo())) {
addActionToManager(manager, getAction(ShowHostSystemMonitorHistoryAction.ID));
addActionToManager(manager, getAction(ShowDbSystemMonitorHistoryAction.ID));
}*/
} else if (CubridNodeType.SYSTEM_MONITOR_TEMPLATE.equals(type)) {
addActionToManager(manager, getAction(ShowSystemMonitorAction.ID));
} else if (CubridNodeType.LOGS_BROKER_ACCESS_LOG_FOLDER.equals(type)) {
addActionToManager(manager, getAction(RemoveAllAccessLogAction.ID));
} else if (CubridNodeType.LOGS_BROKER_ACCESS_LOG.equals(type)) {
addActionToManager(manager, getAction(LogViewAction.ID));
addActionToManager(manager, getAction(RemoveLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(LogPropertyAction.ID));
} else if (CubridNodeType.LOGS_BROKER_ERROR_LOG_FOLDER.equals(type)) {
addActionToManager(manager, getAction(RemoveAllErrorLogAction.ID));
} else if (CubridNodeType.LOGS_BROKER_ERROR_LOG.equals(type)) {
addActionToManager(manager, getAction(LogViewAction.ID));
addActionToManager(manager, getAction(RemoveLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(LogPropertyAction.ID));
} else if (CubridNodeType.LOGS_BROKER_ADMIN_LOG.equals(type)) {
addActionToManager(manager, getAction(LogViewAction.ID));
addActionToManager(manager, getAction(ResetAdminLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(LogPropertyAction.ID));
} else if (CubridNodeType.BROKER_SQL_LOG_FOLDER.equals(type)) {
addActionToManager(manager, getAction(RemoveAllScriptLogAction.ID));
addActionToManager(manager, getAction(AnalyzeSqlLogAction.ID));
} else if (CubridNodeType.BROKER_SQL_LOG.equals(type)) {
addActionToManager(manager, getAction(LogViewAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(AnalyzeSqlLogAction.ID));
addActionToManager(manager, getAction(ExecuteSqlLogAction.ID));
addActionToManager(manager, getAction(RemoveLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(LogPropertyAction.ID));
} else if (CubridNodeType.LOGS_SERVER_DATABASE_LOG.equals(type)) {
addActionToManager(manager, getAction(LogViewAction.ID));
addActionToManager(manager, getAction(RemoveLogAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(LogPropertyAction.ID));
} else if (CubridNodeType.LOGS_SERVER_DATABASE_FOLDER.equals(type)) {
addActionToManager(manager, getAction(RemoveAllDbLogAction.ID));
} else if (CubridNodeType.LOGS_MANAGER_ACCESS_LOG.equals(type) || CubridNodeType.LOGS_MANAGER_ERROR_LOG.equals(type)) {
addActionToManager(manager, getAction(ManagerLogViewAction.ID));
addActionToManager(manager, getAction(RemoveAllManagerLogAction.ID));
} else if (CubridNodeType.MONITOR_DASHBOARD.equals(type)) {
addActionToManager(manager, getAction(OpenMonitorDashboardAction.ID));
addActionToManager(manager, getAction(EditMonitorDashboardAction.ID));
addActionToManager(manager, getAction(DeleteMonitorDashboardAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(AddMonitorDashboardAction.ID));
addActionToManager(manager, getAction(AddMonitorStatisticPageAction.ID));
manager.add(new Separator());
} else if (NodeType.GROUP.equals(type)) {
addActionToManager(manager, getAction(ConnectHostAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(AddHostAction.ID));
manager.add(new Separator());
super.buildMenu(manager, node);
} else {
super.buildMenu(manager, node);
}
// This menu hide if it hasn't any hidden menu node.
if (node.isContainer() && ShowHiddenElementsAction.isSupportedNode(node)) {
manager.add(new Separator());
ActionManager.addActionToManager(manager, ActionManager.getInstance().getAction(ShowHiddenElementsAction.ID));
}
manager.update(true);
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridMenuProvider method buildMenu.
/**
* Build the context menu and menubar menu according to the selected cubrid
* node
*
* @param manager the parent menu manager
* @param node the ICubridNode object
*/
public void buildMenu(IMenuManager manager, ICubridNode node) {
String type = node.getType();
if (NodeType.DATABASE.equals(type)) {
buildDatabaseMenu(manager);
} else if (NodeType.GROUP.equals(type)) {
addActionToManager(manager, getAction(NewQueryConnAction.ID));
addActionToManager(manager, getAction(OpenQueryConnAction.ID));
manager.add(new Separator());
super.buildMenu(manager, node);
} else if (NodeType.USER_FOLDER.equals(type)) {
addActionToManager(manager, getAction(AddUserAction.ID));
} else if (NodeType.USER.equals(type)) {
addActionToManager(manager, getAction(EditUserAction.ID));
addActionToManager(manager, getAction(DeleteUserAction.ID));
} else {
// addActionToManager(manager, getAction(OpenSchemaEditorAction.ID));
// manager.add(new Separator());
super.buildMenu(manager, node);
}
// ActionManager.getInstance().getAction(HiddenElementAction.ID));
if (node.isContainer() && ShowHiddenElementsAction.isSupportedNode(node)) {
manager.add(new Separator());
IAction action = getAction(ShowHiddenElementsAction.ID);
ActionManager.addActionToManager(manager, action);
}
manager.update(true);
}
Aggregations