Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.GroupMarker


    }

    private void addMenuActions() {
        getActionBars().getMenuManager().add(getOpenProjectAction());
        getActionBars().getMenuManager().add(
                new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));

    }
View Full Code Here


            manager.add(getOpenAction());
        }
        manager.add( getOpenProjectAction() );
        manager.add( delAction );

        manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        // LayerApplicabilityMenuCreator creator = getApplicabilityMenu();
        // if (creator != null)
        // manager.add(creator.getMenuManager());

        manager.add(ApplicationGIS.getToolManager().createOperationsContextMenu(
View Full Code Here

      if( additions==null || !(additions instanceof GroupMarker) ){
        manager.add(navigateMenu);
          }else{
            manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, navigateMenu);
          }     
            navigateMenu.add(new GroupMarker(IWorkbenchActionConstants.NAV_START));
            navigateMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));           
            navigateMenu.add(new GroupMarker(IWorkbenchActionConstants.NAV_END));
        }
        IWorkbench workbench = PlatformUI.getWorkbench();
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        // we are using the global BACK and FORWARD actions here
        // and will register "handlers" for these commands
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.BACK.create(window));
        navigateMenu.appendToGroup(IWorkbenchActionConstants.NAV_END,
            ActionFactory.FORWARD.create(window));
       
        if (!manager.isVisible()){
            // since this is the top level menu bar why would it not be visible?
            manager.setVisible(true);
        }       
        IMenuManager mapMenu = manager.findMenuUsingPath("map");       
        if( mapMenu == null ){
            // Once again the hosting RCP application should of provided
            // us with a Map menu; but let's be careful and make our own here
            // if needed.
            // See UDIGActionBarAdvisor for hosting requirements.
            mapMenu = new MenuManager(Messages.ToolManager_menu_manager_title, "map");
            manager.add(mapMenu);
            mapMenu.add(new GroupMarker("mapStart"));
            mapMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
            mapMenu.add(new GroupMarker("mapEnd"));
        }       
        // churn through each category and add stuff as needed
        // note we check with the cmdService to see what we if the actionSet
        // associated with this cateogry is turned on by the
        // current perspective.
View Full Code Here

        formdata.bottom = new FormAttachment(100, -ScaleRatioLabel.STATUS_LINE_HEIGHT);
        formdata.left = new FormAttachment(0);
        formdata.right = new FormAttachment(100);
        viewer.getViewport().getControl().setLayoutData(formdata);

        statusLineManager.add(new GroupMarker(StatusLineManager.BEGIN_GROUP));
        statusLineManager.add(new GroupMarker(StatusLineManager.MIDDLE_GROUP));
        statusLineManager.add(new GroupMarker(StatusLineManager.END_GROUP));
        statusLineManager.createControl(composite, SWT.BORDER);
        formdata = new FormData();
        formdata.left = new FormAttachment(0);
        formdata.right = new FormAttachment(100);
        formdata.top = new FormAttachment(viewer.getViewport().getControl(), 0, SWT.BOTTOM);
View Full Code Here

                     * Gets contributions from active modal tool if possible
                     */
                    tm.contributeActiveModalTool(contextMenu);

                    contextMenu.add(new Separator());
                    contextMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                    if (getMap().getEditManager().getEditFeature() != null) {
                        contextMenu.add(ProjectUIPlugin.getDefault().getFeatureEditProcessor()
                                .getEditFeatureAction(
                                        getSite().getSelectionProvider().getSelection()));

View Full Code Here

        MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);   //Create File menu as a normal Menu
        menuBar.add(fileMenu);                                //add it to the MenuBar
        MenuManager helpMenu = createMenu("&Help", IWorkbenchActionConstants.M_HELP);    //Create the Help Menu with start, end, and additions as divisions
        helpMenu.add(new Separator());                            //Add a separator and then add the "About" MenuItem.
        helpMenu.appendToGroup("end",aboutAction);   
        menuBar.add(new GroupMarker("start"));                        //Add divisions to the MenuBar so we can add
                                                  //additional menus to the MenuBar between File and Help menus                                          //the File and Help menus.
        menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        menuBar.add(new GroupMarker("end"));
       
    menuBar.add(helpMenu);                                //Add the Help menu after the divisions.
  }
View Full Code Here

    menuBar.add(helpMenu);                                //Add the Help menu after the divisions.
  }
 
  private MenuManager createMenu(String text, String id) {
        MenuManager menu = new MenuManager(text, id);
        menu.add(new GroupMarker("start"));
        menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        menu.add(new GroupMarker("end"));

        return menu;
    }
View Full Code Here

        else if (menuType.equalsIgnoreCase(PRESERVED)){
          String menuName = element.getAttribute(NAME_ATTRIBUTE);
          if(menuName.equalsIgnoreCase(PRESERVED_EXIT) ){
            //allow to add more menu before "File/Exit" 
            if(parentMenuBar.getId().equalsIgnoreCase(IWorkbenchActionConstants.M_FILE)){
            parentMenuBar.add(new GroupMarker(START_GROUP));
            parentMenuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
            parentMenuBar.add(new GroupMarker(END_GROUP));
            }
            IWorkbenchAction exitAction = ActionFactory.QUIT.create(workbenchWindow);
            parentMenuBar.add(new Separator());
            parentMenuBar.add(exitAction);           
          }
        }
      }
      //allow to append new submenu(s) at the bottom under each top menu
      //except "File" and "Help"
      if(!parentMenuBar.getId().equalsIgnoreCase(IWorkbenchActionConstants.M_FILE)&&
         !parentMenuBar.getId().equalsIgnoreCase(IWorkbenchActionConstants.M_HELP))     
      {     
        parentMenuBar.add(new GroupMarker(START_GROUP));
        parentMenuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
        parentMenuBar.add(new GroupMarker(END_GROUP));
      }
      }
    }
View Full Code Here

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

        serviceReference.getProperty(Constants.SERVICE_ID);
    }

    private MenuManager createMenu(String name, String id){
        MenuManager menu = new MenuManager(name, id);
        menu.add(new GroupMarker(START_GROUP));
        menu.add(new GroupMarker(ADDITIONS_GROUP));
        menu.add(new GroupMarker(END_GROUP));

        return menu;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.action.GroupMarker

Copyright © 2018 www.massapicom. 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.