Example usage for org.eclipse.jface.internal.provisional.action IToolBarManager2 getItemCount

List of usage examples for org.eclipse.jface.internal.provisional.action IToolBarManager2 getItemCount

Introduction

In this page you can find the example usage for org.eclipse.jface.internal.provisional.action IToolBarManager2 getItemCount.

Prototype

public int getItemCount();

Source Link

Document

Returns the item count of the control used by this manager.

Usage

From source file:org.eclipse.ui.internal.ViewPane.java

License:Open Source License

public boolean toolbarIsVisible() {
    IToolBarManager2 toolbarManager = getToolBarManager();

    if (toolbarManager == null) {
        return false;
    }/*from   w  ww .  ja v a  2s . c  o  m*/

    Control control = toolbarManager.getControl2();

    if (control == null || control.isDisposed()) {
        return false;
    }

    return toolbarManager.getItemCount() > 0;
}