Package org.eclipse.jface.action

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


                    if( groupName.equals( Constants.M_TOOL)){
                        groupName = "map";
                    }
                    IMenuManager targetMenu = manager.findMenuUsingPath(root);
                    if (targetMenu != null) {
                        IContributionItem find = targetMenu.find(groupName);
                        if ( find!=null && find instanceof GroupMarker ){
                            //targetMenu.appendToGroup(groupName, action); //$NON-NLS-1$
                            targetMenu.appendToGroup(groupName, tool.getAction());
                            targetMenu.setVisible(true);
                        }else{
View Full Code Here


                toolManager=new MenuManager(Messages.MenuToolCategory_menu_manager_title,"tools"); //$NON-NLS-1$
                manager.add(toolManager);
                toolManager.add(new GroupMarker(actionExt)); //$NON-NLS-1$
                toolManager.add(new GroupMarker("modal.ext")); //$NON-NLS-1$
            }
            if( toolManager.find(actionExt)==null ){
              toolManager.add(new GroupMarker(actionExt)); //$NON-NLS-1$
            }
            toolManager.appendToGroup(actionExt, actionMenu); //$NON-NLS-1$
            toolManager.setVisible(true);
        }
View Full Code Here

          AlgorithmFactory.class.getName(),
          "(service.pid=org.cishell.reference.gui.persistence.viewwith.FileViewWith)");
       
        if ((serviceReference != null) && (serviceReference.length > 0)) {
          ActionContributionItem action =
            (ActionContributionItem) fileMenu.find(getItemID(serviceReference[0]));
          action.getAction().run();
        }
      } catch (InvalidSyntaxException e) {
        e.printStackTrace();
      }
View Full Code Here

               
                targetMenu = menu;
            }
           
            group = items[items.length - 1];
            IContributionItem groupItem = targetMenu.find(group);
           
            if (groupItem == null) {
                groupItem = new GroupMarker(group);
                targetMenu.appendToGroup(ADDITIONS_GROUP, groupItem);
            }
View Full Code Here

                        item2.getAction().setText("Toggle Filters...");
                        break;
                    }
                }
            }
            IContributionItem item = menuManager.find("findBugsEclipsePlugin.toggleGrouping.groupDialog");
            if (item != null) {
                menuManager.remove(item);
                menuManager.insertBefore(IWorkbenchActionConstants.MB_ADDITIONS, item);
            }
            IMenuManager mm = menuManager.findMenuUsingPath("bugExplorer.menu.group");
View Full Code Here

    }

    // Find reference group.
    if (group == null)
      group = IWorkbenchActionConstants.MB_ADDITIONS;
    IContributionItem sep = parent.find(group);
    if (sep == null) {
      if (appendIfMissing)
        parent.add(new Separator(group));
      else {
        Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is invalid): " + id); //$NON-NLS-1$
View Full Code Here

      // needs to be called.
      parent.setVisible(true);
    }

    // First remove existing menu item
    IContributionItem item = parent.find(ad.getId());
    if (item != null) {
      parent.remove(ad.getId());
    }

    // Find reference group.
View Full Code Here

    }

    // Find reference group.
    if (mgroup == null)
      mgroup = IWorkbenchActionConstants.MB_ADDITIONS;
    IContributionItem sep = parent.find(mgroup);
    if (sep == null) {
      if (appendIfMissing)
        parent.add(sep = new Separator(mgroup));
      else {
        Logger.log(Logger.ERROR, "Invalid Menu Extension (Group is invalid): " + ad.getId()); //$NON-NLS-1$
View Full Code Here

    assert fileMenu != null;
    fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
    IMenuManager editMenu = bars.getMenuManager().findMenuUsingPath(
        IWorkbenchActionConstants.M_EDIT);
    assert editMenu != null;
    if (editMenu.find("validationGroup") == null) { //$NON-NLS-1$
      editMenu.add(new GroupMarker("validationGroup")); //$NON-NLS-1$
    }
    IAction validateAction = new ValidateAction(page);
    editMenu.appendToGroup("validationGroup", validateAction); //$NON-NLS-1$
  }
View Full Code Here

            // Find reference group.
            if (group == null) {
        group = IWorkbenchActionConstants.MB_ADDITIONS;
      }
            IContributionItem sep = parent.find(group);
            if (sep == null) {
                if (appendIfMissing) {
          addGroup(parent, group);
        } else {
                    WorkbenchPlugin
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.