Search in sources :

Example 86 with Separator

use of org.eclipse.jface.action.Separator in project tdi-studio-se by Talend.

the class ThreadFilteredTree method createContextMenu.

/**
     * Creates the context menu.
     * 
     * @param actionBars The action bars
     */
private void createContextMenu(IActionBars actionBars) {
    configureColumnsAction = new ConfigureColumnsAction(this);
    final CopyAction copyAction = CopyAction.createCopyAction(actionBars);
    getViewer().addSelectionChangedListener(copyAction);
    //$NON-NLS-1$
    MenuManager menuMgr = new MenuManager("#PopupMenu");
    menuMgr.setRemoveAllWhenShown(true);
    menuMgr.addMenuListener(new IMenuListener() {

        @Override
        public void menuAboutToShow(IMenuManager manager) {
            manager.add(copyAction);
            manager.add(new Separator());
            manager.add(configureColumnsAction);
        }
    });
    Menu menu = menuMgr.createContextMenu(getViewer().getControl());
    getViewer().getControl().setMenu(menu);
}
Also used : CopyAction(org.talend.designer.runtime.visualization.internal.actions.CopyAction) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Menu(org.eclipse.swt.widgets.Menu) ConfigureColumnsAction(org.talend.designer.runtime.visualization.internal.actions.ConfigureColumnsAction) IMenuListener(org.eclipse.jface.action.IMenuListener) Separator(org.eclipse.jface.action.Separator)

Example 87 with Separator

use of org.eclipse.jface.action.Separator in project tdi-studio-se by Talend.

the class JSONFileOutputStep2Form method fillContextMenu.

private void fillContextMenu(IMenuManager manager) {
    if (!JSONViewer.getSelection().isEmpty()) {
        manager.add(createAction);
        manager.add(createAttributeAction);
        manager.add(createNamespaceAction);
        manager.add(new Separator());
        manager.add(deleteAction);
        manager.add(disconnectAction);
        manager.add(fixValueAction);
        manager.add(new Separator());
        manager.add(setLoopAction);
        manager.add(new Separator());
        manager.add(setGroupAction);
        manager.add(removeGroupAction);
        manager.add(new Separator());
        manager.add(importFromJSONAction);
    }
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 88 with Separator

use of org.eclipse.jface.action.Separator in project sling by apache.

the class JcrPropertiesView method fillContextMenu.

private void fillContextMenu(IMenuManager manager) {
    manager.add(insertAction);
    manager.add(deleteAction);
    manager.add(showInEditorAction);
    if (pinAction != null) {
        manager.add(pinAction);
    }
    if (synchedAction != null) {
        manager.add(synchedAction);
    }
    // Other plug-ins can contribute there actions here
    manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
Also used : Separator(org.eclipse.jface.action.Separator)

Example 89 with Separator

use of org.eclipse.jface.action.Separator in project bndtools by bndtools.

the class RepositoriesView method fillToolBar.

private void fillToolBar(IToolBarManager toolBar) {
    toolBar.add(advancedSearchAction);
    toolBar.add(downloadAction);
    toolBar.add(new Separator());
    toolBar.add(refreshAction);
    toolBar.add(collapseAllAction);
    toolBar.add(addBundlesAction);
    toolBar.add(new Separator());
    toolBar.add(offlineAction);
    toolBar.add(new Separator());
}
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