Search in sources :

Example 46 with GroupMarker

use of org.eclipse.jface.action.GroupMarker in project netxms by netxms.

the class LastValues method fillContextMenu.

/**
 * Fill context menu
 * @param mgr Menu manager
 */
protected void fillContextMenu(IMenuManager manager) {
    manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_SECONDARY));
}
Also used : GroupMarker(org.eclipse.jface.action.GroupMarker) Separator(org.eclipse.jface.action.Separator)

Example 47 with GroupMarker

use of org.eclipse.jface.action.GroupMarker in project netxms by netxms.

the class TabbedObjectView method fillLocalPullDown.

/**
 * Fill local pull-down menu
 * @param manager
 */
private void fillLocalPullDown(IMenuManager manager) {
    manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    manager.add(new Separator());
    manager.add(actionRefresh);
}
Also used : GroupMarker(org.eclipse.jface.action.GroupMarker) Separator(org.eclipse.jface.action.Separator)

Example 48 with GroupMarker

use of org.eclipse.jface.action.GroupMarker in project netxms by netxms.

the class ObjectToolsEditor method fillContextMenu.

/**
 * Fill context menu
 *
 * @param mgr Menu manager
 */
protected void fillContextMenu(final IMenuManager mgr) {
    mgr.add(actionNew);
    mgr.add(actionDelete);
    mgr.add(actionClone);
    mgr.add(new Separator());
    IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
    if (containsEnabled(selection)) {
        mgr.add(actionDisable);
    }
    if (containsDisabled(selection)) {
        mgr.add(actionEnable);
    }
    mgr.add(new Separator());
    mgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    mgr.add(new Separator());
    mgr.add(actionEdit);
}
Also used : GroupMarker(org.eclipse.jface.action.GroupMarker) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) Separator(org.eclipse.jface.action.Separator)

Example 49 with GroupMarker

use of org.eclipse.jface.action.GroupMarker in project netxms by netxms.

the class ObjectContextMenu method fill.

/**
 * Fill default object context menu
 *
 * @param manager
 */
public static void fill(IMenuManager manager, IShellProvider shellProvider, ISelectionProvider selectionProvider) {
    manager.add(new GroupMarker(GroupMarkers.MB_OBJECT_CREATION));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_ATM));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_NXVS));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_OBJECT_MANAGEMENT));
    manager.add(new GroupMarker(GroupMarkers.MB_OBJECT_TOOLS));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_OBJECT_BINDING));
    manager.add(new Separator());
    manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_EVENTS_AND_LOGS));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_TOPOLOGY));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_DATA_COLLECTION));
    manager.add(new Separator());
    manager.add(new GroupMarker(GroupMarkers.MB_PROPERTIES));
    if ((shellProvider != null) && (selectionProvider != null) && (((IStructuredSelection) selectionProvider.getSelection()).size() == 1)) {
        PropertyDialogAction action = new PropertyDialogAction(shellProvider, selectionProvider);
        manager.add(action);
        action.setEnabled((selectionProvider.getSelection() instanceof IStructuredSelection) && (((IStructuredSelection) selectionProvider.getSelection()).size() == 1));
    }
}
Also used : GroupMarker(org.eclipse.jface.action.GroupMarker) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) Separator(org.eclipse.jface.action.Separator) PropertyDialogAction(org.eclipse.ui.dialogs.PropertyDialogAction)

Example 50 with GroupMarker

use of org.eclipse.jface.action.GroupMarker in project netxms by netxms.

the class HostSearchResults method fillContextMenu.

/**
 * Fill context menu
 * @param mgr Menu manager
 */
protected void fillContextMenu(IMenuManager manager) {
    /*
		manager.add(actionCopyRecord);
		manager.add(actionCopyIP);
		manager.add(actionCopyMAC);
		manager.add(new Separator());
		*/
    manager.add(actionClearLog);
    manager.add(new Separator());
    manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}
Also used : GroupMarker(org.eclipse.jface.action.GroupMarker) Separator(org.eclipse.jface.action.Separator)

Aggregations

GroupMarker (org.eclipse.jface.action.GroupMarker)117 Separator (org.eclipse.jface.action.Separator)93 IMenuManager (org.eclipse.jface.action.IMenuManager)44 MenuManager (org.eclipse.jface.action.MenuManager)42 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)17 IToolBarManager (org.eclipse.jface.action.IToolBarManager)12 IAction (org.eclipse.jface.action.IAction)10 IMenuListener (org.eclipse.jface.action.IMenuListener)10 Menu (org.eclipse.swt.widgets.Menu)8 Action (org.eclipse.jface.action.Action)7 ISelection (org.eclipse.jface.viewers.ISelection)5 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)5 ActionContributionItem (org.eclipse.jface.action.ActionContributionItem)4 ToolBarContributionItem (org.eclipse.jface.action.ToolBarContributionItem)4 ToolBarManager (org.eclipse.jface.action.ToolBarManager)4 Iterator (java.util.Iterator)2 AddPVAction (org.csstudio.trends.databrowser3.ui.AddPVAction)2 IFindReplaceTarget (org.eclipse.jface.text.IFindReplaceTarget)2 Point (org.eclipse.swt.graphics.Point)2 Shell (org.eclipse.swt.widgets.Shell)2