List of usage examples for org.eclipse.jface.action IToolBarManager isEmpty
boolean isEmpty();
From source file:scouter.client.util.MenuUtil.java
License:Apache License
public static void createMenu(IWorkbenchWindow window, IToolBarManager man, ArrayList<Action> menuArray, Image image, int disableInx) { if (man.isEmpty()) { if (menuArray.size() == 1) { man.add(menuArray.get(0));// w ww .j ava2 s.c om } else { Action act = new Action("Show related Views", SWT.DROP_DOWN) { }; act.setImageDescriptor(ImageUtil.getImageDescriptor(image)); act.setMenuCreator(new MenuUtil(menuArray, disableInx)); man.add(act); } } }