Examples of IMenuManager


Examples of org.eclipse.jface.action.IMenuManager

    /* (non-Javadoc)
     * @see org.eclipse.jface.action.ContributionItem#setParent(org.eclipse.jface.action.IContributionManager)
     */
    public void setParent(IContributionManager parent) {
        if (getParent() instanceof IMenuManager) {
            IMenuManager menuMgr = (IMenuManager) getParent();
            menuMgr.removeMenuListener(menuListener);
        }
        if (parent instanceof IMenuManager) {
            IMenuManager menuMgr = (IMenuManager) parent;
            menuMgr.addMenuListener(menuListener);
        }
        super.setParent(parent);
    }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    List contributions = (List) contributionManagerTracker.get(mgr);
    if (contributions == null) {
      contributions = new ArrayList();
      contributionManagerTracker.put(mgr, contributions);
      if (mgr instanceof IMenuManager) {
        IMenuManager m = (IMenuManager) mgr;
        if (m.getRemoveAllWhenShown()) {
          m.addMenuListener(getMenuTrackerListener());
        }
      }
    }
    contributions.add(ciList);
  }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    if (contributions == null) {
      return;
    }

    if (mgr instanceof IMenuManager) {
      IMenuManager m = (IMenuManager) mgr;
      if (m.getRemoveAllWhenShown()) {
        m.removeMenuListener(getMenuTrackerListener());
      }
    }

    Iterator i = contributions.iterator();
    while (i.hasNext()) {
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

   * Fill context menu {@link IMenuManager}.
   */
  protected void fillContextMenu(IMenuManager manager) throws Exception {
    if (hasLayout()) {
      // add "Set layout"
      IMenuManager layoutsManager = new MenuManager("Set layout");
      manager.appendToGroup(IContextMenuConstants.GROUP_LAYOUT, layoutsManager);
      fillLayoutsManager(layoutsManager);
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

   * Fill context menu {@link IMenuManager}.
   */
  protected void fillContextMenu(IMenuManager manager) throws Exception {
    if (hasLayout()) {
      // add "Set layout"
      IMenuManager layoutsManager = new MenuManager("Set layout");
      manager.appendToGroup(IContextMenuConstants.GROUP_LAYOUT, layoutsManager);
      fillLayoutsManager(layoutsManager);
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    /**
     * Notifies the listener that the menu is about to be shown.
     */
    public void menuAboutToShow(IMenuManager mgr) {
      IMenuManager originalManager = mgr;
     
      // Add this menu as a visible menu.
      final IWorkbenchPartSite site = part.getSite();
      if (site != null) {
      final IWorkbench workbench = site.getWorkbenchWindow()
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

        "  }",
        "}");
    MenuBarInfo bar = getJavaInfoByName("bar");
    MenuItemInfo item = bar.getItems().get(0);
    //
    IMenuManager contextMenu = getContextMenu(item);
    List<IAction> actions = findChildActions(contextMenu, "Open Command");
    assertThat(actions).hasSize(1);
  }
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    /**
     * Initializes the Menu.
     */
    private void initMenu()
    {
        IMenuManager menu = view.getViewSite().getActionBars().getMenuManager();
        menu.add( openSchemaViewSortingDialog );
        menu.add( new Separator() );
        IMenuManager schemaPresentationMenu = new MenuManager( Messages
            .getString( "SchemaViewController.SchemaPresentationAction" ) ); //$NON-NLS-1$
        schemaPresentationMenu.add( switchSchemaPresentationToFlat );
        schemaPresentationMenu.add( switchSchemaPresentationToHierarchical );
        menu.add( schemaPresentationMenu );
        menu.add( new Separator() );
        menu.add( linkWithEditor );
        menu.add( new Separator() );
        menu.add( openSchemaViewPreference );
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), new SelectAllAction());
   
    Action action = new SwitchStyleAction(this);
   
    IMenuManager dropDownMenu = actionBars.getMenuManager();
    dropDownMenu.add(action);
   
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
   
    // wide left annotation side action
    WideLeftAnnotationSideAction wideLeftAnnotationSideAction = new WideLeftAnnotationSideAction(
View Full Code Here

Examples of org.eclipse.jface.action.IMenuManager

    runJCasGenAction.setText("Run JCasGen");
  }

  public void contributeToMenu(IMenuManager manager) {

    IMenuManager menu = new MenuManager("&UIMA"); //$NON-NLS-1$
    manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
    menu.add(runJCasGenAction);
    IMenuManager settingsMenu = new MenuManager("Settings"); //$NON-NLS-1$
    menu.add(settingsMenu);
    settingsMenu.add(autoJCasAction);
    settingsMenu.add(qualifiedTypesAction);
    settingsMenu.add(limitJCasGenToProject);
  }
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.