Package org.eclipse.jface.action

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


    createSiblingMenuManager = new MenuManager(TurtleEditorPlugin.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


   */
  protected void createContextMenuFor(StructuredViewer viewer) {
    MenuManager contextMenu = new MenuManager("#PopUp");
    contextMenu.add(new Separator("additions"));
    contextMenu.setRemoveAllWhenShown(true);
    contextMenu.addMenuListener(this);
    Menu menu= contextMenu.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
View Full Code Here

 
 
  private void hookContextMenu() {
    MenuManager menuMgr = new MenuManager("#PopupMenu");
    menuMgr.setRemoveAllWhenShown(true);
    menuMgr.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        fillContextMenu(manager);
      }
    });
    Menu menu = menuMgr.createContextMenu(viewer.getControl());
View Full Code Here

    }

    private MenuManager createPopupMenu() {
        MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(new IMenuListener() {
           
            public void menuAboutToShow(IMenuManager manager) {
                fillContextMenu(manager);
            }
        });
View Full Code Here

  }

  private void hookContextMenu() {
    MenuManager menuMgr = new MenuManager("#PopupMenu");
    menuMgr.setRemoveAllWhenShown(true);
    menuMgr.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        DataBaseView.this.fillContextMenu(manager);
      }
    });
    Menu menu = menuMgr.createContextMenu(serverTreeViewer.getControl());
View Full Code Here

    String tag = ((IDOMElement) tablePart.getIDOMNode()).getLocalName();
    final IMenuManager tableMenu = new MenuManager(tag);

    // 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);
      }
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

  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

  private void addBackgroundMenu(IMenuManager subMenu, ElementEditPart part,
      final IDOMElement ele) {
    final IMenuManager colorSub = new MenuManager(PDPlugin
        .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

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.