Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IMenuManager.addMenuListener()


    final int cellColumn = position.getColumnIndex();

    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);
      }
    });
View Full Code Here


    final IMenuManager submenu = new MenuManager(PDPlugin
        .getResourceString("ActionGroup.Submenu.TextStyle"));//$NON-NLS-1$
    submenu.add(action);

    submenu.setRemoveAllWhenShown(true);
    submenu.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        DesignerToolBarAction action1 = null;
        action1 = DesignActionBarFactory.getInstance().getStyleAction(
            IHTMLConstants.TAG_U);
        action1.setViewer(viewer);
View Full Code Here

    final IMenuManager submenu = new MenuManager(PDPlugin
        .getResourceString("ActionGroup.Submenu.Align"));//$NON-NLS-1$
    submenu.add(action);
    submenu.setRemoveAllWhenShown(true);
    submenu.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        AlignSupport.createAlignActions(submenu, viewer);
      }
    });
    menu.appendToGroup(PageDesignerActionConstants.GROUP_STYLE, submenu);
View Full Code Here

    final IMenuManager submenu = new MenuManager(PDPlugin
        .getResourceString("ActionGroup.Submenu.ParagraphFormat"));//$NON-NLS-1$
    submenu.add(action);
    // Add the submenu.

    submenu.addMenuListener(new IMenuListener() {

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

    final IDOMElement element = (IDOMElement) ele;
    IContributionItem item = contextMenu.find(PageDesignerActionConstants.INSERT_SUBMENU_ID);
    if (item instanceof IMenuManager) {
      final IMenuManager submenu = (IMenuManager) item;
        submenu.add(EMPTY_ACTION);
        submenu.addMenuListener(new IMenuListener() {
          public void menuAboutToShow(IMenuManager manager) {
            submenu.removeAll();
            addHeadAddItems(submenu, element);
          }
        });
View Full Code Here

  private void addColorMenu(IMenuManager subMenu, ElementEditPart part,
      final IDOMElement ele) {
    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);
      }
View Full Code Here

    final int cellColumn = position.getColumnIndex();

    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);
      }
    });
View Full Code Here

          try {
            ActionDescriptor ad = (ActionDescriptor) obj;
            IMenuManager mm = contributeMenuAction(ad, menu, true, false);
            if (mm != null) {
              map.put(ad.getContributionItem(), mm);
              mm.addMenuListener(this);
              menus.add(mm);
              if (debugMenu)
                System.out.println(getClass().getName() + "#contributeToMenu() added: " + ad.getId()); //$NON-NLS-1$
            }
          }
View Full Code Here

    viewMgr.add(new Action() {
        // add noop action; TODO: why?
    });
    viewMgr.setRemoveAllWhenShown(true);
        final ActionContext context = getContext();
    viewMgr.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
                // TODO: don't like this at all
        String[] views = { "org.eclipse.ui.views.PropertySheet", //$NON-NLS-1$
            "org.eclipse.gef.ui.palette_view", "org.eclipse.ui.views.ContentOutline"}; //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    createSiblingMenuManager = new MenuManager(DispelEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
    submenuManager.insertBefore("additions", createSiblingMenuManager);

    // Force an update because Eclipse hides empty menus now.
    //
    submenuManager.addMenuListener
      (new IMenuListener() {
         public void menuAboutToShow(IMenuManager menuManager) {
           menuManager.updateAll(true);
         }
       });
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.