Search in sources :

Example 66 with Separator

use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.

the class QueryExecuter method makeActions.

/**
	 * Fill paged action into query editor result toolbar
	 *
	 * @param toolBarManager ToolBarManager
	 */
public void makeActions(ToolBarManager toolBarManager, Table resultTable) {
    toolBarManager.add(filterResultContrItem);
    toolBarManager.add(new Separator());
    lastPageAction = new LastAction(this);
    nextPageAction = new NextAction(this);
    toolBarManager.add(nextPageAction);
    toolBarManager.add(lastPageAction);
    updateActions();
    toolBarManager.update(true);
}
Also used : LastAction(com.cubrid.common.ui.query.action.LastAction) NextAction(com.cubrid.common.ui.query.action.NextAction) Separator(org.eclipse.jface.action.Separator)

Example 67 with Separator

use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.

the class DbStatusDumpMonitorViewPart 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"));
    final IActionBars bars = getViewSite().getActionBars();
    IToolBarManager manager = bars.getToolBarManager();
    manager.add(dbCombo);
    manager.add(new Separator());
    manager.add(settingAction);
    RecordAction recordAction = new RecordAction();
    recordAction.setRecorder(this);
    recordAction.setPrepareTooltip(Messages.dbMonitorStartRecordTooltip);
    recordAction.setRecordTooltip(Messages.dbMonitorRecordingTooltip);
    recordAction.setImageDescriptor(CubridManagerUIPlugin.getImageDescriptor("icons/monitor/prepare_record.png"));
    recordAction.setToolTipText(Messages.dbMonitorStartRecordTooltip);
    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) Separator(org.eclipse.jface.action.Separator)

Example 68 with Separator

use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.

the class CubridMenuProvider method buildDatabaseMenu.

/**
	 *
	 * Build the database menu
	 *
	 * @param manager the parent menu manager
	 */
