Example usage for org.eclipse.jface.action IMenuManager fill

List of usage examples for org.eclipse.jface.action IMenuManager fill

Introduction

In this page you can find the example usage for org.eclipse.jface.action IMenuManager fill.

Prototype

void fill(Menu parent, int index);

Source Link

Document

Fills the given menu with controls representing this contribution item.

Usage

From source file:de.fhg.igd.slf4jplus.ui.userstatus.contribution.StatusContribution.java

License:Open Source License

/**
 * Add options to the menu//from   ww w . ja  va2 s.c om
 * 
 * @param menu the menu
 * @param index the index to insert the menu items at
 * 
 * @return the index after the inserted items
 */
private int addOptions(Menu menu, int index) {
    IMenuManager errorHandling = new MenuManager(Messages.StatusContribution_0);

    IAction dialogAction = new OnErrorBehaviourAction(control, true);
    IAction blinkAction = new OnErrorBehaviourAction(control, false);

    errorHandling.add(dialogAction);
    errorHandling.add(blinkAction);

    errorHandling.fill(menu, index++);

    return index;
}