Search in sources :

Example 36 with Separator

use of org.eclipse.jface.action.Separator in project meclipse by flaper87.

the class MeclipseView method fillContextMenu.

private void fillContextMenu(IMenuManager manager) {
    manager.add(connection);
    manager.add(new Separator());
// drillDownAdapter.addNavigationActions(manager);
// Other plug-ins can contribute there actions here
// manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 37 with Separator

use of org.eclipse.jface.action.Separator in project meclipse by flaper87.

the class MeclipseView method hookContextMenu.

private void hookContextMenu() {
    MenuManager menuMgr = new MenuManager("#PopupMenu");
    menuMgr.setRemoveAllWhenShown(true);
    menuMgr.addMenuListener(new IMenuListener() {

        public void menuAboutToShow(IMenuManager manager) {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            if (selection.isEmpty()) {
                MeclipseView.this.fillContextMenu(manager);
                return;
            }
            TreeObject obj = (TreeObject) selection.getFirstElement();
            manager.add(new Separator());
            obj.fillContextMenu(manager);
        }
    });
    Menu menu = menuMgr.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(menuMgr, viewer);
}
Also used : MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) TreeObject(org.mongodb.meclipse.views.objects.TreeObject) IMenuManager(org.eclipse.jface.action.IMenuManager) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) Menu(org.eclipse.swt.widgets.Menu) IMenuListener(org.eclipse.jface.action.IMenuListener) Separator(org.eclipse.jface.action.Separator)

Example 38 with Separator

use of org.eclipse.jface.action.Separator in project meclipse by flaper87.

the class Collection method fillContextMenu.

@Override
public void fillContextMenu(IMenuManager manager) {
    manager.add(insert);
    manager.add(rename);
    manager.add(delete);
    manager.add(new Separator());
    super.fillContextMenu(manager);
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 39 with Separator

use of org.eclipse.jface.action.Separator in project meclipse by flaper87.

the class Connection method fillContextMenu.

/*
	 * @Override public void doubleClickAction() { if (getChildren().length ==
	 * 0) { loadDatabases(); } }
	 */
@Override
public void fillContextMenu(IMenuManager manager) {
    manager.add(delete);
    manager.add(new Separator());
    super.fillContextMenu(manager);
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 40 with Separator

use of org.eclipse.jface.action.Separator in project meclipse by flaper87.

the class TreeObject method fillContextMenu.

public void fillContextMenu(IMenuManager manager) {
    manager.add(reflesh);
    manager.add(showPropertiesView);
    manager.add(new Separator());
    // Other plug-ins can contribute there actions here
    manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
Also used : 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