private void buildDatabaseMenu(IMenuManager manager) {
    // Query Editor & Comparing Schema
    manager.add(new Separator());
    addActionToManager(manager, getAction(DatabaseQueryNewAction.ID));
    manager.add(new Separator());
    ActionManager.addActionToManager(manager, SchemaCompareWizardAction.ID);
    ActionManager.addActionToManager(manager, DataCompareWizardAction.ID);
    //		manager.add(new Separator());
    //		ActionManager.addActionToManager(manager, OpenSchemaEditorAction.ID);
    manager.add(new Separator());
    ActionManager.addActionToManager(manager, ExportERwinAction.ID);
    ActionManager.addActionToManager(manager, ImportERwinAction.ID);
    // 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));
    manager.add(new Separator());
    // Install Schema Comment
    addActionToManager(manager, getAction(SchemaCommentInstallAction.ID));
    manager.add(new Separator());
    //		addActionToManager(manager, getAction(RunSQLFileAction.ID));
    //		manager.add(new Separator());
    addActionToManager(manager, getAction(ViewDatabaseVersionAction.ID));
    addActionToManager(manager, getAction(OIDNavigatorAction.ID));
    addActionToManager(manager, getAction(PropertyAction.ID));
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 69 with Separator

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);
    // MenuManager helpMenu = new MenuManager(Messages.mnu_helpMneuName,
    // IWorkbenchActionConstants.M_HELP);
    // fill in file menu
    fileMenu.add(manager.getAction(ConnectHostAction.ID));
    fileMenu.add(manager.getAction(DisConnectHostAction.ID));
    fileMenu.add(new Separator());
    fileMenu.add(manager.getAction(AddHostAction.ID));
    fileMenu.add(manager.getAction(EditHostAction.ID));
    fileMenu.add(manager.getAction(DeleteHostAction.ID));
    fileMenu.add(new Separator());
    fileMenu.add(manager.getAction(CubridServerImportAction.ID));
    fileMenu.add(manager.getAction(CubridServerExportAction.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(OpenSchemaEditorAction.ID));
    //		fileMenu.add(new Separator());
    fileMenu.add(manager.getAction(RestoreQueryEditorAction.ID));
    fileMenu.add(new Separator());
    fileMenu.add(manager.getAction(ImportHostsAction.ID));
    fileMenu.add(SelectWorkspaceDialog.getWorkspaceMenu(ApplicationType.CUBRID_MANAGER.getShortName(), Version.buildVersionId));
    fileMenu.add(new Separator());
    ActionContributionItem preferencesActionItem = new ActionContributionItem(preferenceAction);
    fileMenu.add(preferencesActionItem);
    if (Util.isMac()) {
        preferencesActionItem.setVisible(false);
    }
    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 run menu
    toolsMenu.add(manager.getAction(QueryNewAction.ID));
    toolsMenu.add(manager.getAction(QueryNewCustomAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(StartServiceAction.ID));
    toolsMenu.add(manager.getAction(StopServiceAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(StartDatabaseAction.ID));
    toolsMenu.add(manager.getAction(StopDatabaseAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(StartBrokerEnvAction.ID));
    toolsMenu.add(manager.getAction(StopBrokerEnvAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(ChangeManagerPasswordAction.ID));
    toolsMenu.add(manager.getAction(UserManagementAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(BrokerLogParserAction.ID));
    toolsMenu.add(manager.getAction(BrokerLogTopMergeAction.ID));
    toolsMenu.add(new Separator());
    toolsMenu.add(manager.getAction(SchemaCommentInstallAction.ID));
    toolsMenu.add(manager.getAction(ServiceDashboardAction.ID));
    menuManager.insertBefore(getMenuInsertPoint(menuManager), fileMenu);
    menuManager.insertBefore(getMenuInsertPoint(menuManager), editMenu);
    menuManager.insertBefore(getMenuInsertPoint(menuManager), toolsMenu);
    menuManager.insertBefore(getMenuInsertPoint(menuManager), actionMenu);
    menuManager.update(true);
}
Also used : ActionManager(com.cubrid.common.ui.spi.action.ActionManager) ActionContributionItem(org.eclipse.jface.action.ActionContributionItem) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Separator(org.eclipse.jface.action.Separator)

Example 70 with Separator

use of org.eclipse.jface.action.Separator in project cubrid-manager by CUBRID.

the class TextEditorContributor method contributeToMenu.

/**
	 * Contributes to the given menu.
	 *
	 * @param menuManager the manager that controls the menu
	 */
public void contributeToMenu(IMenuManager menuManager) {
    super.contributeToMenu(menuManager);
    MenuManager drawMenu = new MenuManager("&Edit", IWorkbenchActionConstants.M_EDIT);
    menuManager.add(drawMenu);
    drawMenu.add(getAction(ActionFactory.UNDO.getId()));
    drawMenu.add(getAction(ActionFactory.REDO.getId()));
    drawMenu.add(new Separator());
    drawMenu.add(getAction(ActionFactory.COPY.getId()));
    drawMenu.add(getAction(ActionFactory.CUT.getId()));
    drawMenu.add(getAction(ActionFactory.PASTE.getId()));
    drawMenu.add(new Separator());
    drawMenu.add(getAction(ActionFactory.FIND.getId()));
    IAction action = getAction(ActionConstants.ACTION_FORMAT);
    if (action != null) {
        drawMenu.add(new Separator());
        drawMenu.add(getAction(ActionConstants.ACTION_FORMAT));
    }
}
Also used : IAction(org.eclipse.jface.action.IAction) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Separator(org.eclipse.jface.action.Separator)

Aggregations

Separator (org.eclipse.jface.action.Separator)89 MenuManager (org.eclipse.jface.action.MenuManager)39 IMenuManager (org.eclipse.jface.action.IMenuManager)37 IAction (org.eclipse.jface.action.IAction)14 Menu (org.eclipse.swt.widgets.Menu)10 Action (org.eclipse.jface.action.Action)9 IMenuListener (org.eclipse.jface.action.IMenuListener)9 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)9 ActionManager (com.cubrid.common.ui.spi.action.ActionManager)7 IToolBarManager (org.eclipse.jface.action.IToolBarManager)7 ActionContributionItem (org.eclipse.jface.action.ActionContributionItem)6 GroupMarker (org.eclipse.jface.action.GroupMarker)6 IContributionManager (org.eclipse.jface.action.IContributionManager)5 TreeViewer (org.eclipse.jface.viewers.TreeViewer)5 IActionBars (org.eclipse.ui.IActionBars)5 DBAServerSession (org.jkiss.dbeaver.model.admin.sessions.DBAServerSession)5 DBAServerSessionManager (org.jkiss.dbeaver.model.admin.sessions.DBAServerSessionManager)5 SessionManagerViewer (org.jkiss.dbeaver.ui.views.session.SessionManagerViewer)5 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)4 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)4