Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.MenuManager.removeAll()


    // ok, we passed the checking, now let's create the actions.
    tableMenu.add(action);
    tableMenu.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        tableMenu.removeAll();
        fillTableMenu(tablePart, cellRow, cellColumn, tableMenu);
      }
    });
    menu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER,
        tableMenu);
View Full Code Here


    final IMenuManager tableMenu =
      new MenuManager(PDPlugin.getResourceString("ElementEdit.Submenu.Table")); //$NON-NLS-1$
    tableMenu.add(action);
    tableMenu.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        tableMenu.removeAll();
        fillTableMenu(tablePart, cellRow, cellColumn, tableMenu);
      }
    });

    contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
View Full Code Here

    final IMenuManager colorSub = new MenuManager(PDPlugin
        .getResourceString("ActionGroup.Submenu.Color"));//$NON-NLS-1$
    colorSub.add(action);
    colorSub.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        colorSub.removeAll();
        ColorSupport.createColorActions(colorSub, ele,
            ICSSPropertyID.ATTR_COLOR);
      }
    });
        subMenu.appendToGroup(PageDesignerActionConstants.GROUP_STYLE,
View Full Code Here

    final IMenuManager tableMenu =
      new MenuManager(PDPlugin.getResourceString("ElementEdit.Submenu.Table")); //$NON-NLS-1$
    tableMenu.add(action);
    tableMenu.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        tableMenu.removeAll();
        fillTableMenu(tablePart, cellRow, cellColumn, tableMenu);
      }
    });

    contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
View Full Code Here

        .getResourceString("ActionGroup.Submenu.BackgroundColor"));//$NON-NLS-1$
    colorSub.add(action);
    colorSub.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        colorSub.removeAll();
        ColorSupport.createColorActions(colorSub, ele,
            ICSSPropertyID.ATTR_BACKGROUND_COLOR);
      }
    });
View Full Code Here

    // Add the submenu.

    submenu.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        submenu.removeAll();
        ParagraphSupport.createParagraphActions(submenu, selection,
            viewer);
      }
    });
    menu.appendToGroup(PageDesignerActionConstants.GROUP_STYLE, submenu);
View Full Code Here

    MenuManager manager = new MenuManager("#PopupMenu");
    manager.setRemoveAllWhenShown(true);
    manager.addMenuListener(new IMenuListener() {
      @Override
      public void menuAboutToShow(IMenuManager manager) {
        manager.removeAll();
        GraphViewSupport.this.fillContextMenu(manager);
      }
    });
    Menu menu = manager.createContextMenu(viewer.getControl());
View Full Code Here

    if (menus.size() == 1) {
      // lets remove the items and move them directly onto the menu
      // directly
      MenuManager childMenu = menus.get(0);
      IContributionItem[] items = childMenu.getItems();
      childMenu.removeAll();
      for (IContributionItem item : items) {
        item.fill(menu, index++);
      }
    } else if (menus.size() > 1) {
      for (MenuManager childMenu : menus) {
View Full Code Here

    if (menus.size() == 1) {
      // lets remove the items and move them directly onto the menu
      // directly
      MenuManager childMenu = menus.get(0);
      IContributionItem[] items = childMenu.getItems();
      childMenu.removeAll();
      for (IContributionItem item : items) {
        menu.add(item);
      }
    } else if (menus.size() > 1) {
      for (MenuManager childMenu : menus) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.