Example usage for org.eclipse.jface.action ICoolBarManager removeAll

List of usage examples for org.eclipse.jface.action ICoolBarManager removeAll

Introduction

In this page you can find the example usage for org.eclipse.jface.action ICoolBarManager removeAll.

Prototype

void removeAll();

Source Link

Document

Removes all contribution items from this manager.

Usage

From source file:org.neo4j.neoclipse.ApplicationWindowAdvisor.java

License:Apache License

@Override
public void postWindowOpen() {
    super.postWindowOpen();
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    ICoolBarManager coolBar = configurer.getActionBarConfigurer().getCoolBarManager();
    coolBar.removeAll();
    actionBarAdvisor.fillCoolBar(coolBar);
    coolBar.update(true);//from  ww w .  ja v a  2 s . c om
}

From source file:org.nightlabs.eclipse.ui.pdfviewer.extension.editor.PDFViewerEditorActionBarContributor.java

License:Open Source License

protected void contribute() {
    final ICoolBarManager coolBarManager = getCoolBarManager();

    if (editor == null) {
        coolBarManager.removeAll();
        return;//from  w  ww. java2 s . com
    }

    final PDFViewer pdfViewer = editor.getPDFViewer();
    if (pdfViewer == null) {
        coolBarManager.removeAll();
        return;
    }

    final PDFViewerActionRegistry pdfViewerActionRegistry = getPDFViewerActionRegistry();

    if (pdfViewerActionRegistry == null) {
        coolBarManager.removeAll();
        return;
    }

    pdfViewerActionRegistry.contributeToCoolBar(coolBarManager);
}