Example usage for org.eclipse.jface.action IToolBarManager isEmpty

List of usage examples for org.eclipse.jface.action IToolBarManager isEmpty

Introduction

In this page you can find the example usage for org.eclipse.jface.action IToolBarManager isEmpty.

Prototype

boolean isEmpty();

Source Link

Document

Returns whether this manager has any contribution items.

Usage

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);
        }
    }
}