use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class ActionAdvisor method showMenu.
public void showMenu(IMenuManager menuManager) {
ActionManager manager = ActionManager.getInstance();
MenuManager fileMenu = new MenuManager(Messages.mnu_fileMenuName, IActionConstants.MENU_FILE);
MenuManager editMenu = new MenuManager(Messages.mnu_editMenuName, IActionConstants.MENU_EDIT);
MenuManager toolsMenu = new MenuManager(Messages.mnu_toolsMenuName, IActionConstants.MENU_TOOLS);
MenuManager actionMenu = new MenuManager(Messages.mnu_actionMenuName, IActionConstants.MENU_ACTION);
// fill in file menu
fileMenu.add(manager.getAction(OpenQueryConnAction.ID));
fileMenu.add(manager.getAction(CloseQueryConnAction.ID));
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(NewQueryConnAction.ID));
fileMenu.add(manager.getAction(EditQueryConnAction.ID));
fileMenu.add(manager.getAction(DeleteQueryConnAction.ID));
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(ConnectionUrlImportAction.ID));
fileMenu.add(manager.getAction(ConnectionUrlExportAction.ID));
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(ConnectionImportAction.ID));
fileMenu.add(manager.getAction(ConnectionExportAction.ID));
fileMenu.add(new Separator());
fileMenu.add(closeAction);
fileMenu.add(closeAllAction);
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(OpenQueryAction.ID));
fileMenu.add(saveAction);
fileMenu.add(saveasAction);
fileMenu.add(saveAllAction);
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(RestoreQueryEditorAction.ID));
fileMenu.add(new Separator());
fileMenu.add(manager.getAction(ImportConnsAction.ID));
fileMenu.add(SelectWorkspaceDialog.getWorkspaceMenu(ApplicationType.CUBRID_QUERY_BROWSER.getShortName(), Version.buildVersionId));
fileMenu.add(new Separator());
ActionContributionItem preferencesActionItem = new ActionContributionItem(preferenceAction);
fileMenu.add(preferencesActionItem);
if (Util.isMac()) {
}
fileMenu.add(manager.getAction(RefreshAction.ID));
fileMenu.add(new Separator());
fileMenu.add(quitAction);
fileMenu.add(new Separator());
// fill in edit menu
editMenu.add(undoRetargetAction);
editMenu.add(redoRetargetAction);
editMenu.add(new Separator());
editMenu.add(copyRetargetAction);
editMenu.add(cutRetargetAction);
editMenu.add(pasteRetargetAction);
editMenu.add(new Separator());
editMenu.add(findRetargetAction);
editMenu.add(manager.getAction(GotoLineAction.ID));
// fill in the tools menu
toolsMenu.add(manager.getAction(QueryNewAction.ID));
toolsMenu.add(manager.getAction(QueryNewCustomAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(OIDNavigatorAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(NewTableAction.ID));
toolsMenu.add(manager.getAction(CreateViewAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(CreateSerialAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(NewTriggerAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(AddFunctionAction.ID));
toolsMenu.add(manager.getAction(AddProcedureAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(ExportWizardAction.ID));
toolsMenu.add(manager.getAction(ImportWizardAction.ID));
// toolsMenu.add(new Separator());
// fileMenu.add(manager.getAction(OpenSchemaEditorAction.ID));
fileMenu.add(new Separator());
IMenuManager perparedMenu = new MenuManager(com.cubrid.common.ui.spi.Messages.preparedTableDataMenuName);
toolsMenu.add(perparedMenu);
perparedMenu.add(manager.getAction(PstmtOneDataAction.ID));
perparedMenu.add(manager.getAction(PstmtMultiDataAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(BrokerLogParserAction.ID));
toolsMenu.add(manager.getAction(BrokerLogTopMergeAction.ID));
toolsMenu.add(manager.getAction(BrokerConfOpenFileAction.ID));
toolsMenu.add(new Separator());
toolsMenu.add(manager.getAction(SchemaCommentInstallAction.ID));
menuManager.insertBefore(getMenuInsertPoint(menuManager), fileMenu);
menuManager.insertBefore(getMenuInsertPoint(menuManager), editMenu);
menuManager.insertBefore(getMenuInsertPoint(menuManager), toolsMenu);
menuManager.insertBefore(getMenuInsertPoint(menuManager), actionMenu);
menuManager.update(true);
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridMonitorNavigatorView method buildPopupMenu.
/**
*
* Build the context menu
*
* @param menuManager IMenuManager
*/
protected void buildPopupMenu(final IMenuManager menuManager) {
IStructuredSelection selection = (IStructuredSelection) tv.getSelection();
if (selection == null || selection.isEmpty()) {
ActionManager.addActionToManager(menuManager, ActionManager.getInstance().getAction(AddMonitorDashboardAction.ID));
ActionManager.addActionToManager(menuManager, ActionManager.getInstance().getAction(AddMonitorStatisticPageAction.ID));
return;
}
ICubridNode node = null;
Object obj = selection.getFirstElement();
if (obj instanceof ICubridNode) {
node = (ICubridNode) obj;
} else {
ActionManager.addActionToManager(menuManager, ActionManager.getInstance().getAction(AddMonitorDashboardAction.ID));
ActionManager.addActionToManager(menuManager, ActionManager.getInstance().getAction(AddMonitorStatisticPageAction.ID));
return;
}
ActionManager.getInstance().setActionsMenu(menuManager);
if (CubridNodeTypeManager.isCanRefresh(node.getType())) {
menuManager.add(new Separator());
ActionManager.addActionToManager(menuManager, ActionManager.getInstance().getAction(RefreshAction.ID));
}
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridHostNavigatorView method buildPopupMenu.
/**
* Build the context menu
*
* @param menuManager IMenuManager
*/
protected void buildPopupMenu(final IMenuManager menuManager) {
IStructuredSelection selection = (IStructuredSelection) tv.getSelection();
if (selection == null || selection.isEmpty()) {
ActionManager.addActionToManager(menuManager, AddHostAction.ID);
menuManager.add(new Separator());
// menuManager.add(new Separator());
return;
}
ICubridNode node = null;
Object obj = selection.getFirstElement();
if (obj instanceof ICubridNode) {
node = (ICubridNode) obj;
} else {
ActionManager.addActionToManager(menuManager, AddHostAction.ID);
return;
}
String type = node.getType();
if (CubridNodeType.SERVER.equals(type)) {
if (ConnectHostAction.isSupportedNode(obj)) {
ActionManager.addActionToManager(menuManager, ConnectHostAction.ID);
}
if (DisConnectHostAction.isSupportedNode(obj)) {
ActionManager.addActionToManager(menuManager, DisConnectHostAction.ID);
}
menuManager.add(new Separator());
ActionManager.addActionToManager(menuManager, AddHostAction.ID);
ActionManager.addActionToManager(menuManager, EditHostAction.ID);
ActionManager.addActionToManager(menuManager, DeleteHostAction.ID);
menuManager.add(new Separator());
// ActionManager.addActionToManager(menuManager, OpenSchemaEditorAction.ID);
// menuManager.add(new Separator());
ActionManager.addActionToManager(menuManager, ConnectionUrlExportAction.ID);
menuManager.add(new Separator());
ActionManager.addActionToManager(menuManager, ChangeManagerPasswordAction.ID);
menuManager.add(new Separator());
}
ActionManager.getInstance().setActionsMenu(menuManager);
if (CubridNodeTypeManager.isCanRefresh(node.getType())) {
menuManager.add(new Separator());
ActionManager.addActionToManager(menuManager, RefreshAction.ID);
}
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class CubridMenuProvider method buildDatabaseMenu.
/**
* Construct database related actions
*
* @param manager the parent IMenuManager
* @param node the ICubridNode object
*/
private void buildDatabaseMenu(IMenuManager manager, ICubridNode node) {
if (LoginDatabaseAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(LoginDatabaseAction.ID));
}
if (LogoutDatabaseAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(LogoutDatabaseAction.ID));
}
manager.add(new Separator());
addActionToManager(manager, getAction(EditDatabaseLoginAction.ID));
addActionToManager(manager, getAction(ConnectionUrlExportAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(DatabaseQueryNewAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(ShowDatabaseDashboardAction.ID));
manager.add(new Separator());
ActionManager.addActionToManager(manager, SchemaCompareWizardAction.ID);
ActionManager.addActionToManager(manager, DataCompareWizardAction.ID);
// manager.add(new Separator());
// addActionToManager(manager, getAction(OpenSchemaEditorAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(ExportERwinAction.ID));
addActionToManager(manager, getAction(ImportERwinAction.ID));
manager.add(new Separator());
CubridDatabase database = (CubridDatabase) node;
if (database.isDistributorDb()) {
buildReplicationMenu(manager);
manager.add(new Separator());
}
// Export & Import Actions
manager.add(new Separator());
addActionToManager(manager, getAction(ExportWizardAction.ID));
addActionToManager(manager, getAction(ImportWizardAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(ExportTableDefinitionAction.ID));
// Install Schema Comment
addActionToManager(manager, getAction(SchemaCommentInstallAction.ID));
manager.add(new Separator());
// manager.add(new Separator());
// addActionToManager(manager, getAction(RunSQLFileAction.ID));
// Database Management Actions
manager.add(new Separator());
IMenuManager dbManMenu = new MenuManager(Messages.dbManMenu, CubridManagerUIPlugin.getImageDescriptor("icons/navigator/database_man.png"), null);
manager.add(dbManMenu);
if (StartDatabaseAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StartDatabaseAction.ID));
}
if (StopDatabaseAction.isSupportedNode(node)) {
addActionToManager(manager, getAction(StopDatabaseAction.ID));
}
addActionToManager(dbManMenu, getAction(LoadDatabaseAction.ID));
addActionToManager(dbManMenu, getAction(UnloadDatabaseAction.ID));
dbManMenu.add(new Separator());
addActionToManager(dbManMenu, getAction(OptimizeAction.ID));
addActionToManager(dbManMenu, getAction(CompactDatabaseAction.ID));
addActionToManager(dbManMenu, getAction(CheckDatabaseAction.ID));
dbManMenu.add(new Separator());
addActionToManager(dbManMenu, getAction(CopyDatabaseAction.ID));
addActionToManager(dbManMenu, getAction(RenameDatabaseAction.ID));
dbManMenu.add(new Separator());
addActionToManager(dbManMenu, getAction(BackupDatabaseAction.ID));
addActionToManager(dbManMenu, getAction(RestoreDatabaseAction.ID));
dbManMenu.add(new Separator());
addActionToManager(dbManMenu, getAction(DeleteDatabaseAction.ID));
IMenuManager dbInfoMenu = new MenuManager(Messages.dbInfoMenu, CubridManagerUIPlugin.getImageDescriptor("icons/navigator/database_info.png"), null);
manager.add(dbInfoMenu);
addActionToManager(dbInfoMenu, getAction(LockInfoAction.ID));
addActionToManager(dbInfoMenu, getAction(TransactionInfoAction.ID));
if (CompatibleUtil.isSupportPlanAndParamDump(database.getServer().getServerInfo())) {
dbInfoMenu.add(new Separator());
addActionToManager(dbInfoMenu, getAction(PlanDumpAction.ID));
addActionToManager(dbInfoMenu, getAction(ParamDumpAction.ID));
}
dbInfoMenu.add(new Separator());
addActionToManager(dbInfoMenu, getAction(OIDNavigatorAction.ID));
manager.add(new Separator());
addActionToManager(manager, getAction(PropertyAction.ID));
}
use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.
the class ReplEditorActionBarContributor method contributeToToolBar.
/**
* @see org.eclipse.ui.part.EditorActionBarContributor#contributeToToolBar(org.eclipse.jface.action.IToolBarManager)
* @param toolBarManager the manager that controls the workbench tool bar
*/
public void contributeToToolBar(IToolBarManager toolBarManager) {
toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
toolBarManager.add(getAction(ActionFactory.REDO.getId()));
toolBarManager.add(getAction(EditAction.ID));
toolBarManager.add(getAction(ActionFactory.DELETE.getId()));
toolBarManager.add(new Separator());
toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN));
toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT));
toolBarManager.add(new ZoomComboContributionItem(getPage()));
toolBarManager.add(new Separator());
toolBarManager.add(getAction(GEFActionConstants.ALIGN_LEFT));
toolBarManager.add(getAction(GEFActionConstants.ALIGN_CENTER));
toolBarManager.add(getAction(GEFActionConstants.ALIGN_RIGHT));
toolBarManager.add(getAction(GEFActionConstants.ALIGN_TOP));
toolBarManager.add(getAction(GEFActionConstants.ALIGN_MIDDLE));
toolBarManager.add(getAction(GEFActionConstants.ALIGN_BOTTOM));
}
Aggregations